diff --git a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/INSTALL.md b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/INSTALL.md index b30e5fa..de920f8 100644 --- a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/INSTALL.md +++ b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/INSTALL.md @@ -1,4 +1,4 @@ -# Cocos Creator MCP Server v1.7.9 +# Cocos Creator MCP Server v1.8.0 ## 安装说明 @@ -40,5 +40,5 @@ - 🛒 购买/续费: https://www.vberai.com/game-engines/cocos --- -构建信息: v1.7.9 (production) - 2026-07-18 16:06:14 +构建信息: v1.8.0 (production) - 2026-08-24 14:27:23 作者: 李大仙 (LiDaxian) diff --git a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/ar.js b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/ar.js index a54afd9..b7c8490 100644 --- a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/ar.js +++ b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/ar.js @@ -123,11 +123,23 @@ module.exports = { "transport_protocol": "بروتوكول النقل", "transport_type": "نوع النقل", "mcp_url": "رابط MCP", - "port_fallback_title": "المنفذ {0} غير متاح — تم التبديل إلى {1}", - "port_fallback_reason": "المنفذ {0} محجوز من قبل النظام أو محظور بواسطة جدار الحماية/برنامج مكافحة الفيروسات (شائع في نظام Windows المثبت عليه Hyper-V أو WSL2 أو Docker). الخادم يعمل بشكل طبيعي على المنفذ الجديد.", - "port_fallback_resynced": "تم تحديث إعدادات العملاء التالية: {0}. أعد تشغيلها ليصبح المنفذ الجديد ساري المفعول.", - "port_fallback_no_clients": "إذا سبق أن أعددت عملاء الذكاء الاصطناعي، فأعد إعدادهم على المنفذ الجديد من خلال الإعداد بنقرة واحدة.", - "port_fallback_dismiss": "حسنًا", + "port_fallback_title": "المنفذ {0} مشغول — تم التبديل إلى {1}", + "net_title": "الشبكة / الوكيل", + "net_direct": "اتصال مباشر", + "net_via": "عبر {0} ({1})", + "net_source_manual": "يدوي", + "net_source_env": "متغير بيئة", + "net_source_system": "إعدادات النظام", + "net_mode_auto": "كشف تلقائي", + "net_mode_manual": "يدوي", + "net_mode_off": "بدون وكيل", + "net_save": "حفظ", + "net_test": "اختبار الاتصال", + "net_testing": "جارٍ الاختبار…", + "net_test_ok": "تم الاتصال ({0} م.ث)", + "net_test_fail": "فشل: {0}", + "net_hint": "انتهاء مهلة تسجيل الدخول سببه الشبكة في الغالب. إن كنت تستخدم VPN/وكيلاً فأدخل عنوانه هنا (مثل http://127.0.0.1:7890) أو حوّل البرنامج إلى الوضع الشامل (TUN).", + "net_pac_warning": "يستخدم النظام برنامج PAC للتهيئة التلقائية ولا يمكن للملحق تفسيره. اختر «يدوي» وأدخل عنوان الوكيل.", "port_label": "المنفذ", "auto_start_label": "بدء تلقائي", "debug_log_label": "سجل التصحيح", @@ -240,4 +252,7 @@ module.exports = { "subscription_network_error": "فشل الاتصال بالشبكة. تحقق من شبكتك وحاول مرة أخرى.", "subscription_server_error": "أرجع الخادم استجابة غير صالحة. حاول مرة أخرى لاحقًا.", "subscription_google_authorization_failed": "لم يكتمل تفويض Google. يرجى المحاولة مرة أخرى." + ,"lan_access_label": "السماح بالوصول عبر الشبكة المحلية" + ,"lan_access_warning": "مرتبط بالعنوان 0.0.0.0. يمكن لأي شخص على هذه الشبكة الاتصال والتحكم في المحرر — لا تتحقق نقطة النهاية هذه من أي بيانات اعتماد. فعّل هذا الخيار على الشبكات الموثوقة فقط." + ,"lan_address": "عنوان الشبكة المحلية" }; diff --git a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/de.js b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/de.js index 6e735ea..fb5e245 100644 --- a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/de.js +++ b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/de.js @@ -123,11 +123,23 @@ module.exports = { "transport_protocol": "Transportprotokoll", "transport_type": "Transporttyp", "mcp_url": "MCP-URL", - "port_fallback_title": "Port {0} nicht verfügbar – zu {1} gewechselt", - "port_fallback_reason": "Port {0} ist vom System reserviert oder wird von einer Firewall/Antivirensoftware blockiert (häufig unter Windows mit Hyper-V, WSL2 oder Docker). Der Server läuft auf dem neuen Port normal.", - "port_fallback_resynced": "Konfiguration aktualisiert für: {0}. Starten Sie diese Clients neu, damit der neue Port wirksam wird.", - "port_fallback_no_clients": "Falls Sie bereits AI-Clients eingerichtet haben, konfigurieren Sie sie über die Ein-Klick-Konfiguration erneut auf den neuen Port.", - "port_fallback_dismiss": "Verstanden", + "port_fallback_title": "Port {0} belegt – zu {1} gewechselt", + "net_title": "Netzwerk / Proxy", + "net_direct": "Direktverbindung", + "net_via": "über {0} ({1})", + "net_source_manual": "manuell", + "net_source_env": "Umgebungsvariable", + "net_source_system": "Systemeinstellungen", + "net_mode_auto": "Automatisch", + "net_mode_manual": "Manuell", + "net_mode_off": "Kein Proxy", + "net_save": "Speichern", + "net_test": "Verbindung testen", + "net_testing": "Wird getestet…", + "net_test_ok": "Verbunden ({0} ms)", + "net_test_fail": "Fehlgeschlagen: {0}", + "net_hint": "Login-Timeouts sind fast immer ein Netzwerkproblem. Bei VPN/Proxy hier die Adresse eintragen (z. B. http://127.0.0.1:7890) oder den Client auf globalen (TUN) Modus umstellen.", + "net_pac_warning": "Das System nutzt ein PAC-Skript, das dieses Plugin nicht auswerten kann. Auf Manuell umstellen und die Proxy-Adresse eintragen.", "port_label": "Port", "auto_start_label": "Autostart", "debug_log_label": "Debug-Protokoll", @@ -240,4 +252,7 @@ module.exports = { "subscription_network_error": "Netzwerkverbindung fehlgeschlagen. Überprüfen Sie Ihr Netzwerk und versuchen Sie es erneut.", "subscription_server_error": "Der Server hat eine ungültige Antwort zurückgegeben. Versuchen Sie es später erneut.", "subscription_google_authorization_failed": "Die Google-Autorisierung wurde nicht abgeschlossen. Bitte versuchen Sie es erneut." + ,"lan_access_label": "LAN-Zugriff erlauben" + ,"lan_access_warning": "An 0.0.0.0 gebunden. Jeder in diesem Netzwerk kann sich verbinden und den Editor steuern — dieser Endpunkt prüft keinerlei Anmeldedaten. Nur in einem vertrauenswürdigen Netzwerk aktivieren." + ,"lan_address": "LAN-Adresse" }; diff --git a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/en.js b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/en.js index 5a94942..d642bb8 100644 --- a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/en.js +++ b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/en.js @@ -125,11 +125,23 @@ module.exports = { "transport_protocol": "Transport Protocol", "transport_type": "Transport Type", "mcp_url": "MCP URL", - "port_fallback_title": "Port {0} unavailable — switched to {1}", - "port_fallback_reason": "Port {0} is reserved by the system or blocked by a firewall/antivirus (common on Windows with Hyper-V, WSL2 or Docker installed). The server is running normally on the new port.", - "port_fallback_resynced": "Updated the config for: {0}. Restart these clients for the new port to take effect.", - "port_fallback_no_clients": "If you have already configured AI clients, re-run the one-click setup to point them at the new port.", - "port_fallback_dismiss": "Got it", + "port_fallback_title": "Port {0} is in use — switched to {1}", + "net_title": "Network / Proxy", + "net_direct": "Direct", + "net_via": "via {0} ({1})", + "net_source_manual": "manual", + "net_source_env": "env var", + "net_source_system": "system settings", + "net_mode_auto": "Auto-detect", + "net_mode_manual": "Manual", + "net_mode_off": "No proxy", + "net_save": "Save", + "net_test": "Test connection", + "net_testing": "Testing…", + "net_test_ok": "Connected ({0} ms)", + "net_test_fail": "Failed: {0}", + "net_hint": "Login timeouts are usually a network issue. If you use a VPN/proxy, enter its address here (e.g. http://127.0.0.1:7890) or switch the client to global (TUN) mode.", + "net_pac_warning": "The system uses a PAC auto-config script, which this plugin cannot evaluate. Switch to Manual and enter the proxy address.", "port_label": "Port", "auto_start_label": "Auto Start", "debug_log_label": "Debug Log", @@ -241,4 +253,7 @@ module.exports = { ,"subscription_network_error": "Network connection failed. Check your network and try again." ,"subscription_server_error": "The server returned an invalid response. Try again later." ,"subscription_google_authorization_failed": "Google authorization was not completed. Please try again." + ,"lan_access_label": "Allow LAN access" + ,"lan_access_warning": "Bound to 0.0.0.0. Anyone on this network can connect and drive the editor — this endpoint verifies no credentials. Only enable on a trusted network." + ,"lan_address": "LAN address" }; diff --git a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/es.js b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/es.js index acc717c..a5d1580 100644 --- a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/es.js +++ b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/es.js @@ -123,11 +123,23 @@ module.exports = { "transport_protocol": "Protocolo de transporte", "transport_type": "Tipo de transporte", "mcp_url": "URL MCP", - "port_fallback_title": "Puerto {0} no disponible: se cambió a {1}", - "port_fallback_reason": "El puerto {0} está reservado por el sistema o bloqueado por un firewall/antivirus (habitual en Windows con Hyper-V, WSL2 o Docker). El servidor funciona con normalidad en el nuevo puerto.", - "port_fallback_resynced": "Se actualizó la configuración de: {0}. Reinicie estos clientes para que el nuevo puerto surta efecto.", - "port_fallback_no_clients": "Si ya configuró clientes de IA, vuelva a configurarlos en el nuevo puerto desde la configuración con un clic.", - "port_fallback_dismiss": "Entendido", + "port_fallback_title": "Puerto {0} ocupado: se cambió a {1}", + "net_title": "Red / Proxy", + "net_direct": "Conexión directa", + "net_via": "vía {0} ({1})", + "net_source_manual": "manual", + "net_source_env": "variable de entorno", + "net_source_system": "ajustes del sistema", + "net_mode_auto": "Detección automática", + "net_mode_manual": "Manual", + "net_mode_off": "Sin proxy", + "net_save": "Guardar", + "net_test": "Probar conexión", + "net_testing": "Probando…", + "net_test_ok": "Conectado ({0} ms)", + "net_test_fail": "Error: {0}", + "net_hint": "Los tiempos de espera al iniciar sesión suelen ser de red. Si usas VPN/proxy, indica su dirección aquí (p. ej. http://127.0.0.1:7890) o cambia el cliente a modo global (TUN).", + "net_pac_warning": "El sistema usa un script PAC que este plugin no puede evaluar. Cambia a Manual e introduce la dirección del proxy.", "port_label": "Puerto", "auto_start_label": "Inicio auto", "debug_log_label": "Registro de depuración", @@ -240,4 +252,7 @@ module.exports = { "subscription_network_error": "Falló la conexión de red. Comprueba tu red e inténtalo de nuevo.", "subscription_server_error": "El servidor devolvió una respuesta no válida. Inténtalo más tarde.", "subscription_google_authorization_failed": "No se completó la autorización de Google. Inténtalo de nuevo." + ,"lan_access_label": "Permitir acceso desde la red local" + ,"lan_access_warning": "Vinculado a 0.0.0.0. Cualquiera en esta red puede conectarse y manejar el editor: este punto de conexión no verifica ninguna credencial. Actívalo solo en una red de confianza." + ,"lan_address": "Dirección de red local" }; diff --git a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/fil.js b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/fil.js new file mode 100644 index 0000000..3188bea --- /dev/null +++ b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/fil.js @@ -0,0 +1,259 @@ +"use strict"; + +module.exports = { + "extension_name": "Cocos MCP Server", + "description": "AI MCP Server para sa Cocos Creator 3.8", + "panel_title": "MCP Server", + "open_panel": "Buksan ang MCP Panel", + "start_server": "Simulan ang Server", + "stop_server": "Ihinto ang Server", + "server_status": "Katayuan ng Server", + "port": "Port", + "settings": "Mga Setting", + "connected": "Nakakonekta", + "disconnected": "Nadiskonekta", + "server_running": "Tumatakbo ang server sa port {0}", + "server_stopped": "Huminto na ang server", + "auto_start": "Awtomatikong Simulan", + "debug_log": "Debug Log", + "max_connections": "Maximum na Koneksyon", + "connection_info": "Impormasyon ng Koneksyon", + "http_url": "HTTP URL", + "copy": "Kopyahin", + "save_settings": "I-save ang Mga Setting", + "settings_saved": "Matagumpay na na-save ang mga setting", + "server_started": "Nagsimula ang MCP Server", + "server_stopped_msg": "Huminto ang MCP Server", + "failed_to_start": "Nabigong simulan ang server", + "failed_to_stop": "Nabigong ihinto ang server", + "failed_to_save": "Nabigong i-save ang mga setting", + "url_copied": "Nakopya ang HTTP URL sa clipboard", + "tool_manager": "Tagapamahala ng Kasangkapan", + "open_tool_manager": "Buksan ang Tagapamahala ng Kasangkapan", + "create_config": "Gumawa ng Configuration", + "edit_config": "I-edit ang Configuration", + "delete_config": "Tanggalin ang Configuration", + "import_config": "Mag-import ng Configuration", + "export_config": "Mag-export ng Configuration", + "apply_config": "Ilapat ang Configuration", + "select_all": "Piliin Lahat", + "deselect_all": "Alisin ang Lahat ng Pinili", + "save_changes": "I-save ang Mga Pagbabago", + "config_name": "Pangalan ng Configuration", + "config_description": "Paglalarawan ng Configuration", + "current_config": "Kasalukuyang Configuration", + "tool_management": "Pamamahala ng Kasangkapan", + "total_tools": "Kabuuang Kasangkapan", + "enabled_tools": "Naka-enable", + "disabled_tools": "Naka-disable", + "no_config_selected": "Walang Napiling Configuration", + "select_config_first": "Pumili muna ng configuration o gumawa ng bago", + "config_created": "Matagumpay na nagawa ang configuration", + "config_updated": "Matagumpay na na-update ang configuration", + "config_deleted": "Matagumpay na natanggal ang configuration", + "config_applied": "Matagumpay na nailapat ang configuration", + "config_exported": "Matagumpay na na-export ang configuration", + "config_imported": "Matagumpay na na-import ang configuration", + "confirm_delete": "Kumpirmahin ang Pagtanggal", + "delete_config_confirm": "Sigurado ka bang tatanggalin ang configuration na \"{0}\"? Hindi na ito maibabalik.", + "max_config_slots_reached": "Naabot na ang maximum na slot ng configuration ({0})", + "invalid_config_format": "Hindi wastong format ng configuration", + "invalid_json_format": "Hindi wastong format ng JSON o istruktura ng configuration", + "server_tab": "Server", + "tools_tab": "Pamamahala ng Kasangkapan", + "available_tools": "Mga Available na Kasangkapan", + "scene_tools": "Mga Kasangkapan sa Scene", + "node_tools": "Mga Kasangkapan sa Node", + "component_tools": "Mga Kasangkapan sa Component", + "prefab_tools": "Mga Kasangkapan sa Prefab", + "project_tools": "Mga Kasangkapan sa Proyekto", + "debug_tools": "Mga Kasangkapan sa Debug", + "preferences_tools": "Mga Kagustuhan", + "server_tools": "Mga Kasangkapan sa Server", + "broadcast_tools": "Mga Kasangkapan sa Broadcast", + "scene_advanced_tools": "Mga Advanced na Kasangkapan sa Scene", + "scene_view_tools": "Mga Kasangkapan sa Scene View", + "reference_image_tools": "Mga Kasangkapan sa Reference Image", + "asset_advanced_tools": "Mga Advanced na Kasangkapan sa Asset", + "validation_tools": "Mga Kasangkapan sa Validation", + "brand_name": "LiDaxian MCP Series", + "brand_subtitle": "LiDaxian MCP Series", + "contact_email": "Email", + "contact_wechat": "WeChat", + "contact_github": "GitHub", + "machine_id_label": "Machine ID", + "purchase_renew": "Bumili / I-renew", + "purchase_url": "https://www.vberai.com/game-engines/cocos", + "auth_title": "Pumili ng paraan ng pag-sign in", + "auth_subtitle": "Ilagay ang iyong email at activation code", + "auth_choose_subtitle": "Pumili ng paraan ng pag-sign in upang magpatuloy", + "email_label": "Email Address", + "activation_code_label": "Activation Code", + "email_placeholder": "Ilagay ang email", + "code_placeholder": "Ilagay ang code (XXXXX-XXXXX-XXXXX-XXXXX-XXXXX)", + "activate_button": "I-activate", + "deactivate_button": "I-deactivate", + "activating": "Ina-activate...", + "deactivating": "Dina-deactivate...", + "license_status": "Katayuan ng Lisensya", + "license_type": "Uri ng Lisensya", + "expiry_date": "Petsa ng Pag-expire", + "days_remaining": "Natitirang Araw", + "days_unit": "araw", + "permanent": "Permanente", + "expiry_warning_title": "Malapit Nang Mag-expire ang Lisensya", + "expiry_warning_message": "Mag-e-expire ang iyong lisensya sa loob ng {0} araw. Mangyaring i-renew upang maiwasan ang pagkaantala ng serbisyo.", + "renew_now": "I-renew Ngayon", + "i_understand": "Naiintindihan Ko", + "activation_success": "Matagumpay na na-activate ang lisensya!", + "activation_failed": "Nabigo ang activation: {0}", + "invalid_code": "Hindi wastong format ng activation code", + "purchase_license": "Bumili ng Lisensya", + "renew_license": "I-renew ang Lisensya", + "contact_support": "Suporta", + "language_switch": "Filipino", + "version_label": "Bersyon", + "license_required": "Kailangan ng lisensya upang simulan ang server", + "license_check_failed": "Nabigo ang pagsusuri ng lisensya", + + "status_stopped": "Huminto", + "status_running": "Tumatakbo", + "status_error": "Nabigo ang Koneksyon", + "config_tab": "Mabilis na Config", + "status_label": "Katayuan", + "connections_count": "Mga Koneksyon", + "transport_protocol": "Transport Protocol", + "transport_type": "Uri ng Transport", + "mcp_url": "MCP URL", + "port_fallback_title": "Ginagamit ang port {0} — lumipat sa {1}", + "net_title": "Network / Proxy", + "net_direct": "Direktang koneksyon", + "net_via": "sa pamamagitan ng {0} ({1})", + "net_source_manual": "manual", + "net_source_env": "environment variable", + "net_source_system": "system settings", + "net_mode_auto": "Auto-detect", + "net_mode_manual": "Manual", + "net_mode_off": "Walang proxy", + "net_save": "I-save", + "net_test": "I-test ang koneksyon", + "net_testing": "Sinusubukan…", + "net_test_ok": "Nakakonekta ({0} ms)", + "net_test_fail": "Nabigo: {0}", + "net_hint": "Ang login timeout ay karaniwang isyu sa network. Kung gumagamit ng VPN/proxy, ilagay ang address (hal. http://127.0.0.1:7890) o ilipat ang client sa global (TUN) mode.", + "net_pac_warning": "Gumagamit ang system ng PAC script na hindi kayang basahin ng plugin. Pumili ng Manual at ilagay ang proxy address.", + "port_label": "Port", + "auto_start_label": "Awtomatikong Simulan", + "debug_log_label": "Debug Log", + "max_connections_label": "Maximum na Koneksyon", + "server_settings_title": "Mga Setting ng Server", + "server_status_title": "Katayuan ng Server", + "connection_info_title": "Impormasyon ng Koneksyon", + "tools_count": "{0} na kasangkapan", + "tools_stats": "{0} na kasangkapan ({1} naka-enable / {2} naka-disable)", + "quick_config_title": "Mabilis na Pag-configure ng MCP Clients", + "quick_config_desc": "Awtomatikong i-configure ang kasalukuyang MCP server sa mga pangunahing AI editor at CLI tool", + "server_info": "Impormasyon ng Server", + "server_name_label": "Pangalan ng Server", + "server_address": "Address ng Server", + "timeout_ms": "Timeout (ms)", + "auto_config_title": "Awtomatikong Config (IDE Editors + Codex CLI)", + "add_all": "Idagdag Lahat", + "remove_all": "Alisin Lahat", + "auto_config_note": "I-click ang button upang awtomatikong baguhin ang mga config file (Cursor, Windsurf, Trae, Codex CLI)", + "configured": "Naka-configure", + "not_configured": "Hindi Naka-configure", + "auto_config_btn": "Awtomatikong Config", + "delete_btn": "Tanggalin", + "copy_config": "Kopyahin ang Config", + "open_config": "Buksan ang Config", + "manual_config_title": "Manwal na Config (Claude CLI + Gemini CLI)", + "refresh_commands": "I-refresh ang Mga Command", + "manual_config_note": "Ang sumusunod na mga CLI tool ay nangangailangan ng manwal na pagpapatakbo ng terminal command", + "config_scope": "Saklaw ng Config:", + "scope_user": "Antas ng User", + "scope_project": "Antas ng Proyekto", + "operation_log": "Log ng Operasyon", + "no_logs": "Walang record ng operasyon", + "copyright_line": "© 2025 LiDaxian - Cocos Creator MCP Server v{0}", + "protocol_line": "Batay sa Streamable HTTP Protocol (MCP 2025-03-26)", + "tools_copyright_line1": "Sistema ng Kasangkapan - 13 intent-level na kasangkapan, 150+ operasyon sa editor, dispatch gamit ang action code", + "config_copyright_line1": "Mabilis na Config - Sinusuportahan ang Cursor, Windsurf, Trae, Codex CLI, Claude CLI, Gemini CLI", + "email_required": "Mangyaring ilagay ang email at activation code", + "permanent_label": "Permanente", + "logout_button": "Mag-log out", + "invite_code_label": "Invite Code", + "copy_button": "Kopyahin", + "change_code_button": "Palitan ang Code", + "change_code_title": "Palitan ang Activation Code", + "change_code_desc": "Ilagay ang iyong bagong activation code. Aalisin muna ang kasalukuyang device binding.", + "confirm_change": "Kumpirmahin", + "cancel": "Kanselahin", + "code_required": "Mangyaring ilagay ang activation code", + "expiry_inline_warning": "Malapit nang mag-expire!", + "store_purchase_hint": "Kung binili mo ang plugin na ito sa Cocos Store, mangyaring kontakin ako upang makuha ang iyong activation code.", + "license_expired_title": "Nag-expire na ang Lisensya", + "license_expired_message": "Nag-expire na ang iyong lisensya at hindi masisimulan ang server. Mangyaring i-renew o i-activate muli upang magpatuloy.", + "go_to_login": "Pumunta sa Pag-login", + + "log_load_config_failed": "Nabigong i-load ang katayuan ng config: {0}", + "log_gen_cli_failed": "Nabigong bumuo ng mga CLI command: {0}", + "log_add_client_failed": "Nabigong idagdag sa {0}: {1}", + "log_remove_client_failed": "Nabigong alisin mula sa {0}: {1}", + "quick_config_dialog_title": "One-click na Configuration", + "config_operation_failed": "Nabigo ang operasyon ng configuration", + "config_file_not_found_changed_path": "Nabigo ang configuration: hindi mahanap ang config file. Maaaring naka-install ang {0} sa custom na path.", + "log_batch_add_failed": "Nabigo ang batch add: {0}", + "log_batch_remove_failed": "Nabigo ang batch remove: {0}", + "log_copied_config": "Nakopya ang config ng {0} sa clipboard", + "log_gen_config_failed": "Nabigong bumuo ng config", + "log_copy_config_failed": "Nabigong kopyahin ang config: {0}", + "log_copied_command": "Nakopya ang command ng {0} sa clipboard", + "log_copy_command_failed": "Nabigong kopyahin ang command: {0}", + "log_opened_config_file": "Binuksan ang config file: {0}", + "log_open_config_failed": "Nabigong buksan ang config file", + "log_open_config_error": "Nabigong buksan ang config file: {0}", + + "update_available_title": "May Available na Update", + "update_new_version": "Available na ang bagong bersyon v{0}!", + "update_now": "I-update Ngayon", + "update_not_now": "Hindi Ngayon", + "update_skip_version": "Laktawan ang v{0}", + "check_for_updates": "Tingnan ang Mga Update", + "update_checking": "Sinusuri...", + "update_no_update": "Ginagamit mo na ang pinakabagong bersyon", + "update_urgency_critical": "Kritikal na Update", + "update_urgency_high": "Mahalagang Update", + "update_current_version": "Kasalukuyang bersyon: v{0}", + "update_changelog": "Changelog" + ,"update_changelog_empty": "Walang ibinigay na release notes para sa bersyong ito." + ,"subscription_login_title": "Account sa subscription ng VberAI" + ,"subscription_password_label": "Password" + ,"subscription_password_placeholder": "Ilagay ang password" + ,"subscription_login_button": "Mag-sign in gamit ang VberAI" + ,"subscription_google_button": "Mag-sign in gamit ang Google" + ,"subscription_google_pending": "Nabuksan ang browser. Kumpletuhin ang Google authorization, pagkatapos ay bumalik sa Cocos Creator." + ,"subscription_google_pending_button": "Naghihintay ng Google authorization..." + ,"subscription_register_button": "Gumawa ng VberAI account" + ,"subscription_logging_in": "Nagsa-sign in..." + ,"subscription_credentials_required": "Mangyaring ilagay ang email at password" + ,"subscription_login_success": "Naka-sign in ang subscription account" + ,"subscription_login_failed": "Nabigo ang pag-sign in ng subscription" + ,"subscription_not_entitled": "Hindi kasama ang Cocos 3.x MCP sa iyong kasalukuyang subscription. Mag-upgrade upang magpatuloy." + ,"subscription_upgrade_to": "Mag-upgrade sa {0} upang magamit ang produktong ito" + ,"subscription_upgrade_action": "I-upgrade ang subscription" + ,"subscription_logged_in": "Naka-sign in na account" + ,"subscription_choose_button": "Account sa subscription ng VberAI" + ,"license_choose_button": "Activation code" + ,"subscription_method_label": "Subscription" + ,"back_to_login_choices": "← Pumili ng ibang paraan ng pag-sign in" + ,"subscription_signed_out_other_device": "Naka-sign out: ginamit ang iyong account sa ibang device." + ,"subscription_google_cancelled": "Kinansela ang pag-sign in gamit ang Google." + ,"subscription_request_timeout": "Nag-timeout ang request. Suriin ang iyong network at subukan muli." + ,"subscription_network_error": "Nabigo ang koneksyon sa network. Suriin ang iyong network at subukan muli." + ,"subscription_server_error": "Nagbalik ang server ng hindi wastong tugon. Subukan muli mamaya." + ,"subscription_google_authorization_failed": "Hindi nakumpleto ang Google authorization. Mangyaring subukan muli." + ,"lan_access_label": "Payagan ang LAN access" + ,"lan_access_warning": "Naka-bind sa 0.0.0.0. Sinuman sa network na ito ay makakakonekta at makakakontrol sa editor — walang kredensyal na bine-verify ang endpoint na ito. I-enable lamang sa pinagkakatiwalaang network." + ,"lan_address": "LAN address" +}; diff --git a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/fr.js b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/fr.js index e66e9d8..7e583f5 100644 --- a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/fr.js +++ b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/fr.js @@ -123,11 +123,23 @@ module.exports = { "transport_protocol": "Protocole de transport", "transport_type": "Type de transport", "mcp_url": "URL MCP", - "port_fallback_title": "Port {0} indisponible — basculé vers {1}", - "port_fallback_reason": "Le port {0} est réservé par le système ou bloqué par un pare-feu/antivirus (fréquent sous Windows avec Hyper-V, WSL2 ou Docker). Le serveur fonctionne normalement sur le nouveau port.", - "port_fallback_resynced": "Configuration mise à jour pour : {0}. Redémarrez ces clients pour que le nouveau port prenne effet.", - "port_fallback_no_clients": "Si vous avez déjà configuré des clients IA, reconfigurez-les sur le nouveau port via la configuration en un clic.", - "port_fallback_dismiss": "Compris", + "port_fallback_title": "Port {0} occupé — basculé vers {1}", + "net_title": "Réseau / Proxy", + "net_direct": "Connexion directe", + "net_via": "via {0} ({1})", + "net_source_manual": "manuel", + "net_source_env": "variable d’env.", + "net_source_system": "réglages système", + "net_mode_auto": "Détection auto", + "net_mode_manual": "Manuel", + "net_mode_off": "Sans proxy", + "net_save": "Enregistrer", + "net_test": "Tester la connexion", + "net_testing": "Test en cours…", + "net_test_ok": "Connecté ({0} ms)", + "net_test_fail": "Échec : {0}", + "net_hint": "Les délais de connexion viennent presque toujours du réseau. Si vous utilisez un VPN/proxy, saisissez son adresse ici (ex. http://127.0.0.1:7890) ou passez le client en mode global (TUN).", + "net_pac_warning": "Le système utilise un script PAC que ce plugin ne peut pas évaluer. Passez en mode Manuel et saisissez l’adresse du proxy.", "port_label": "Port", "auto_start_label": "Démarrage auto", "debug_log_label": "Journal de débogage", @@ -240,4 +252,7 @@ module.exports = { "subscription_network_error": "Échec de la connexion réseau. Vérifiez votre réseau et réessayez.", "subscription_server_error": "Le serveur a renvoyé une réponse non valide. Réessayez plus tard.", "subscription_google_authorization_failed": "L'autorisation Google n'a pas été effectuée. Veuillez réessayer." + ,"lan_access_label": "Autoriser l'accès au réseau local" + ,"lan_access_warning": "Lié à 0.0.0.0. N'importe qui sur ce réseau peut se connecter et piloter l'éditeur — ce point de terminaison ne vérifie aucune information d'identification. À n'activer que sur un réseau de confiance." + ,"lan_address": "Adresse réseau local" }; diff --git a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/hi.js b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/hi.js new file mode 100644 index 0000000..42b3557 --- /dev/null +++ b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/hi.js @@ -0,0 +1,259 @@ +"use strict"; + +module.exports = { + "extension_name": "Cocos MCP सर्वर", + "description": "Cocos Creator 3.8 के लिए AI MCP सर्वर", + "panel_title": "MCP सर्वर", + "open_panel": "MCP पैनल खोलें", + "start_server": "सर्वर शुरू करें", + "stop_server": "सर्वर रोकें", + "server_status": "सर्वर स्थिति", + "port": "पोर्ट", + "settings": "सेटिंग्स", + "connected": "कनेक्टेड", + "disconnected": "डिस्कनेक्टेड", + "server_running": "सर्वर पोर्ट {0} पर चल रहा है", + "server_stopped": "सर्वर रुक गया है", + "auto_start": "ऑटो स्टार्ट", + "debug_log": "डीबग लॉगिंग", + "max_connections": "अधिकतम कनेक्शन", + "connection_info": "कनेक्शन जानकारी", + "http_url": "HTTP URL", + "copy": "कॉपी करें", + "save_settings": "सेटिंग्स सहेजें", + "settings_saved": "सेटिंग्स सफलतापूर्वक सहेजी गईं", + "server_started": "MCP सर्वर शुरू हुआ", + "server_stopped_msg": "MCP सर्वर रुक गया", + "failed_to_start": "सर्वर शुरू करने में विफल", + "failed_to_stop": "सर्वर रोकने में विफल", + "failed_to_save": "सेटिंग्स सहेजने में विफल", + "url_copied": "HTTP URL क्लिपबोर्ड पर कॉपी किया गया", + "tool_manager": "टूल प्रबंधक", + "open_tool_manager": "टूल प्रबंधक खोलें", + "create_config": "कॉन्फ़िगरेशन बनाएँ", + "edit_config": "कॉन्फ़िगरेशन संपादित करें", + "delete_config": "कॉन्फ़िगरेशन हटाएँ", + "import_config": "कॉन्फ़िगरेशन आयात करें", + "export_config": "कॉन्फ़िगरेशन निर्यात करें", + "apply_config": "कॉन्फ़िगरेशन लागू करें", + "select_all": "सभी चुनें", + "deselect_all": "चयन हटाएँ", + "save_changes": "परिवर्तन सहेजें", + "config_name": "कॉन्फ़िगरेशन नाम", + "config_description": "कॉन्फ़िगरेशन विवरण", + "current_config": "वर्तमान कॉन्फ़िगरेशन", + "tool_management": "टूल प्रबंधन", + "total_tools": "कुल टूल", + "enabled_tools": "सक्षम", + "disabled_tools": "अक्षम", + "no_config_selected": "कोई कॉन्फ़िगरेशन चयनित नहीं", + "select_config_first": "कृपया पहले कोई कॉन्फ़िगरेशन चुनें या नया बनाएँ", + "config_created": "कॉन्फ़िगरेशन सफलतापूर्वक बनाया गया", + "config_updated": "कॉन्फ़िगरेशन सफलतापूर्वक अपडेट किया गया", + "config_deleted": "कॉन्फ़िगरेशन सफलतापूर्वक हटाया गया", + "config_applied": "कॉन्फ़िगरेशन सफलतापूर्वक लागू किया गया", + "config_exported": "कॉन्फ़िगरेशन सफलतापूर्वक निर्यात किया गया", + "config_imported": "कॉन्फ़िगरेशन सफलतापूर्वक आयात किया गया", + "confirm_delete": "हटाने की पुष्टि करें", + "delete_config_confirm": "क्या आप वाकई कॉन्फ़िगरेशन \"{0}\" हटाना चाहते हैं? यह क्रिया पूर्ववत नहीं की जा सकती।", + "max_config_slots_reached": "कॉन्फ़िगरेशन स्लॉट की अधिकतम सीमा पहुँच गई ({0})", + "invalid_config_format": "अमान्य कॉन्फ़िगरेशन प्रारूप", + "invalid_json_format": "अमान्य JSON प्रारूप या कॉन्फ़िगरेशन संरचना", + "server_tab": "सर्वर", + "tools_tab": "टूल प्रबंधन", + "available_tools": "उपलब्ध टूल", + "scene_tools": "सीन टूल", + "node_tools": "नोड टूल", + "component_tools": "कंपोनेंट टूल", + "prefab_tools": "प्रीफ़ैब टूल", + "project_tools": "प्रोजेक्ट टूल", + "debug_tools": "डीबग टूल", + "preferences_tools": "प्राथमिकताएँ", + "server_tools": "सर्वर टूल", + "broadcast_tools": "ब्रॉडकास्ट टूल", + "scene_advanced_tools": "उन्नत सीन टूल", + "scene_view_tools": "सीन व्यू टूल", + "reference_image_tools": "संदर्भ छवि टूल", + "asset_advanced_tools": "उन्नत एसेट टूल", + "validation_tools": "सत्यापन टूल", + "brand_name": "LiDaxian MCP Series", + "brand_subtitle": "LiDaxian MCP Series", + "contact_email": "ईमेल", + "contact_wechat": "WeChat", + "contact_github": "GitHub", + "machine_id_label": "मशीन ID", + "purchase_renew": "खरीदें / नवीनीकरण करें", + "purchase_url": "https://www.vberai.com/game-engines/cocos", + "auth_title": "साइन-इन विधि चुनें", + "auth_subtitle": "अपना ईमेल और एक्टिवेशन कोड दर्ज करें", + "auth_choose_subtitle": "जारी रखने के लिए साइन-इन विधि चुनें", + "email_label": "ईमेल पता", + "activation_code_label": "एक्टिवेशन कोड", + "email_placeholder": "ईमेल दर्ज करें", + "code_placeholder": "कोड दर्ज करें (XXXXX-XXXXX-XXXXX-XXXXX-XXXXX)", + "activate_button": "सक्रिय करें", + "deactivate_button": "निष्क्रिय करें", + "activating": "सक्रिय किया जा रहा है...", + "deactivating": "निष्क्रिय किया जा रहा है...", + "license_status": "लाइसेंस स्थिति", + "license_type": "लाइसेंस प्रकार", + "expiry_date": "समाप्ति तिथि", + "days_remaining": "शेष दिन", + "days_unit": "दिन", + "permanent": "स्थायी", + "expiry_warning_title": "लाइसेंस जल्द समाप्त हो रहा है", + "expiry_warning_message": "आपका लाइसेंस {0} दिनों में समाप्त हो जाएगा। सेवा में रुकावट से बचने के लिए कृपया नवीनीकरण करें।", + "renew_now": "अभी नवीनीकरण करें", + "i_understand": "समझ गया", + "activation_success": "लाइसेंस सफलतापूर्वक सक्रिय हो गया!", + "activation_failed": "सक्रियण विफल: {0}", + "invalid_code": "एक्टिवेशन कोड का प्रारूप अमान्य है", + "purchase_license": "लाइसेंस खरीदें", + "renew_license": "लाइसेंस नवीनीकरण", + "contact_support": "सहायता", + "language_switch": "हिन्दी", + "version_label": "संस्करण", + "license_required": "सर्वर शुरू करने के लिए लाइसेंस आवश्यक है", + "license_check_failed": "लाइसेंस जाँच विफल", + + "status_stopped": "रुका हुआ", + "status_running": "चल रहा है", + "status_error": "कनेक्शन विफल", + "config_tab": "त्वरित कॉन्फ़िग", + "status_label": "स्थिति", + "connections_count": "कनेक्शन", + "transport_protocol": "ट्रांसपोर्ट प्रोटोकॉल", + "transport_type": "ट्रांसपोर्ट प्रकार", + "mcp_url": "MCP URL", + "port_fallback_title": "पोर्ट {0} व्यस्त है — {1} पर बदल दिया गया", + "net_title": "नेटवर्क / प्रॉक्सी", + "net_direct": "सीधा कनेक्शन", + "net_via": "{0} के माध्यम से ({1})", + "net_source_manual": "मैनुअल", + "net_source_env": "एनवायरनमेंट वेरिएबल", + "net_source_system": "सिस्टम सेटिंग्स", + "net_mode_auto": "स्वतः पहचान", + "net_mode_manual": "मैनुअल", + "net_mode_off": "प्रॉक्सी नहीं", + "net_save": "सहेजें", + "net_test": "कनेक्शन जाँचें", + "net_testing": "जाँच हो रही है…", + "net_test_ok": "कनेक्ट हो गया ({0} ms)", + "net_test_fail": "विफल: {0}", + "net_hint": "लॉगिन टाइमआउट आमतौर पर नेटवर्क की समस्या है। VPN/प्रॉक्सी उपयोग करते हों तो यहाँ पता डालें (जैसे http://127.0.0.1:7890) या क्लाइंट को ग्लोबल (TUN) मोड में बदलें।", + "net_pac_warning": "सिस्टम PAC स्क्रिप्ट उपयोग कर रहा है, जिसे प्लगिन पढ़ नहीं सकता। «मैनुअल» चुनें और प्रॉक्सी पता डालें।", + "port_label": "पोर्ट", + "auto_start_label": "ऑटो स्टार्ट", + "debug_log_label": "डीबग लॉग", + "max_connections_label": "अधिकतम कनेक्शन", + "server_settings_title": "सर्वर सेटिंग्स", + "server_status_title": "सर्वर स्थिति", + "connection_info_title": "कनेक्शन जानकारी", + "tools_count": "{0} टूल", + "tools_stats": "{0} टूल ({1} सक्षम / {2} अक्षम)", + "quick_config_title": "MCP क्लाइंट त्वरित कॉन्फ़िगरेशन", + "quick_config_desc": "वर्तमान MCP सर्वर को मुख्यधारा के AI एडिटर और CLI टूल में स्वतः कॉन्फ़िगर करें", + "server_info": "सर्वर जानकारी", + "server_name_label": "सर्वर नाम", + "server_address": "सर्वर पता", + "timeout_ms": "टाइमआउट (ms)", + "auto_config_title": "स्वतः कॉन्फ़िग (IDE एडिटर + Codex CLI)", + "add_all": "सभी जोड़ें", + "remove_all": "सभी हटाएँ", + "auto_config_note": "कॉन्फ़िग फ़ाइलें स्वतः संशोधित करने के लिए बटन दबाएँ (Cursor, Windsurf, Trae, Codex CLI)", + "configured": "कॉन्फ़िगर किया गया", + "not_configured": "कॉन्फ़िगर नहीं किया गया", + "auto_config_btn": "स्वतः कॉन्फ़िग", + "delete_btn": "हटाएँ", + "copy_config": "कॉन्फ़िग कॉपी करें", + "open_config": "कॉन्फ़िग खोलें", + "manual_config_title": "मैनुअल कॉन्फ़िग (Claude CLI + Gemini CLI)", + "refresh_commands": "कमांड रिफ़्रेश करें", + "manual_config_note": "निम्नलिखित CLI टूल के लिए टर्मिनल में कमांड मैनुअल रूप से चलाना आवश्यक है", + "config_scope": "कॉन्फ़िग स्कोप:", + "scope_user": "यूज़र स्तर", + "scope_project": "प्रोजेक्ट स्तर", + "operation_log": "ऑपरेशन लॉग", + "no_logs": "कोई ऑपरेशन रिकॉर्ड नहीं", + "copyright_line": "© 2025 LiDaxian - Cocos Creator MCP Server v{0}", + "protocol_line": "Streamable HTTP प्रोटोकॉल पर आधारित (MCP 2025-03-26)", + "tools_copyright_line1": "टूल सिस्टम - 13 intent-level टूल, 150+ एडिटर ऑपरेशन, action कोड डिस्पैच", + "config_copyright_line1": "त्वरित कॉन्फ़िग - Cursor, Windsurf, Trae, Codex CLI, Claude CLI, Gemini CLI समर्थित", + "email_required": "कृपया ईमेल और एक्टिवेशन कोड दर्ज करें", + "permanent_label": "स्थायी", + "logout_button": "लॉग आउट", + "invite_code_label": "आमंत्रण कोड", + "copy_button": "कॉपी करें", + "change_code_button": "कोड बदलें", + "change_code_title": "एक्टिवेशन कोड बदलें", + "change_code_desc": "अपना नया एक्टिवेशन कोड दर्ज करें। पहले वर्तमान डिवाइस बाइंडिंग हटाई जाएगी।", + "confirm_change": "पुष्टि करें", + "cancel": "रद्द करें", + "code_required": "कृपया एक्टिवेशन कोड दर्ज करें", + "expiry_inline_warning": "जल्द समाप्त हो रहा है!", + "store_purchase_hint": "यदि आपने यह प्लगइन Cocos Store से खरीदा है, तो एक्टिवेशन कोड पाने के लिए कृपया मुझसे संपर्क करें।", + "license_expired_title": "लाइसेंस समाप्त", + "license_expired_message": "आपका लाइसेंस समाप्त हो चुका है और सर्वर शुरू नहीं किया जा सकता। जारी रखने के लिए कृपया नवीनीकरण करें या पुनः सक्रिय करें।", + "go_to_login": "लॉगिन पर जाएँ", + + "log_load_config_failed": "कॉन्फ़िग स्थिति लोड करने में विफल: {0}", + "log_gen_cli_failed": "CLI कमांड बनाने में विफल: {0}", + "log_add_client_failed": "{0} में जोड़ने में विफल: {1}", + "log_remove_client_failed": "{0} से हटाने में विफल: {1}", + "quick_config_dialog_title": "वन-क्लिक कॉन्फ़िगरेशन", + "config_operation_failed": "कॉन्फ़िगरेशन ऑपरेशन विफल", + "config_file_not_found_changed_path": "कॉन्फ़िगरेशन विफल: कॉन्फ़िग फ़ाइल नहीं मिली। संभव है कि {0} किसी कस्टम पथ पर इंस्टॉल हो।", + "log_batch_add_failed": "बैच जोड़ना विफल: {0}", + "log_batch_remove_failed": "बैच हटाना विफल: {0}", + "log_copied_config": "{0} का कॉन्फ़िग क्लिपबोर्ड पर कॉपी किया गया", + "log_gen_config_failed": "कॉन्फ़िग बनाने में विफल", + "log_copy_config_failed": "कॉन्फ़िग कॉपी करने में विफल: {0}", + "log_copied_command": "{0} की कमांड क्लिपबोर्ड पर कॉपी की गई", + "log_copy_command_failed": "कमांड कॉपी करने में विफल: {0}", + "log_opened_config_file": "कॉन्फ़िग फ़ाइल खोली गई: {0}", + "log_open_config_failed": "कॉन्फ़िग फ़ाइल खोलने में विफल", + "log_open_config_error": "कॉन्फ़िग फ़ाइल खोलने में विफल: {0}", + + "update_available_title": "अपडेट उपलब्ध", + "update_new_version": "नया संस्करण v{0} उपलब्ध है!", + "update_now": "अभी अपडेट करें", + "update_not_now": "अभी नहीं", + "update_skip_version": "v{0} छोड़ें", + "check_for_updates": "अपडेट जाँचें", + "update_checking": "जाँच हो रही है...", + "update_no_update": "आप नवीनतम संस्करण का उपयोग कर रहे हैं", + "update_urgency_critical": "अत्यावश्यक अपडेट", + "update_urgency_high": "महत्वपूर्ण अपडेट", + "update_current_version": "वर्तमान संस्करण: v{0}", + "update_changelog": "परिवर्तन सूची" + ,"update_changelog_empty": "इस संस्करण के लिए कोई रिलीज़ नोट नहीं दिया गया है।" + ,"subscription_login_title": "VberAI सब्सक्रिप्शन खाता" + ,"subscription_password_label": "पासवर्ड" + ,"subscription_password_placeholder": "पासवर्ड दर्ज करें" + ,"subscription_login_button": "VberAI से साइन इन करें" + ,"subscription_google_button": "Google से साइन इन करें" + ,"subscription_google_pending": "ब्राउज़र खुल गया है। Google प्राधिकरण पूरा करें, फिर Cocos Creator पर वापस आएँ।" + ,"subscription_google_pending_button": "Google प्राधिकरण की प्रतीक्षा है..." + ,"subscription_register_button": "VberAI खाता बनाएँ" + ,"subscription_logging_in": "साइन इन हो रहा है..." + ,"subscription_credentials_required": "कृपया ईमेल और पासवर्ड दर्ज करें" + ,"subscription_login_success": "सब्सक्रिप्शन खाते से साइन इन हो गया" + ,"subscription_login_failed": "सब्सक्रिप्शन साइन-इन विफल" + ,"subscription_not_entitled": "आपकी वर्तमान सब्सक्रिप्शन में Cocos 3.x MCP शामिल नहीं है। जारी रखने के लिए अपग्रेड करें।" + ,"subscription_upgrade_to": "इस उत्पाद का उपयोग करने के लिए {0} में अपग्रेड करें" + ,"subscription_upgrade_action": "सब्सक्रिप्शन अपग्रेड करें" + ,"subscription_logged_in": "साइन-इन खाता" + ,"subscription_choose_button": "VberAI सब्सक्रिप्शन खाता" + ,"license_choose_button": "एक्टिवेशन कोड" + ,"subscription_method_label": "सब्सक्रिप्शन" + ,"back_to_login_choices": "← दूसरी साइन-इन विधि चुनें" + ,"subscription_signed_out_other_device": "साइन आउट: आपका खाता किसी अन्य डिवाइस पर उपयोग किया गया।" + ,"subscription_google_cancelled": "Google साइन-इन रद्द कर दिया गया।" + ,"subscription_request_timeout": "अनुरोध का समय समाप्त हो गया। अपना नेटवर्क जाँचें और पुनः प्रयास करें।" + ,"subscription_network_error": "नेटवर्क कनेक्शन विफल। अपना नेटवर्क जाँचें और पुनः प्रयास करें।" + ,"subscription_server_error": "सर्वर ने अमान्य प्रतिक्रिया लौटाई। बाद में पुनः प्रयास करें।" + ,"subscription_google_authorization_failed": "Google प्राधिकरण पूरा नहीं हुआ। कृपया पुनः प्रयास करें।" + ,"lan_access_label": "LAN एक्सेस की अनुमति दें" + ,"lan_access_warning": "0.0.0.0 से बाइंड किया गया। इस नेटवर्क पर कोई भी व्यक्ति कनेक्ट करके एडिटर चला सकता है — यह एंडपॉइंट किसी भी क्रेडेंशियल की जाँच नहीं करता। केवल विश्वसनीय नेटवर्क पर ही सक्षम करें।" + ,"lan_address": "LAN पता" +}; diff --git a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/id.js b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/id.js new file mode 100644 index 0000000..2629e2d --- /dev/null +++ b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/id.js @@ -0,0 +1,259 @@ +"use strict"; + +module.exports = { + "extension_name": "Cocos MCP Server", + "description": "Server AI MCP untuk Cocos Creator 3.8", + "panel_title": "Server MCP", + "open_panel": "Buka Panel MCP", + "start_server": "Mulai Server", + "stop_server": "Hentikan Server", + "server_status": "Status Server", + "port": "Port", + "settings": "Pengaturan", + "connected": "Terhubung", + "disconnected": "Terputus", + "server_running": "Server berjalan di port {0}", + "server_stopped": "Server telah berhenti", + "auto_start": "Mulai Otomatis", + "debug_log": "Log Debug", + "max_connections": "Koneksi Maksimum", + "connection_info": "Info Koneksi", + "http_url": "HTTP URL", + "copy": "Salin", + "save_settings": "Simpan Pengaturan", + "settings_saved": "Pengaturan berhasil disimpan", + "server_started": "Server MCP Dimulai", + "server_stopped_msg": "Server MCP Dihentikan", + "failed_to_start": "Gagal memulai server", + "failed_to_stop": "Gagal menghentikan server", + "failed_to_save": "Gagal menyimpan pengaturan", + "url_copied": "HTTP URL disalin ke papan klip", + "tool_manager": "Pengelola Alat", + "open_tool_manager": "Buka Pengelola Alat", + "create_config": "Buat Konfigurasi", + "edit_config": "Edit Konfigurasi", + "delete_config": "Hapus Konfigurasi", + "import_config": "Impor Konfigurasi", + "export_config": "Ekspor Konfigurasi", + "apply_config": "Terapkan Konfigurasi", + "select_all": "Pilih Semua", + "deselect_all": "Batalkan Semua Pilihan", + "save_changes": "Simpan Perubahan", + "config_name": "Nama Konfigurasi", + "config_description": "Deskripsi Konfigurasi", + "current_config": "Konfigurasi Saat Ini", + "tool_management": "Manajemen Alat", + "total_tools": "Total Alat", + "enabled_tools": "Aktif", + "disabled_tools": "Nonaktif", + "no_config_selected": "Tidak Ada Konfigurasi Dipilih", + "select_config_first": "Silakan pilih konfigurasi atau buat yang baru terlebih dahulu", + "config_created": "Konfigurasi berhasil dibuat", + "config_updated": "Konfigurasi berhasil diperbarui", + "config_deleted": "Konfigurasi berhasil dihapus", + "config_applied": "Konfigurasi berhasil diterapkan", + "config_exported": "Konfigurasi berhasil diekspor", + "config_imported": "Konfigurasi berhasil diimpor", + "confirm_delete": "Konfirmasi Penghapusan", + "delete_config_confirm": "Anda yakin ingin menghapus konfigurasi \"{0}\"? Tindakan ini tidak dapat dibatalkan.", + "max_config_slots_reached": "Slot konfigurasi maksimum tercapai ({0})", + "invalid_config_format": "Format konfigurasi tidak valid", + "invalid_json_format": "Format JSON atau struktur konfigurasi tidak valid", + "server_tab": "Server", + "tools_tab": "Manajemen Alat", + "available_tools": "Alat Tersedia", + "scene_tools": "Alat Scene", + "node_tools": "Alat Node", + "component_tools": "Alat Komponen", + "prefab_tools": "Alat Prefab", + "project_tools": "Alat Proyek", + "debug_tools": "Alat Debug", + "preferences_tools": "Preferensi", + "server_tools": "Alat Server", + "broadcast_tools": "Alat Siaran", + "scene_advanced_tools": "Alat Scene Lanjutan", + "scene_view_tools": "Alat Tampilan Scene", + "reference_image_tools": "Alat Gambar Referensi", + "asset_advanced_tools": "Alat Aset Lanjutan", + "validation_tools": "Alat Validasi", + "brand_name": "LiDaxian MCP Series", + "brand_subtitle": "LiDaxian MCP Series", + "contact_email": "Email", + "contact_wechat": "WeChat", + "contact_github": "GitHub", + "machine_id_label": "ID Mesin", + "purchase_renew": "Beli / Perpanjang", + "purchase_url": "https://www.vberai.com/game-engines/cocos", + "auth_title": "Pilih metode masuk", + "auth_subtitle": "Masukkan email dan kode aktivasi Anda", + "auth_choose_subtitle": "Pilih metode masuk untuk melanjutkan", + "email_label": "Alamat Email", + "activation_code_label": "Kode Aktivasi", + "email_placeholder": "Masukkan email", + "code_placeholder": "Masukkan kode (XXXXX-XXXXX-XXXXX-XXXXX-XXXXX)", + "activate_button": "Aktifkan", + "deactivate_button": "Nonaktifkan", + "activating": "Mengaktifkan...", + "deactivating": "Menonaktifkan...", + "license_status": "Status Lisensi", + "license_type": "Jenis Lisensi", + "expiry_date": "Tanggal Kedaluwarsa", + "days_remaining": "Sisa Hari", + "days_unit": "hr", + "permanent": "Permanen", + "expiry_warning_title": "Lisensi Segera Kedaluwarsa", + "expiry_warning_message": "Lisensi Anda akan kedaluwarsa dalam {0} hari. Silakan perpanjang agar layanan tidak terputus.", + "renew_now": "Perpanjang Sekarang", + "i_understand": "Saya Mengerti", + "activation_success": "Lisensi berhasil diaktifkan!", + "activation_failed": "Aktivasi gagal: {0}", + "invalid_code": "Format kode aktivasi tidak valid", + "purchase_license": "Beli Lisensi", + "renew_license": "Perpanjang Lisensi", + "contact_support": "Dukungan", + "language_switch": "Bahasa Indonesia", + "version_label": "Versi", + "license_required": "Lisensi diperlukan untuk memulai server", + "license_check_failed": "Pemeriksaan lisensi gagal", + + "status_stopped": "Berhenti", + "status_running": "Berjalan", + "status_error": "Koneksi Gagal", + "config_tab": "Konfigurasi Cepat", + "status_label": "Status", + "connections_count": "Koneksi", + "transport_protocol": "Protokol Transport", + "transport_type": "Jenis Transport", + "mcp_url": "MCP URL", + "port_fallback_title": "Port {0} sedang dipakai — beralih ke {1}", + "net_title": "Jaringan / Proxy", + "net_direct": "Koneksi langsung", + "net_via": "via {0} ({1})", + "net_source_manual": "manual", + "net_source_env": "variabel lingkungan", + "net_source_system": "pengaturan sistem", + "net_mode_auto": "Deteksi otomatis", + "net_mode_manual": "Manual", + "net_mode_off": "Tanpa proxy", + "net_save": "Simpan", + "net_test": "Uji koneksi", + "net_testing": "Menguji…", + "net_test_ok": "Terhubung ({0} ms)", + "net_test_fail": "Gagal: {0}", + "net_hint": "Timeout login biasanya masalah jaringan. Jika memakai VPN/proxy, masukkan alamatnya (mis. http://127.0.0.1:7890) atau alihkan klien ke mode global (TUN).", + "net_pac_warning": "Sistem memakai skrip PAC yang tidak bisa dibaca plugin. Pilih Manual dan masukkan alamat proxy.", + "port_label": "Port", + "auto_start_label": "Mulai Otomatis", + "debug_log_label": "Log Debug", + "max_connections_label": "Koneksi Maksimum", + "server_settings_title": "Pengaturan Server", + "server_status_title": "Status Server", + "connection_info_title": "Info Koneksi", + "tools_count": "{0} alat", + "tools_stats": "{0} alat ({1} aktif / {2} nonaktif)", + "quick_config_title": "Konfigurasi Cepat Klien MCP", + "quick_config_desc": "Konfigurasikan server MCP saat ini secara otomatis ke editor AI dan alat CLI populer", + "server_info": "Info Server", + "server_name_label": "Nama Server", + "server_address": "Alamat Server", + "timeout_ms": "Batas Waktu (md)", + "auto_config_title": "Konfigurasi Otomatis (Editor IDE + Codex CLI)", + "add_all": "Tambah Semua", + "remove_all": "Hapus Semua", + "auto_config_note": "Klik tombol untuk mengubah file konfigurasi secara otomatis (Cursor, Windsurf, Trae, Codex CLI)", + "configured": "Terkonfigurasi", + "not_configured": "Belum Dikonfigurasi", + "auto_config_btn": "Konfigurasi Otomatis", + "delete_btn": "Hapus", + "copy_config": "Salin Konfigurasi", + "open_config": "Buka Konfigurasi", + "manual_config_title": "Konfigurasi Manual (Claude CLI + Gemini CLI)", + "refresh_commands": "Segarkan Perintah", + "manual_config_note": "Alat CLI berikut perlu menjalankan perintah terminal secara manual", + "config_scope": "Cakupan Konfigurasi:", + "scope_user": "Tingkat Pengguna", + "scope_project": "Tingkat Proyek", + "operation_log": "Log Operasi", + "no_logs": "Tidak ada catatan operasi", + "copyright_line": "© 2025 LiDaxian - Cocos Creator MCP Server v{0}", + "protocol_line": "Berbasis Protokol Streamable HTTP (MCP 2025-03-26)", + "tools_copyright_line1": "Sistem Alat - 13 alat tingkat intent, 150+ operasi editor, dispatch berbasis kode action", + "config_copyright_line1": "Konfigurasi Cepat - Mendukung Cursor, Windsurf, Trae, Codex CLI, Claude CLI, Gemini CLI", + "email_required": "Silakan masukkan email dan kode aktivasi", + "permanent_label": "Permanen", + "logout_button": "Keluar", + "invite_code_label": "Kode Undangan", + "copy_button": "Salin", + "change_code_button": "Ganti Kode", + "change_code_title": "Ganti Kode Aktivasi", + "change_code_desc": "Masukkan kode aktivasi baru Anda. Ikatan perangkat saat ini akan dilepas terlebih dahulu.", + "confirm_change": "Konfirmasi", + "cancel": "Batal", + "code_required": "Silakan masukkan kode aktivasi", + "expiry_inline_warning": "Segera kedaluwarsa!", + "store_purchase_hint": "Jika Anda membeli plugin ini dari Cocos Store, silakan hubungi saya untuk mendapatkan kode aktivasi.", + "license_expired_title": "Lisensi Kedaluwarsa", + "license_expired_message": "Lisensi Anda telah kedaluwarsa dan server tidak dapat dimulai. Silakan perpanjang atau aktifkan ulang untuk melanjutkan.", + "go_to_login": "Ke Halaman Masuk", + + "log_load_config_failed": "Gagal memuat status konfigurasi: {0}", + "log_gen_cli_failed": "Gagal membuat perintah CLI: {0}", + "log_add_client_failed": "Gagal menambahkan ke {0}: {1}", + "log_remove_client_failed": "Gagal menghapus dari {0}: {1}", + "quick_config_dialog_title": "Konfigurasi Sekali Klik", + "config_operation_failed": "Operasi konfigurasi gagal", + "config_file_not_found_changed_path": "Konfigurasi gagal: file konfigurasi tidak ditemukan. {0} mungkin terpasang di path kustom.", + "log_batch_add_failed": "Penambahan massal gagal: {0}", + "log_batch_remove_failed": "Penghapusan massal gagal: {0}", + "log_copied_config": "Konfigurasi {0} disalin ke papan klip", + "log_gen_config_failed": "Gagal membuat konfigurasi", + "log_copy_config_failed": "Gagal menyalin konfigurasi: {0}", + "log_copied_command": "Perintah {0} disalin ke papan klip", + "log_copy_command_failed": "Gagal menyalin perintah: {0}", + "log_opened_config_file": "File konfigurasi dibuka: {0}", + "log_open_config_failed": "Gagal membuka file konfigurasi", + "log_open_config_error": "Gagal membuka file konfigurasi: {0}", + + "update_available_title": "Pembaruan Tersedia", + "update_new_version": "Versi baru v{0} sudah tersedia!", + "update_now": "Perbarui Sekarang", + "update_not_now": "Nanti Saja", + "update_skip_version": "Lewati v{0}", + "check_for_updates": "Periksa Pembaruan", + "update_checking": "Memeriksa...", + "update_no_update": "Anda sudah menggunakan versi terbaru", + "update_urgency_critical": "Pembaruan Kritis", + "update_urgency_high": "Pembaruan Penting", + "update_current_version": "Versi saat ini: v{0}", + "update_changelog": "Catatan Perubahan" + ,"update_changelog_empty": "Tidak ada catatan rilis untuk versi ini." + ,"subscription_login_title": "Akun langganan VberAI" + ,"subscription_password_label": "Kata Sandi" + ,"subscription_password_placeholder": "Masukkan kata sandi" + ,"subscription_login_button": "Masuk dengan VberAI" + ,"subscription_google_button": "Masuk dengan Google" + ,"subscription_google_pending": "Browser telah dibuka. Selesaikan otorisasi Google, lalu kembali ke Cocos Creator." + ,"subscription_google_pending_button": "Menunggu otorisasi Google..." + ,"subscription_register_button": "Buat akun VberAI" + ,"subscription_logging_in": "Sedang masuk..." + ,"subscription_credentials_required": "Silakan masukkan email dan kata sandi" + ,"subscription_login_success": "Akun langganan berhasil masuk" + ,"subscription_login_failed": "Gagal masuk dengan akun langganan" + ,"subscription_not_entitled": "Langganan Anda saat ini tidak mencakup Cocos 3.x MCP. Tingkatkan untuk melanjutkan." + ,"subscription_upgrade_to": "Tingkatkan ke {0} untuk menggunakan produk ini" + ,"subscription_upgrade_action": "Tingkatkan langganan" + ,"subscription_logged_in": "Akun yang masuk" + ,"subscription_choose_button": "Akun langganan VberAI" + ,"license_choose_button": "Kode aktivasi" + ,"subscription_method_label": "Langganan" + ,"back_to_login_choices": "← Pilih metode masuk lain" + ,"subscription_signed_out_other_device": "Keluar: akun Anda digunakan di perangkat lain." + ,"subscription_google_cancelled": "Masuk dengan Google dibatalkan." + ,"subscription_request_timeout": "Permintaan kehabisan waktu. Periksa jaringan Anda dan coba lagi." + ,"subscription_network_error": "Koneksi jaringan gagal. Periksa jaringan Anda dan coba lagi." + ,"subscription_server_error": "Server mengembalikan respons tidak valid. Coba lagi nanti." + ,"subscription_google_authorization_failed": "Otorisasi Google tidak selesai. Silakan coba lagi." + ,"lan_access_label": "Izinkan akses LAN" + ,"lan_access_warning": "Terikat ke 0.0.0.0. Siapa pun di jaringan ini dapat terhubung dan mengendalikan editor — endpoint ini tidak memverifikasi kredensial apa pun. Aktifkan hanya di jaringan tepercaya." + ,"lan_address": "Alamat LAN" +}; diff --git a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/it.js b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/it.js new file mode 100644 index 0000000..ebecc36 --- /dev/null +++ b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/it.js @@ -0,0 +1,259 @@ +"use strict"; + +module.exports = { + "extension_name": "Cocos MCP Server", + "description": "Server AI MCP per Cocos Creator 3.8", + "panel_title": "Server MCP", + "open_panel": "Apri pannello MCP", + "start_server": "Avvia server", + "stop_server": "Arresta server", + "server_status": "Stato del server", + "port": "Porta", + "settings": "Impostazioni", + "connected": "Connesso", + "disconnected": "Disconnesso", + "server_running": "Il server è in esecuzione sulla porta {0}", + "server_stopped": "Il server è stato arrestato", + "auto_start": "Avvio automatico", + "debug_log": "Log di debug", + "max_connections": "Connessioni massime", + "connection_info": "Info connessione", + "http_url": "URL HTTP", + "copy": "Copia", + "save_settings": "Salva impostazioni", + "settings_saved": "Impostazioni salvate correttamente", + "server_started": "Server MCP avviato", + "server_stopped_msg": "Server MCP arrestato", + "failed_to_start": "Impossibile avviare il server", + "failed_to_stop": "Impossibile arrestare il server", + "failed_to_save": "Impossibile salvare le impostazioni", + "url_copied": "URL HTTP copiato negli appunti", + "tool_manager": "Gestore strumenti", + "open_tool_manager": "Apri gestore strumenti", + "create_config": "Crea configurazione", + "edit_config": "Modifica configurazione", + "delete_config": "Elimina configurazione", + "import_config": "Importa configurazione", + "export_config": "Esporta configurazione", + "apply_config": "Applica configurazione", + "select_all": "Seleziona tutto", + "deselect_all": "Deseleziona tutto", + "save_changes": "Salva modifiche", + "config_name": "Nome configurazione", + "config_description": "Descrizione configurazione", + "current_config": "Configurazione corrente", + "tool_management": "Gestione strumenti", + "total_tools": "Strumenti totali", + "enabled_tools": "Abilitati", + "disabled_tools": "Disabilitati", + "no_config_selected": "Nessuna configurazione selezionata", + "select_config_first": "Seleziona prima una configurazione oppure creane una nuova", + "config_created": "Configurazione creata correttamente", + "config_updated": "Configurazione aggiornata correttamente", + "config_deleted": "Configurazione eliminata correttamente", + "config_applied": "Configurazione applicata correttamente", + "config_exported": "Configurazione esportata correttamente", + "config_imported": "Configurazione importata correttamente", + "confirm_delete": "Conferma eliminazione", + "delete_config_confirm": "Vuoi davvero eliminare la configurazione \"{0}\"? L'operazione non può essere annullata.", + "max_config_slots_reached": "Raggiunto il numero massimo di slot di configurazione ({0})", + "invalid_config_format": "Formato di configurazione non valido", + "invalid_json_format": "Formato JSON o struttura di configurazione non validi", + "server_tab": "Server", + "tools_tab": "Gestione strumenti", + "available_tools": "Strumenti disponibili", + "scene_tools": "Strumenti scena", + "node_tools": "Strumenti nodo", + "component_tools": "Strumenti componente", + "prefab_tools": "Strumenti prefab", + "project_tools": "Strumenti progetto", + "debug_tools": "Strumenti di debug", + "preferences_tools": "Preferenze", + "server_tools": "Strumenti server", + "broadcast_tools": "Strumenti broadcast", + "scene_advanced_tools": "Strumenti scena avanzati", + "scene_view_tools": "Strumenti vista scena", + "reference_image_tools": "Strumenti immagine di riferimento", + "asset_advanced_tools": "Strumenti asset avanzati", + "validation_tools": "Strumenti di validazione", + "brand_name": "LiDaxian MCP Series", + "brand_subtitle": "LiDaxian MCP Series", + "contact_email": "Email", + "contact_wechat": "WeChat", + "contact_github": "GitHub", + "machine_id_label": "ID macchina", + "purchase_renew": "Acquista / Rinnova", + "purchase_url": "https://www.vberai.com/game-engines/cocos", + "auth_title": "Scegli un metodo di accesso", + "auth_subtitle": "Inserisci la tua email e il codice di attivazione", + "auth_choose_subtitle": "Scegli un metodo di accesso per continuare", + "email_label": "Indirizzo email", + "activation_code_label": "Codice di attivazione", + "email_placeholder": "Inserisci l'email", + "code_placeholder": "Inserisci il codice (XXXXX-XXXXX-XXXXX-XXXXX-XXXXX)", + "activate_button": "Attiva", + "deactivate_button": "Disattiva", + "activating": "Attivazione...", + "deactivating": "Disattivazione...", + "license_status": "Stato licenza", + "license_type": "Tipo di licenza", + "expiry_date": "Data di scadenza", + "days_remaining": "Giorni rimanenti", + "days_unit": "gg", + "permanent": "Permanente", + "expiry_warning_title": "Licenza in scadenza", + "expiry_warning_message": "La tua licenza scadrà tra {0} giorni. Rinnovala per evitare interruzioni del servizio.", + "renew_now": "Rinnova ora", + "i_understand": "Ho capito", + "activation_success": "Licenza attivata correttamente!", + "activation_failed": "Attivazione non riuscita: {0}", + "invalid_code": "Formato del codice di attivazione non valido", + "purchase_license": "Acquista licenza", + "renew_license": "Rinnova licenza", + "contact_support": "Assistenza", + "language_switch": "Italiano", + "version_label": "Versione", + "license_required": "È necessaria una licenza per avviare il server", + "license_check_failed": "Controllo della licenza non riuscito", + + "status_stopped": "Arrestato", + "status_running": "In esecuzione", + "status_error": "Connessione non riuscita", + "config_tab": "Configurazione rapida", + "status_label": "Stato", + "connections_count": "Connessioni", + "transport_protocol": "Protocollo di trasporto", + "transport_type": "Tipo di trasporto", + "mcp_url": "MCP URL", + "port_fallback_title": "Porta {0} occupata — passata a {1}", + "net_title": "Rete / Proxy", + "net_direct": "Connessione diretta", + "net_via": "tramite {0} ({1})", + "net_source_manual": "manuale", + "net_source_env": "variabile d’ambiente", + "net_source_system": "impostazioni di sistema", + "net_mode_auto": "Rilevamento automatico", + "net_mode_manual": "Manuale", + "net_mode_off": "Nessun proxy", + "net_save": "Salva", + "net_test": "Prova connessione", + "net_testing": "Test in corso…", + "net_test_ok": "Connesso ({0} ms)", + "net_test_fail": "Non riuscito: {0}", + "net_hint": "I timeout di accesso sono quasi sempre di rete. Se usi VPN/proxy, inserisci qui l’indirizzo (es. http://127.0.0.1:7890) o imposta il client in modalità globale (TUN).", + "net_pac_warning": "Il sistema usa uno script PAC che questo plugin non può valutare. Passa a Manuale e inserisci l’indirizzo del proxy.", + "port_label": "Porta", + "auto_start_label": "Avvio automatico", + "debug_log_label": "Log di debug", + "max_connections_label": "Connessioni massime", + "server_settings_title": "Impostazioni del server", + "server_status_title": "Stato del server", + "connection_info_title": "Info connessione", + "tools_count": "{0} strumenti", + "tools_stats": "{0} strumenti ({1} abilitati / {2} disabilitati)", + "quick_config_title": "Configurazione rapida dei client MCP", + "quick_config_desc": "Configura automaticamente il server MCP corrente nei principali editor AI e strumenti CLI", + "server_info": "Info server", + "server_name_label": "Nome del server", + "server_address": "Indirizzo del server", + "timeout_ms": "Timeout (ms)", + "auto_config_title": "Configurazione automatica (editor IDE + Codex CLI)", + "add_all": "Aggiungi tutti", + "remove_all": "Rimuovi tutti", + "auto_config_note": "Fai clic sul pulsante per modificare automaticamente i file di configurazione (Cursor, Windsurf, Trae, Codex CLI)", + "configured": "Configurato", + "not_configured": "Non configurato", + "auto_config_btn": "Configurazione automatica", + "delete_btn": "Elimina", + "copy_config": "Copia configurazione", + "open_config": "Apri configurazione", + "manual_config_title": "Configurazione manuale (Claude CLI + Gemini CLI)", + "refresh_commands": "Aggiorna comandi", + "manual_config_note": "I seguenti strumenti CLI richiedono l'esecuzione manuale dei comandi da terminale", + "config_scope": "Ambito configurazione:", + "scope_user": "Livello utente", + "scope_project": "Livello progetto", + "operation_log": "Log operazioni", + "no_logs": "Nessuna operazione registrata", + "copyright_line": "© 2025 LiDaxian - Cocos Creator MCP Server v{0}", + "protocol_line": "Basato sul protocollo Streamable HTTP (MCP 2025-03-26)", + "tools_copyright_line1": "Sistema di strumenti - 13 strumenti a livello di intento, oltre 150 operazioni dell'editor, dispatch tramite codice action", + "config_copyright_line1": "Configurazione rapida - Supporta Cursor, Windsurf, Trae, Codex CLI, Claude CLI, Gemini CLI", + "email_required": "Inserisci email e codice di attivazione", + "permanent_label": "Permanente", + "logout_button": "Esci", + "invite_code_label": "Codice invito", + "copy_button": "Copia", + "change_code_button": "Cambia codice", + "change_code_title": "Cambia codice di attivazione", + "change_code_desc": "Inserisci il nuovo codice di attivazione. L'associazione del dispositivo corrente verrà prima rilasciata.", + "confirm_change": "Conferma", + "cancel": "Annulla", + "code_required": "Inserisci un codice di attivazione", + "expiry_inline_warning": "In scadenza!", + "store_purchase_hint": "Se hai acquistato questo plugin dal Cocos Store, contattami per ricevere il tuo codice di attivazione.", + "license_expired_title": "Licenza scaduta", + "license_expired_message": "La tua licenza è scaduta e il server non può essere avviato. Rinnova o riattiva per continuare.", + "go_to_login": "Vai all'accesso", + + "log_load_config_failed": "Impossibile caricare lo stato della configurazione: {0}", + "log_gen_cli_failed": "Impossibile generare i comandi CLI: {0}", + "log_add_client_failed": "Impossibile aggiungere a {0}: {1}", + "log_remove_client_failed": "Impossibile rimuovere da {0}: {1}", + "quick_config_dialog_title": "Configurazione con un clic", + "config_operation_failed": "Operazione di configurazione non riuscita", + "config_file_not_found_changed_path": "Configurazione non riuscita: file di configurazione non trovato. {0} potrebbe essere installato in un percorso personalizzato.", + "log_batch_add_failed": "Aggiunta in blocco non riuscita: {0}", + "log_batch_remove_failed": "Rimozione in blocco non riuscita: {0}", + "log_copied_config": "Configurazione di {0} copiata negli appunti", + "log_gen_config_failed": "Impossibile generare la configurazione", + "log_copy_config_failed": "Impossibile copiare la configurazione: {0}", + "log_copied_command": "Comando di {0} copiato negli appunti", + "log_copy_command_failed": "Impossibile copiare il comando: {0}", + "log_opened_config_file": "File di configurazione aperto: {0}", + "log_open_config_failed": "Impossibile aprire il file di configurazione", + "log_open_config_error": "Impossibile aprire il file di configurazione: {0}", + + "update_available_title": "Aggiornamento disponibile", + "update_new_version": "La nuova versione v{0} è disponibile!", + "update_now": "Aggiorna ora", + "update_not_now": "Non ora", + "update_skip_version": "Salta v{0}", + "check_for_updates": "Controlla aggiornamenti", + "update_checking": "Controllo in corso...", + "update_no_update": "Stai usando la versione più recente", + "update_urgency_critical": "Aggiornamento critico", + "update_urgency_high": "Aggiornamento importante", + "update_current_version": "Versione corrente: v{0}", + "update_changelog": "Novità" + ,"update_changelog_empty": "Per questa versione non sono state fornite note di rilascio." + ,"subscription_login_title": "Account in abbonamento VberAI" + ,"subscription_password_label": "Password" + ,"subscription_password_placeholder": "Inserisci la password" + ,"subscription_login_button": "Accedi con VberAI" + ,"subscription_google_button": "Accedi con Google" + ,"subscription_google_pending": "Il browser è stato aperto. Completa l'autorizzazione Google, poi torna a Cocos Creator." + ,"subscription_google_pending_button": "In attesa dell'autorizzazione Google..." + ,"subscription_register_button": "Crea un account VberAI" + ,"subscription_logging_in": "Accesso in corso..." + ,"subscription_credentials_required": "Inserisci email e password" + ,"subscription_login_success": "Accesso con account in abbonamento effettuato" + ,"subscription_login_failed": "Accesso con account in abbonamento non riuscito" + ,"subscription_not_entitled": "Il tuo abbonamento attuale non include Cocos 3.x MCP. Esegui l'upgrade per continuare." + ,"subscription_upgrade_to": "Passa a {0} per usare questo prodotto" + ,"subscription_upgrade_action": "Aggiorna abbonamento" + ,"subscription_logged_in": "Account connesso" + ,"subscription_choose_button": "Account in abbonamento VberAI" + ,"license_choose_button": "Codice di attivazione" + ,"subscription_method_label": "Abbonamento" + ,"back_to_login_choices": "← Scegli un altro metodo di accesso" + ,"subscription_signed_out_other_device": "Disconnesso: il tuo account è stato usato su un altro dispositivo." + ,"subscription_google_cancelled": "Accesso con Google annullato." + ,"subscription_request_timeout": "Richiesta scaduta. Controlla la connessione e riprova." + ,"subscription_network_error": "Connessione di rete non riuscita. Controlla la rete e riprova." + ,"subscription_server_error": "Il server ha restituito una risposta non valida. Riprova più tardi." + ,"subscription_google_authorization_failed": "L'autorizzazione Google non è stata completata. Riprova." + ,"lan_access_label": "Consenti accesso dalla rete locale" + ,"lan_access_warning": "Associato a 0.0.0.0. Chiunque su questa rete può connettersi e comandare l'editor: questo endpoint non verifica alcuna credenziale. Attivalo solo su una rete affidabile." + ,"lan_address": "Indirizzo rete locale" +}; diff --git a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/ja.js b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/ja.js index 13369f7..f013f71 100644 --- a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/ja.js +++ b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/ja.js @@ -123,11 +123,23 @@ module.exports = { "transport_protocol": "トランスポートプロトコル", "transport_type": "トランスポートタイプ", "mcp_url": "MCP URL", - "port_fallback_title": "ポート {0} が使用できないため、{1} に切り替えました", - "port_fallback_reason": "ポート {0} はシステムに予約されているか、ファイアウォール/ウイルス対策ソフトにブロックされています(Hyper-V、WSL2、Docker を導入した Windows でよく起こります)。サーバーは新しいポートで正常に動作しています。", - "port_fallback_resynced": "次のクライアントの設定を更新しました:{0}。新しいポートを有効にするには再起動してください。", - "port_fallback_no_clients": "AI クライアントを設定済みの場合は、「ワンクリック設定」で新しいポートに設定し直してください。", - "port_fallback_dismiss": "了解", + "port_fallback_title": "ポート {0} は使用中のため {1} に変更しました", + "net_title": "ネットワーク / プロキシ", + "net_direct": "直接接続", + "net_via": "{0} 経由({1})", + "net_source_manual": "手動設定", + "net_source_env": "環境変数", + "net_source_system": "システム設定", + "net_mode_auto": "自動検出", + "net_mode_manual": "手動指定", + "net_mode_off": "プロキシを使わない", + "net_save": "保存", + "net_test": "接続テスト", + "net_testing": "テスト中…", + "net_test_ok": "接続できました({0} ms)", + "net_test_fail": "接続失敗:{0}", + "net_hint": "ログインのタイムアウトはほぼネットワーク起因です。VPN/プロキシ利用時はここにアドレス(例: http://127.0.0.1:7890)を入力するか、クライアントをグローバル(TUN)モードに切り替えてください。", + "net_pac_warning": "システムが PAC 自動設定スクリプトを使用しており、本プラグインでは解釈できません。「手動指定」にしてアドレスを入力してください。", "port_label": "ポート", "auto_start_label": "自動起動", "debug_log_label": "デバッグログ", @@ -240,4 +252,7 @@ module.exports = { "subscription_network_error": "ネットワーク接続に失敗しました。ネットワークを確認して再試行してください。", "subscription_server_error": "サーバーから無効な応答が返されました。後でもう一度お試しください。", "subscription_google_authorization_failed": "Google 認証が完了しませんでした。もう一度お試しください。" + ,"lan_access_label": "LAN アクセスを許可" + ,"lan_access_warning": "0.0.0.0 にバインドしています。同じネットワーク上の誰でも接続してエディターを操作できます。このエンドポイントは資格情報を一切検証しません。信頼できるネットワークでのみ有効にしてください。" + ,"lan_address": "LAN アドレス" }; diff --git a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/ko.js b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/ko.js index f94637f..ab7d862 100644 --- a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/ko.js +++ b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/ko.js @@ -123,11 +123,23 @@ module.exports = { "transport_protocol": "전송 프로토콜", "transport_type": "전송 유형", "mcp_url": "MCP URL", - "port_fallback_title": "포트 {0}을(를) 사용할 수 없어 {1}(으)로 전환했습니다", - "port_fallback_reason": "포트 {0}이(가) 시스템에 예약되어 있거나 방화벽/백신에 의해 차단되었습니다(Hyper-V, WSL2 또는 Docker가 설치된 Windows에서 흔합니다). 서버는 새 포트에서 정상 실행 중입니다.", - "port_fallback_resynced": "다음 클라이언트의 설정을 업데이트했습니다: {0}. 새 포트를 적용하려면 다시 시작하세요.", - "port_fallback_no_clients": "AI 클라이언트를 설정한 적이 있다면 \"원클릭 설정\"에서 새 포트로 다시 설정하세요.", - "port_fallback_dismiss": "확인", + "port_fallback_title": "포트 {0}이(가) 사용 중이어서 {1}(으)로 변경했습니다", + "net_title": "네트워크 / 프록시", + "net_direct": "직접 연결", + "net_via": "{0} 경유({1})", + "net_source_manual": "직접 입력", + "net_source_env": "환경 변수", + "net_source_system": "시스템 설정", + "net_mode_auto": "자동 감지", + "net_mode_manual": "직접 지정", + "net_mode_off": "프록시 사용 안 함", + "net_save": "저장", + "net_test": "연결 테스트", + "net_testing": "테스트 중…", + "net_test_ok": "연결 성공({0} ms)", + "net_test_fail": "연결 실패: {0}", + "net_hint": "로그인 시간 초과는 대개 네트워크 문제입니다. VPN/프록시를 쓰면 주소(예: http://127.0.0.1:7890)를 입력하거나 클라이언트를 전역(TUN) 모드로 바꾸세요.", + "net_pac_warning": "시스템이 PAC 자동 구성 스크립트를 사용하며 플러그인이 해석할 수 없습니다. 「직접 지정」으로 바꿔 주소를 입력하세요.", "port_label": "포트", "auto_start_label": "자동 시작", "debug_log_label": "디버그 로그", @@ -240,4 +252,7 @@ module.exports = { "subscription_network_error": "네트워크 연결에 실패했습니다. 네트워크를 확인하고 다시 시도하세요.", "subscription_server_error": "서버가 잘못된 응답을 반환했습니다. 나중에 다시 시도하세요.", "subscription_google_authorization_failed": "Google 인증이 완료되지 않았습니다. 다시 시도하세요." + ,"lan_access_label": "LAN 접근 허용" + ,"lan_access_warning": "0.0.0.0에 바인딩되었습니다. 같은 네트워크의 누구나 연결해 에디터를 조작할 수 있으며, 이 엔드포인트는 자격 증명을 검증하지 않습니다. 신뢰할 수 있는 네트워크에서만 사용하세요." + ,"lan_address": "LAN 주소" }; diff --git a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/ms.js b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/ms.js new file mode 100644 index 0000000..cdd45a7 --- /dev/null +++ b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/ms.js @@ -0,0 +1,259 @@ +"use strict"; + +module.exports = { + "extension_name": "Cocos MCP Server", + "description": "Pelayan AI MCP untuk Cocos Creator 3.8", + "panel_title": "Pelayan MCP", + "open_panel": "Buka Panel MCP", + "start_server": "Mulakan Pelayan", + "stop_server": "Hentikan Pelayan", + "server_status": "Status Pelayan", + "port": "Port", + "settings": "Tetapan", + "connected": "Disambungkan", + "disconnected": "Terputus", + "server_running": "Pelayan sedang berjalan pada port {0}", + "server_stopped": "Pelayan telah berhenti", + "auto_start": "Mula Automatik", + "debug_log": "Log Nyahpepijat", + "max_connections": "Sambungan Maksimum", + "connection_info": "Maklumat Sambungan", + "http_url": "HTTP URL", + "copy": "Salin", + "save_settings": "Simpan Tetapan", + "settings_saved": "Tetapan berjaya disimpan", + "server_started": "Pelayan MCP Dimulakan", + "server_stopped_msg": "Pelayan MCP Dihentikan", + "failed_to_start": "Gagal memulakan pelayan", + "failed_to_stop": "Gagal menghentikan pelayan", + "failed_to_save": "Gagal menyimpan tetapan", + "url_copied": "HTTP URL disalin ke papan keratan", + "tool_manager": "Pengurus Alat", + "open_tool_manager": "Buka Pengurus Alat", + "create_config": "Cipta Konfigurasi", + "edit_config": "Edit Konfigurasi", + "delete_config": "Padam Konfigurasi", + "import_config": "Import Konfigurasi", + "export_config": "Eksport Konfigurasi", + "apply_config": "Guna Konfigurasi", + "select_all": "Pilih Semua", + "deselect_all": "Nyahpilih Semua", + "save_changes": "Simpan Perubahan", + "config_name": "Nama Konfigurasi", + "config_description": "Penerangan Konfigurasi", + "current_config": "Konfigurasi Semasa", + "tool_management": "Pengurusan Alat", + "total_tools": "Jumlah Alat", + "enabled_tools": "Didayakan", + "disabled_tools": "Dilumpuhkan", + "no_config_selected": "Tiada Konfigurasi Dipilih", + "select_config_first": "Sila pilih konfigurasi atau cipta yang baharu terlebih dahulu", + "config_created": "Konfigurasi berjaya dicipta", + "config_updated": "Konfigurasi berjaya dikemas kini", + "config_deleted": "Konfigurasi berjaya dipadam", + "config_applied": "Konfigurasi berjaya digunakan", + "config_exported": "Konfigurasi berjaya dieksport", + "config_imported": "Konfigurasi berjaya diimport", + "confirm_delete": "Sahkan Pemadaman", + "delete_config_confirm": "Adakah anda pasti mahu memadam konfigurasi \"{0}\"? Tindakan ini tidak boleh dibatalkan.", + "max_config_slots_reached": "Slot konfigurasi maksimum telah dicapai ({0})", + "invalid_config_format": "Format konfigurasi tidak sah", + "invalid_json_format": "Format JSON atau struktur konfigurasi tidak sah", + "server_tab": "Pelayan", + "tools_tab": "Pengurusan Alat", + "available_tools": "Alat Tersedia", + "scene_tools": "Alat Scene", + "node_tools": "Alat Node", + "component_tools": "Alat Komponen", + "prefab_tools": "Alat Prefab", + "project_tools": "Alat Projek", + "debug_tools": "Alat Nyahpepijat", + "preferences_tools": "Keutamaan", + "server_tools": "Alat Pelayan", + "broadcast_tools": "Alat Siaran", + "scene_advanced_tools": "Alat Scene Lanjutan", + "scene_view_tools": "Alat Paparan Scene", + "reference_image_tools": "Alat Imej Rujukan", + "asset_advanced_tools": "Alat Aset Lanjutan", + "validation_tools": "Alat Pengesahan", + "brand_name": "LiDaxian MCP Series", + "brand_subtitle": "LiDaxian MCP Series", + "contact_email": "E-mel", + "contact_wechat": "WeChat", + "contact_github": "GitHub", + "machine_id_label": "ID Mesin", + "purchase_renew": "Beli / Perbaharui", + "purchase_url": "https://www.vberai.com/game-engines/cocos", + "auth_title": "Pilih kaedah log masuk", + "auth_subtitle": "Masukkan e-mel dan kod pengaktifan anda", + "auth_choose_subtitle": "Pilih kaedah log masuk untuk meneruskan", + "email_label": "Alamat E-mel", + "activation_code_label": "Kod Pengaktifan", + "email_placeholder": "Masukkan e-mel", + "code_placeholder": "Masukkan kod (XXXXX-XXXXX-XXXXX-XXXXX-XXXXX)", + "activate_button": "Aktifkan", + "deactivate_button": "Nyahaktifkan", + "activating": "Mengaktifkan...", + "deactivating": "Menyahaktifkan...", + "license_status": "Status Lesen", + "license_type": "Jenis Lesen", + "expiry_date": "Tarikh Tamat Tempoh", + "days_remaining": "Baki Hari", + "days_unit": "hr", + "permanent": "Kekal", + "expiry_warning_title": "Lesen Akan Tamat Tempoh", + "expiry_warning_message": "Lesen anda akan tamat tempoh dalam {0} hari. Sila perbaharui bagi mengelakkan gangguan perkhidmatan.", + "renew_now": "Perbaharui Sekarang", + "i_understand": "Saya Faham", + "activation_success": "Lesen berjaya diaktifkan!", + "activation_failed": "Pengaktifan gagal: {0}", + "invalid_code": "Format kod pengaktifan tidak sah", + "purchase_license": "Beli Lesen", + "renew_license": "Perbaharui Lesen", + "contact_support": "Sokongan", + "language_switch": "Bahasa Melayu", + "version_label": "Versi", + "license_required": "Lesen diperlukan untuk memulakan pelayan", + "license_check_failed": "Pemeriksaan lesen gagal", + + "status_stopped": "Berhenti", + "status_running": "Berjalan", + "status_error": "Sambungan Gagal", + "config_tab": "Konfigurasi Pantas", + "status_label": "Status", + "connections_count": "Sambungan", + "transport_protocol": "Protokol Pengangkutan", + "transport_type": "Jenis Pengangkutan", + "mcp_url": "MCP URL", + "port_fallback_title": "Port {0} sedang digunakan — bertukar ke {1}", + "net_title": "Rangkaian / Proksi", + "net_direct": "Sambungan terus", + "net_via": "melalui {0} ({1})", + "net_source_manual": "manual", + "net_source_env": "pemboleh ubah persekitaran", + "net_source_system": "tetapan sistem", + "net_mode_auto": "Auto-kesan", + "net_mode_manual": "Manual", + "net_mode_off": "Tanpa proksi", + "net_save": "Simpan", + "net_test": "Uji sambungan", + "net_testing": "Menguji…", + "net_test_ok": "Berjaya disambung ({0} ms)", + "net_test_fail": "Gagal: {0}", + "net_hint": "Tamat masa log masuk biasanya masalah rangkaian. Jika guna VPN/proksi, masukkan alamatnya (cth. http://127.0.0.1:7890) atau tukar klien ke mod global (TUN).", + "net_pac_warning": "Sistem menggunakan skrip PAC yang tidak dapat dibaca pemalam. Pilih Manual dan masukkan alamat proksi.", + "port_label": "Port", + "auto_start_label": "Mula Automatik", + "debug_log_label": "Log Nyahpepijat", + "max_connections_label": "Sambungan Maksimum", + "server_settings_title": "Tetapan Pelayan", + "server_status_title": "Status Pelayan", + "connection_info_title": "Maklumat Sambungan", + "tools_count": "{0} alat", + "tools_stats": "{0} alat ({1} didayakan / {2} dilumpuhkan)", + "quick_config_title": "Konfigurasi Pantas Klien MCP", + "quick_config_desc": "Konfigurasikan pelayan MCP semasa secara automatik ke dalam editor AI dan alat CLI arus perdana", + "server_info": "Maklumat Pelayan", + "server_name_label": "Nama Pelayan", + "server_address": "Alamat Pelayan", + "timeout_ms": "Had Masa (ms)", + "auto_config_title": "Konfigurasi Automatik (Editor IDE + Codex CLI)", + "add_all": "Tambah Semua", + "remove_all": "Buang Semua", + "auto_config_note": "Klik butang untuk mengubah fail konfigurasi secara automatik (Cursor, Windsurf, Trae, Codex CLI)", + "configured": "Dikonfigurasi", + "not_configured": "Belum Dikonfigurasi", + "auto_config_btn": "Konfigurasi Automatik", + "delete_btn": "Padam", + "copy_config": "Salin Konfigurasi", + "open_config": "Buka Konfigurasi", + "manual_config_title": "Konfigurasi Manual (Claude CLI + Gemini CLI)", + "refresh_commands": "Muat Semula Arahan", + "manual_config_note": "Alat CLI berikut memerlukan arahan terminal dijalankan secara manual", + "config_scope": "Skop Konfigurasi:", + "scope_user": "Tahap Pengguna", + "scope_project": "Tahap Projek", + "operation_log": "Log Operasi", + "no_logs": "Tiada rekod operasi", + "copyright_line": "© 2025 LiDaxian - Cocos Creator MCP Server v{0}", + "protocol_line": "Berasaskan Protokol Streamable HTTP (MCP 2025-03-26)", + "tools_copyright_line1": "Sistem Alat - 13 alat peringkat niat, 150+ operasi editor, penghantaran berasaskan kod action", + "config_copyright_line1": "Konfigurasi Pantas - Menyokong Cursor, Windsurf, Trae, Codex CLI, Claude CLI, Gemini CLI", + "email_required": "Sila masukkan e-mel dan kod pengaktifan", + "permanent_label": "Kekal", + "logout_button": "Log Keluar", + "invite_code_label": "Kod Jemputan", + "copy_button": "Salin", + "change_code_button": "Tukar Kod", + "change_code_title": "Tukar Kod Pengaktifan", + "change_code_desc": "Masukkan kod pengaktifan baharu anda. Ikatan peranti semasa akan dilepaskan terlebih dahulu.", + "confirm_change": "Sahkan", + "cancel": "Batal", + "code_required": "Sila masukkan kod pengaktifan", + "expiry_inline_warning": "Hampir tamat tempoh!", + "store_purchase_hint": "Jika anda membeli pemalam ini dari Cocos Store, sila hubungi saya untuk mendapatkan kod pengaktifan anda.", + "license_expired_title": "Lesen Tamat Tempoh", + "license_expired_message": "Lesen anda telah tamat tempoh dan pelayan tidak dapat dimulakan. Sila perbaharui atau aktifkan semula untuk meneruskan.", + "go_to_login": "Pergi ke Log Masuk", + + "log_load_config_failed": "Gagal memuatkan status konfigurasi: {0}", + "log_gen_cli_failed": "Gagal menjana arahan CLI: {0}", + "log_add_client_failed": "Gagal menambah ke {0}: {1}", + "log_remove_client_failed": "Gagal membuang daripada {0}: {1}", + "quick_config_dialog_title": "Konfigurasi Satu Klik", + "config_operation_failed": "Operasi konfigurasi gagal", + "config_file_not_found_changed_path": "Konfigurasi gagal: fail konfigurasi tidak ditemui. {0} mungkin dipasang dalam laluan tersuai.", + "log_batch_add_failed": "Penambahan pukal gagal: {0}", + "log_batch_remove_failed": "Pembuangan pukal gagal: {0}", + "log_copied_config": "Konfigurasi {0} disalin ke papan keratan", + "log_gen_config_failed": "Gagal menjana konfigurasi", + "log_copy_config_failed": "Gagal menyalin konfigurasi: {0}", + "log_copied_command": "Arahan {0} disalin ke papan keratan", + "log_copy_command_failed": "Gagal menyalin arahan: {0}", + "log_opened_config_file": "Fail konfigurasi dibuka: {0}", + "log_open_config_failed": "Gagal membuka fail konfigurasi", + "log_open_config_error": "Gagal membuka fail konfigurasi: {0}", + + "update_available_title": "Kemas Kini Tersedia", + "update_new_version": "Versi baharu v{0} telah tersedia!", + "update_now": "Kemas Kini Sekarang", + "update_not_now": "Bukan Sekarang", + "update_skip_version": "Langkau v{0}", + "check_for_updates": "Semak Kemas Kini", + "update_checking": "Menyemak...", + "update_no_update": "Anda sedang menggunakan versi terkini", + "update_urgency_critical": "Kemas Kini Kritikal", + "update_urgency_high": "Kemas Kini Penting", + "update_current_version": "Versi semasa: v{0}", + "update_changelog": "Log Perubahan" + ,"update_changelog_empty": "Tiada nota keluaran disediakan untuk versi ini." + ,"subscription_login_title": "Akaun langganan VberAI" + ,"subscription_password_label": "Kata Laluan" + ,"subscription_password_placeholder": "Masukkan kata laluan" + ,"subscription_login_button": "Log masuk dengan VberAI" + ,"subscription_google_button": "Log masuk dengan Google" + ,"subscription_google_pending": "Pelayar telah dibuka. Selesaikan kebenaran Google, kemudian kembali ke Cocos Creator." + ,"subscription_google_pending_button": "Menunggu kebenaran Google..." + ,"subscription_register_button": "Cipta akaun VberAI" + ,"subscription_logging_in": "Sedang log masuk..." + ,"subscription_credentials_required": "Sila masukkan e-mel dan kata laluan" + ,"subscription_login_success": "Akaun langganan telah log masuk" + ,"subscription_login_failed": "Log masuk akaun langganan gagal" + ,"subscription_not_entitled": "Langganan semasa anda tidak merangkumi Cocos 3.x MCP. Naik taraf untuk meneruskan." + ,"subscription_upgrade_to": "Naik taraf ke {0} untuk menggunakan produk ini" + ,"subscription_upgrade_action": "Naik taraf langganan" + ,"subscription_logged_in": "Akaun yang log masuk" + ,"subscription_choose_button": "Akaun langganan VberAI" + ,"license_choose_button": "Kod pengaktifan" + ,"subscription_method_label": "Langganan" + ,"back_to_login_choices": "← Pilih kaedah log masuk lain" + ,"subscription_signed_out_other_device": "Log keluar: akaun anda digunakan pada peranti lain." + ,"subscription_google_cancelled": "Log masuk Google telah dibatalkan." + ,"subscription_request_timeout": "Permintaan tamat masa. Semak rangkaian anda dan cuba lagi." + ,"subscription_network_error": "Sambungan rangkaian gagal. Semak rangkaian anda dan cuba lagi." + ,"subscription_server_error": "Pelayan mengembalikan respons tidak sah. Cuba lagi kemudian." + ,"subscription_google_authorization_failed": "Kebenaran Google tidak selesai. Sila cuba lagi." + ,"lan_access_label": "Benarkan akses LAN" + ,"lan_access_warning": "Terikat pada 0.0.0.0. Sesiapa sahaja dalam rangkaian ini boleh menyambung dan mengawal editor — endpoint ini tidak mengesahkan sebarang kelayakan. Dayakan hanya pada rangkaian yang dipercayai." + ,"lan_address": "Alamat LAN" +}; diff --git a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/pl.js b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/pl.js new file mode 100644 index 0000000..60e7fa8 --- /dev/null +++ b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/pl.js @@ -0,0 +1,259 @@ +"use strict"; + +module.exports = { + "extension_name": "Cocos MCP Server", + "description": "Serwer AI MCP dla Cocos Creator 3.8", + "panel_title": "Serwer MCP", + "open_panel": "Otwórz panel MCP", + "start_server": "Uruchom serwer", + "stop_server": "Zatrzymaj serwer", + "server_status": "Stan serwera", + "port": "Port", + "settings": "Ustawienia", + "connected": "Połączono", + "disconnected": "Rozłączono", + "server_running": "Serwer działa na porcie {0}", + "server_stopped": "Serwer został zatrzymany", + "auto_start": "Automatyczne uruchamianie", + "debug_log": "Dziennik debugowania", + "max_connections": "Maksymalna liczba połączeń", + "connection_info": "Informacje o połączeniu", + "http_url": "Adres HTTP", + "copy": "Kopiuj", + "save_settings": "Zapisz ustawienia", + "settings_saved": "Ustawienia zapisane pomyślnie", + "server_started": "Serwer MCP uruchomiony", + "server_stopped_msg": "Serwer MCP zatrzymany", + "failed_to_start": "Nie udało się uruchomić serwera", + "failed_to_stop": "Nie udało się zatrzymać serwera", + "failed_to_save": "Nie udało się zapisać ustawień", + "url_copied": "Adres HTTP skopiowano do schowka", + "tool_manager": "Menedżer narzędzi", + "open_tool_manager": "Otwórz menedżera narzędzi", + "create_config": "Utwórz konfigurację", + "edit_config": "Edytuj konfigurację", + "delete_config": "Usuń konfigurację", + "import_config": "Importuj konfigurację", + "export_config": "Eksportuj konfigurację", + "apply_config": "Zastosuj konfigurację", + "select_all": "Zaznacz wszystko", + "deselect_all": "Odznacz wszystko", + "save_changes": "Zapisz zmiany", + "config_name": "Nazwa konfiguracji", + "config_description": "Opis konfiguracji", + "current_config": "Bieżąca konfiguracja", + "tool_management": "Zarządzanie narzędziami", + "total_tools": "Łączna liczba narzędzi", + "enabled_tools": "Włączone", + "disabled_tools": "Wyłączone", + "no_config_selected": "Nie wybrano konfiguracji", + "select_config_first": "Najpierw wybierz konfigurację lub utwórz nową", + "config_created": "Konfiguracja utworzona pomyślnie", + "config_updated": "Konfiguracja zaktualizowana pomyślnie", + "config_deleted": "Konfiguracja usunięta pomyślnie", + "config_applied": "Konfiguracja zastosowana pomyślnie", + "config_exported": "Konfiguracja wyeksportowana pomyślnie", + "config_imported": "Konfiguracja zaimportowana pomyślnie", + "confirm_delete": "Potwierdź usunięcie", + "delete_config_confirm": "Czy na pewno chcesz usunąć konfigurację \"{0}\"? Tej operacji nie można cofnąć.", + "max_config_slots_reached": "Osiągnięto maksymalną liczbę slotów konfiguracji ({0})", + "invalid_config_format": "Nieprawidłowy format konfiguracji", + "invalid_json_format": "Nieprawidłowy format JSON lub struktura konfiguracji", + "server_tab": "Serwer", + "tools_tab": "Zarządzanie narzędziami", + "available_tools": "Dostępne narzędzia", + "scene_tools": "Narzędzia sceny", + "node_tools": "Narzędzia węzłów", + "component_tools": "Narzędzia komponentów", + "prefab_tools": "Narzędzia prefabrykatów", + "project_tools": "Narzędzia projektu", + "debug_tools": "Narzędzia debugowania", + "preferences_tools": "Preferencje", + "server_tools": "Narzędzia serwera", + "broadcast_tools": "Narzędzia rozgłaszania", + "scene_advanced_tools": "Zaawansowane narzędzia sceny", + "scene_view_tools": "Narzędzia widoku sceny", + "reference_image_tools": "Narzędzia obrazu referencyjnego", + "asset_advanced_tools": "Zaawansowane narzędzia zasobów", + "validation_tools": "Narzędzia walidacji", + "brand_name": "LiDaxian MCP Series", + "brand_subtitle": "LiDaxian MCP Series", + "contact_email": "E-mail", + "contact_wechat": "WeChat", + "contact_github": "GitHub", + "machine_id_label": "Identyfikator maszyny", + "purchase_renew": "Kup / Odnów", + "purchase_url": "https://www.vberai.com/game-engines/cocos", + "auth_title": "Wybierz metodę logowania", + "auth_subtitle": "Wprowadź swój e-mail i kod aktywacyjny", + "auth_choose_subtitle": "Wybierz metodę logowania, aby kontynuować", + "email_label": "Adres e-mail", + "activation_code_label": "Kod aktywacyjny", + "email_placeholder": "Wprowadź e-mail", + "code_placeholder": "Wprowadź kod (XXXXX-XXXXX-XXXXX-XXXXX-XXXXX)", + "activate_button": "Aktywuj", + "deactivate_button": "Dezaktywuj", + "activating": "Aktywowanie...", + "deactivating": "Dezaktywowanie...", + "license_status": "Stan licencji", + "license_type": "Typ licencji", + "expiry_date": "Data wygaśnięcia", + "days_remaining": "Pozostałe dni", + "days_unit": "dni", + "permanent": "Bezterminowa", + "expiry_warning_title": "Licencja wkrótce wygaśnie", + "expiry_warning_message": "Twoja licencja wygaśnie za {0} dni. Odnów ją, aby uniknąć przerwy w działaniu usługi.", + "renew_now": "Odnów teraz", + "i_understand": "Rozumiem", + "activation_success": "Licencja aktywowana pomyślnie!", + "activation_failed": "Aktywacja nie powiodła się: {0}", + "invalid_code": "Nieprawidłowy format kodu aktywacyjnego", + "purchase_license": "Kup licencję", + "renew_license": "Odnów licencję", + "contact_support": "Wsparcie", + "language_switch": "Polski", + "version_label": "Wersja", + "license_required": "Do uruchomienia serwera wymagana jest licencja", + "license_check_failed": "Sprawdzenie licencji nie powiodło się", + + "status_stopped": "Zatrzymany", + "status_running": "Działa", + "status_error": "Połączenie nieudane", + "config_tab": "Szybka konfiguracja", + "status_label": "Stan", + "connections_count": "Połączenia", + "transport_protocol": "Protokół transportu", + "transport_type": "Typ transportu", + "mcp_url": "MCP URL", + "port_fallback_title": "Port {0} zajęty — przełączono na {1}", + "net_title": "Sieć / Proxy", + "net_direct": "Połączenie bezpośrednie", + "net_via": "przez {0} ({1})", + "net_source_manual": "ręcznie", + "net_source_env": "zmienna środowiskowa", + "net_source_system": "ustawienia systemu", + "net_mode_auto": "Wykryj automatycznie", + "net_mode_manual": "Ręcznie", + "net_mode_off": "Bez proxy", + "net_save": "Zapisz", + "net_test": "Testuj połączenie", + "net_testing": "Testowanie…", + "net_test_ok": "Połączono ({0} ms)", + "net_test_fail": "Niepowodzenie: {0}", + "net_hint": "Przekroczenia czasu logowania to zwykle problem sieci. Jeśli używasz VPN/proxy, podaj tu adres (np. http://127.0.0.1:7890) lub przełącz klienta w tryb globalny (TUN).", + "net_pac_warning": "System używa skryptu PAC, którego wtyczka nie potrafi odczytać. Przełącz na Ręcznie i podaj adres proxy.", + "port_label": "Port", + "auto_start_label": "Automatyczne uruchamianie", + "debug_log_label": "Dziennik debugowania", + "max_connections_label": "Maksymalna liczba połączeń", + "server_settings_title": "Ustawienia serwera", + "server_status_title": "Stan serwera", + "connection_info_title": "Informacje o połączeniu", + "tools_count": "{0} narzędzi", + "tools_stats": "{0} narzędzi ({1} włączonych / {2} wyłączonych)", + "quick_config_title": "Szybka konfiguracja klientów MCP", + "quick_config_desc": "Automatycznie skonfiguruj bieżący serwer MCP w popularnych edytorach AI i narzędziach CLI", + "server_info": "Informacje o serwerze", + "server_name_label": "Nazwa serwera", + "server_address": "Adres serwera", + "timeout_ms": "Limit czasu (ms)", + "auto_config_title": "Konfiguracja automatyczna (edytory IDE + Codex CLI)", + "add_all": "Dodaj wszystkie", + "remove_all": "Usuń wszystkie", + "auto_config_note": "Kliknij przycisk, aby automatycznie zmodyfikować pliki konfiguracyjne (Cursor, Windsurf, Trae, Codex CLI)", + "configured": "Skonfigurowano", + "not_configured": "Nie skonfigurowano", + "auto_config_btn": "Konfiguruj automatycznie", + "delete_btn": "Usuń", + "copy_config": "Kopiuj konfigurację", + "open_config": "Otwórz konfigurację", + "manual_config_title": "Konfiguracja ręczna (Claude CLI + Gemini CLI)", + "refresh_commands": "Odśwież polecenia", + "manual_config_note": "Poniższe narzędzia CLI wymagają ręcznego wykonania poleceń w terminalu", + "config_scope": "Zakres konfiguracji:", + "scope_user": "Poziom użytkownika", + "scope_project": "Poziom projektu", + "operation_log": "Dziennik operacji", + "no_logs": "Brak zapisanych operacji", + "copyright_line": "© 2025 LiDaxian - Cocos Creator MCP Server v{0}", + "protocol_line": "Oparte na protokole Streamable HTTP (MCP 2025-03-26)", + "tools_copyright_line1": "System narzędzi - 13 narzędzi na poziomie intencji, ponad 150 operacji edytora, rozdzielanie według kodu action", + "config_copyright_line1": "Szybka konfiguracja - Obsługa Cursor, Windsurf, Trae, Codex CLI, Claude CLI, Gemini CLI", + "email_required": "Wprowadź e-mail i kod aktywacyjny", + "permanent_label": "Bezterminowa", + "logout_button": "Wyloguj", + "invite_code_label": "Kod zaproszenia", + "copy_button": "Kopiuj", + "change_code_button": "Zmień kod", + "change_code_title": "Zmień kod aktywacyjny", + "change_code_desc": "Wprowadź nowy kod aktywacyjny. Bieżące powiązanie urządzenia zostanie najpierw zwolnione.", + "confirm_change": "Potwierdź", + "cancel": "Anuluj", + "code_required": "Wprowadź kod aktywacyjny", + "expiry_inline_warning": "Wkrótce wygasa!", + "store_purchase_hint": "Jeśli kupiłeś tę wtyczkę w Cocos Store, skontaktuj się ze mną, aby otrzymać kod aktywacyjny.", + "license_expired_title": "Licencja wygasła", + "license_expired_message": "Twoja licencja wygasła i nie można uruchomić serwera. Odnów ją lub aktywuj ponownie, aby kontynuować.", + "go_to_login": "Przejdź do logowania", + + "log_load_config_failed": "Nie udało się wczytać stanu konfiguracji: {0}", + "log_gen_cli_failed": "Nie udało się wygenerować poleceń CLI: {0}", + "log_add_client_failed": "Nie udało się dodać do {0}: {1}", + "log_remove_client_failed": "Nie udało się usunąć z {0}: {1}", + "quick_config_dialog_title": "Konfiguracja jednym kliknięciem", + "config_operation_failed": "Operacja konfiguracji nie powiodła się", + "config_file_not_found_changed_path": "Konfiguracja nie powiodła się: nie znaleziono pliku konfiguracyjnego. {0} może być zainstalowany w niestandardowej ścieżce.", + "log_batch_add_failed": "Zbiorcze dodawanie nie powiodło się: {0}", + "log_batch_remove_failed": "Zbiorcze usuwanie nie powiodło się: {0}", + "log_copied_config": "Skopiowano konfigurację {0} do schowka", + "log_gen_config_failed": "Nie udało się wygenerować konfiguracji", + "log_copy_config_failed": "Nie udało się skopiować konfiguracji: {0}", + "log_copied_command": "Skopiowano polecenie {0} do schowka", + "log_copy_command_failed": "Nie udało się skopiować polecenia: {0}", + "log_opened_config_file": "Otwarto plik konfiguracyjny: {0}", + "log_open_config_failed": "Nie udało się otworzyć pliku konfiguracyjnego", + "log_open_config_error": "Nie udało się otworzyć pliku konfiguracyjnego: {0}", + + "update_available_title": "Dostępna aktualizacja", + "update_new_version": "Nowa wersja v{0} jest już dostępna!", + "update_now": "Aktualizuj teraz", + "update_not_now": "Nie teraz", + "update_skip_version": "Pomiń v{0}", + "check_for_updates": "Sprawdź aktualizacje", + "update_checking": "Sprawdzanie...", + "update_no_update": "Używasz najnowszej wersji", + "update_urgency_critical": "Aktualizacja krytyczna", + "update_urgency_high": "Ważna aktualizacja", + "update_current_version": "Bieżąca wersja: v{0}", + "update_changelog": "Lista zmian" + ,"update_changelog_empty": "Dla tej wersji nie podano informacji o zmianach." + ,"subscription_login_title": "Konto abonamentowe VberAI" + ,"subscription_password_label": "Hasło" + ,"subscription_password_placeholder": "Wprowadź hasło" + ,"subscription_login_button": "Zaloguj się przez VberAI" + ,"subscription_google_button": "Zaloguj się przez Google" + ,"subscription_google_pending": "Przeglądarka została otwarta. Dokończ autoryzację Google, a następnie wróć do Cocos Creator." + ,"subscription_google_pending_button": "Oczekiwanie na autoryzację Google..." + ,"subscription_register_button": "Załóż konto VberAI" + ,"subscription_logging_in": "Logowanie..." + ,"subscription_credentials_required": "Wprowadź e-mail i hasło" + ,"subscription_login_success": "Zalogowano na konto abonamentowe" + ,"subscription_login_failed": "Logowanie na konto abonamentowe nie powiodło się" + ,"subscription_not_entitled": "Twój obecny abonament nie obejmuje Cocos 3.x MCP. Podnieś plan, aby kontynuować." + ,"subscription_upgrade_to": "Przejdź na {0}, aby korzystać z tego produktu" + ,"subscription_upgrade_action": "Podnieś abonament" + ,"subscription_logged_in": "Zalogowane konto" + ,"subscription_choose_button": "Konto abonamentowe VberAI" + ,"license_choose_button": "Kod aktywacyjny" + ,"subscription_method_label": "Abonament" + ,"back_to_login_choices": "← Wybierz inną metodę logowania" + ,"subscription_signed_out_other_device": "Wylogowano: Twoje konto zostało użyte na innym urządzeniu." + ,"subscription_google_cancelled": "Logowanie przez Google zostało anulowane." + ,"subscription_request_timeout": "Przekroczono limit czasu żądania. Sprawdź sieć i spróbuj ponownie." + ,"subscription_network_error": "Połączenie sieciowe nie powiodło się. Sprawdź sieć i spróbuj ponownie." + ,"subscription_server_error": "Serwer zwrócił nieprawidłową odpowiedź. Spróbuj ponownie później." + ,"subscription_google_authorization_failed": "Autoryzacja Google nie została ukończona. Spróbuj ponownie." + ,"lan_access_label": "Zezwól na dostęp z sieci lokalnej" + ,"lan_access_warning": "Powiązano z 0.0.0.0. Każdy w tej sieci może się połączyć i sterować edytorem — ten punkt końcowy nie weryfikuje żadnych poświadczeń. Włączaj tylko w zaufanej sieci." + ,"lan_address": "Adres w sieci lokalnej" +}; diff --git a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/pt.js b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/pt.js index 932ee1a..b5314fe 100644 --- a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/pt.js +++ b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/pt.js @@ -123,11 +123,23 @@ module.exports = { "transport_protocol": "Protocolo de transporte", "transport_type": "Tipo de transporte", "mcp_url": "URL MCP", - "port_fallback_title": "Porta {0} indisponível — alterada para {1}", - "port_fallback_reason": "A porta {0} está reservada pelo sistema ou bloqueada por firewall/antivírus (comum no Windows com Hyper-V, WSL2 ou Docker). O servidor está funcionando normalmente na nova porta.", - "port_fallback_resynced": "Configuração atualizada para: {0}. Reinicie esses clientes para que a nova porta tenha efeito.", - "port_fallback_no_clients": "Se você já configurou clientes de IA, configure-os novamente para a nova porta pela configuração com um clique.", - "port_fallback_dismiss": "Entendi", + "port_fallback_title": "Porta {0} ocupada — alterada para {1}", + "net_title": "Rede / Proxy", + "net_direct": "Ligação direta", + "net_via": "via {0} ({1})", + "net_source_manual": "manual", + "net_source_env": "variável de ambiente", + "net_source_system": "definições do sistema", + "net_mode_auto": "Deteção automática", + "net_mode_manual": "Manual", + "net_mode_off": "Sem proxy", + "net_save": "Guardar", + "net_test": "Testar ligação", + "net_testing": "A testar…", + "net_test_ok": "Ligado ({0} ms)", + "net_test_fail": "Falhou: {0}", + "net_hint": "Os tempos limite de início de sessão são quase sempre de rede. Se usar VPN/proxy, indique aqui o endereço (ex.: http://127.0.0.1:7890) ou mude o cliente para modo global (TUN).", + "net_pac_warning": "O sistema usa um script PAC que este plugin não consegue avaliar. Mude para Manual e introduza o endereço do proxy.", "port_label": "Porta", "auto_start_label": "Início auto", "debug_log_label": "Log de depuração", @@ -240,4 +252,7 @@ module.exports = { "subscription_network_error": "Falha na conexão de rede. Verifique sua rede e tente novamente.", "subscription_server_error": "O servidor retornou uma resposta inválida. Tente novamente mais tarde.", "subscription_google_authorization_failed": "A autorização do Google não foi concluída. Tente novamente." + ,"lan_access_label": "Permitir acesso pela rede local" + ,"lan_access_warning": "Vinculado a 0.0.0.0. Qualquer pessoa nesta rede pode se conectar e operar o editor — este endpoint não verifica nenhuma credencial. Ative apenas em uma rede confiável." + ,"lan_address": "Endereço da rede local" }; diff --git a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/ru.js b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/ru.js index 52ae8d4..d068bb6 100644 --- a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/ru.js +++ b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/ru.js @@ -123,11 +123,23 @@ module.exports = { "transport_protocol": "Транспортный протокол", "transport_type": "Тип транспорта", "mcp_url": "MCP URL", - "port_fallback_title": "Порт {0} недоступен — выполнен переход на {1}", - "port_fallback_reason": "Порт {0} зарезервирован системой или заблокирован брандмауэром/антивирусом (часто встречается в Windows с Hyper-V, WSL2 или Docker). Сервер нормально работает на новом порту.", - "port_fallback_resynced": "Обновлена конфигурация для: {0}. Перезапустите эти клиенты, чтобы новый порт вступил в силу.", - "port_fallback_no_clients": "Если вы уже настраивали ИИ-клиенты, перенастройте их на новый порт через конфигурацию в один клик.", - "port_fallback_dismiss": "Понятно", + "port_fallback_title": "Порт {0} занят — выполнен переход на {1}", + "net_title": "Сеть / Прокси", + "net_direct": "Прямое подключение", + "net_via": "через {0} ({1})", + "net_source_manual": "вручную", + "net_source_env": "переменная окружения", + "net_source_system": "системные настройки", + "net_mode_auto": "Автоопределение", + "net_mode_manual": "Вручную", + "net_mode_off": "Без прокси", + "net_save": "Сохранить", + "net_test": "Проверить соединение", + "net_testing": "Проверка…", + "net_test_ok": "Соединение установлено ({0} мс)", + "net_test_fail": "Ошибка: {0}", + "net_hint": "Тайм-ауты входа почти всегда связаны с сетью. При использовании VPN/прокси укажите адрес здесь (например http://127.0.0.1:7890) или переключите клиент в глобальный режим (TUN).", + "net_pac_warning": "Система использует PAC-скрипт, который плагин не может обработать. Переключитесь на «Вручную» и укажите адрес прокси.", "port_label": "Порт", "auto_start_label": "Автозапуск", "debug_log_label": "Журнал отладки", @@ -240,4 +252,7 @@ module.exports = { "subscription_network_error": "Сбой сетевого подключения. Проверьте сеть и повторите попытку.", "subscription_server_error": "Сервер вернул недопустимый ответ. Повторите попытку позже.", "subscription_google_authorization_failed": "Авторизация Google не завершена. Повторите попытку." + ,"lan_access_label": "Разрешить доступ по локальной сети" + ,"lan_access_warning": "Привязано к 0.0.0.0. Любой в этой сети может подключиться и управлять редактором — эта конечная точка не проверяет никаких учётных данных. Включайте только в доверенной сети." + ,"lan_address": "Адрес в локальной сети" }; diff --git a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/th.js b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/th.js new file mode 100644 index 0000000..9bd85ad --- /dev/null +++ b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/th.js @@ -0,0 +1,259 @@ +"use strict"; + +module.exports = { + "extension_name": "Cocos MCP Server", + "description": "เซิร์ฟเวอร์ AI MCP สำหรับ Cocos Creator 3.8", + "panel_title": "เซิร์ฟเวอร์ MCP", + "open_panel": "เปิดแผง MCP", + "start_server": "เริ่มเซิร์ฟเวอร์", + "stop_server": "หยุดเซิร์ฟเวอร์", + "server_status": "สถานะเซิร์ฟเวอร์", + "port": "พอร์ต", + "settings": "การตั้งค่า", + "connected": "เชื่อมต่อแล้ว", + "disconnected": "ตัดการเชื่อมต่อแล้ว", + "server_running": "เซิร์ฟเวอร์กำลังทำงานบนพอร์ต {0}", + "server_stopped": "เซิร์ฟเวอร์หยุดทำงานแล้ว", + "auto_start": "เริ่มอัตโนมัติ", + "debug_log": "บันทึกดีบัก", + "max_connections": "จำนวนการเชื่อมต่อสูงสุด", + "connection_info": "ข้อมูลการเชื่อมต่อ", + "http_url": "HTTP URL", + "copy": "คัดลอก", + "save_settings": "บันทึกการตั้งค่า", + "settings_saved": "บันทึกการตั้งค่าสำเร็จ", + "server_started": "เซิร์ฟเวอร์ MCP เริ่มทำงานแล้ว", + "server_stopped_msg": "เซิร์ฟเวอร์ MCP หยุดทำงานแล้ว", + "failed_to_start": "เริ่มเซิร์ฟเวอร์ไม่สำเร็จ", + "failed_to_stop": "หยุดเซิร์ฟเวอร์ไม่สำเร็จ", + "failed_to_save": "บันทึกการตั้งค่าไม่สำเร็จ", + "url_copied": "คัดลอก HTTP URL ไปยังคลิปบอร์ดแล้ว", + "tool_manager": "ตัวจัดการเครื่องมือ", + "open_tool_manager": "เปิดตัวจัดการเครื่องมือ", + "create_config": "สร้างการกำหนดค่า", + "edit_config": "แก้ไขการกำหนดค่า", + "delete_config": "ลบการกำหนดค่า", + "import_config": "นำเข้าการกำหนดค่า", + "export_config": "ส่งออกการกำหนดค่า", + "apply_config": "ใช้การกำหนดค่า", + "select_all": "เลือกทั้งหมด", + "deselect_all": "ยกเลิกเลือกทั้งหมด", + "save_changes": "บันทึกการเปลี่ยนแปลง", + "config_name": "ชื่อการกำหนดค่า", + "config_description": "คำอธิบายการกำหนดค่า", + "current_config": "การกำหนดค่าปัจจุบัน", + "tool_management": "การจัดการเครื่องมือ", + "total_tools": "เครื่องมือทั้งหมด", + "enabled_tools": "เปิดใช้งาน", + "disabled_tools": "ปิดใช้งาน", + "no_config_selected": "ยังไม่ได้เลือกการกำหนดค่า", + "select_config_first": "โปรดเลือกการกำหนดค่า หรือสร้างการกำหนดค่าใหม่ก่อน", + "config_created": "สร้างการกำหนดค่าสำเร็จ", + "config_updated": "อัปเดตการกำหนดค่าสำเร็จ", + "config_deleted": "ลบการกำหนดค่าสำเร็จ", + "config_applied": "ใช้การกำหนดค่าสำเร็จ", + "config_exported": "ส่งออกการกำหนดค่าสำเร็จ", + "config_imported": "นำเข้าการกำหนดค่าสำเร็จ", + "confirm_delete": "ยืนยันการลบ", + "delete_config_confirm": "คุณแน่ใจหรือไม่ว่าต้องการลบการกำหนดค่า \"{0}\" การดำเนินการนี้ไม่สามารถย้อนกลับได้", + "max_config_slots_reached": "ถึงจำนวนช่องการกำหนดค่าสูงสุดแล้ว ({0})", + "invalid_config_format": "รูปแบบการกำหนดค่าไม่ถูกต้อง", + "invalid_json_format": "รูปแบบ JSON หรือโครงสร้างการกำหนดค่าไม่ถูกต้อง", + "server_tab": "เซิร์ฟเวอร์", + "tools_tab": "การจัดการเครื่องมือ", + "available_tools": "เครื่องมือที่ใช้ได้", + "scene_tools": "เครื่องมือฉาก", + "node_tools": "เครื่องมือโหนด", + "component_tools": "เครื่องมือคอมโพเนนต์", + "prefab_tools": "เครื่องมือ Prefab", + "project_tools": "เครื่องมือโปรเจกต์", + "debug_tools": "เครื่องมือดีบัก", + "preferences_tools": "การตั้งค่าส่วนตัว", + "server_tools": "เครื่องมือเซิร์ฟเวอร์", + "broadcast_tools": "เครื่องมือบรอดแคสต์", + "scene_advanced_tools": "เครื่องมือฉากขั้นสูง", + "scene_view_tools": "เครื่องมือมุมมองฉาก", + "reference_image_tools": "เครื่องมือภาพอ้างอิง", + "asset_advanced_tools": "เครื่องมือแอสเซทขั้นสูง", + "validation_tools": "เครื่องมือตรวจสอบความถูกต้อง", + "brand_name": "LiDaxian MCP Series", + "brand_subtitle": "LiDaxian MCP Series", + "contact_email": "อีเมล", + "contact_wechat": "WeChat", + "contact_github": "GitHub", + "machine_id_label": "รหัสเครื่อง", + "purchase_renew": "ซื้อ / ต่ออายุ", + "purchase_url": "https://www.vberai.com/game-engines/cocos", + "auth_title": "เลือกวิธีเข้าสู่ระบบ", + "auth_subtitle": "กรอกอีเมลและรหัสเปิดใช้งานของคุณ", + "auth_choose_subtitle": "เลือกวิธีเข้าสู่ระบบเพื่อดำเนินการต่อ", + "email_label": "ที่อยู่อีเมล", + "activation_code_label": "รหัสเปิดใช้งาน", + "email_placeholder": "กรอกอีเมล", + "code_placeholder": "กรอกรหัส (XXXXX-XXXXX-XXXXX-XXXXX-XXXXX)", + "activate_button": "เปิดใช้งาน", + "deactivate_button": "ยกเลิกการเปิดใช้งาน", + "activating": "กำลังเปิดใช้งาน...", + "deactivating": "กำลังยกเลิกการเปิดใช้งาน...", + "license_status": "สถานะไลเซนส์", + "license_type": "ประเภทไลเซนส์", + "expiry_date": "วันหมดอายุ", + "days_remaining": "จำนวนวันที่เหลือ", + "days_unit": "วัน", + "permanent": "ถาวร", + "expiry_warning_title": "ไลเซนส์ใกล้หมดอายุ", + "expiry_warning_message": "ไลเซนส์ของคุณจะหมดอายุในอีก {0} วัน โปรดต่ออายุเพื่อไม่ให้บริการหยุดชะงัก", + "renew_now": "ต่ออายุตอนนี้", + "i_understand": "รับทราบ", + "activation_success": "เปิดใช้งานไลเซนส์สำเร็จ!", + "activation_failed": "เปิดใช้งานไม่สำเร็จ: {0}", + "invalid_code": "รูปแบบรหัสเปิดใช้งานไม่ถูกต้อง", + "purchase_license": "ซื้อไลเซนส์", + "renew_license": "ต่ออายุไลเซนส์", + "contact_support": "ฝ่ายสนับสนุน", + "language_switch": "ไทย", + "version_label": "เวอร์ชัน", + "license_required": "ต้องมีไลเซนส์จึงจะเริ่มเซิร์ฟเวอร์ได้", + "license_check_failed": "ตรวจสอบไลเซนส์ไม่สำเร็จ", + + "status_stopped": "หยุดแล้ว", + "status_running": "กำลังทำงาน", + "status_error": "เชื่อมต่อไม่สำเร็จ", + "config_tab": "ตั้งค่าด่วน", + "status_label": "สถานะ", + "connections_count": "การเชื่อมต่อ", + "transport_protocol": "โปรโตคอลการรับส่ง", + "transport_type": "ประเภทการรับส่ง", + "mcp_url": "MCP URL", + "port_fallback_title": "พอร์ต {0} ถูกใช้งานอยู่ จึงเปลี่ยนเป็น {1}", + "net_title": "เครือข่าย / พร็อกซี", + "net_direct": "เชื่อมต่อโดยตรง", + "net_via": "ผ่าน {0} ({1})", + "net_source_manual": "กำหนดเอง", + "net_source_env": "ตัวแปรสภาพแวดล้อม", + "net_source_system": "การตั้งค่าระบบ", + "net_mode_auto": "ตรวจหาอัตโนมัติ", + "net_mode_manual": "กำหนดเอง", + "net_mode_off": "ไม่ใช้พร็อกซี", + "net_save": "บันทึก", + "net_test": "ทดสอบการเชื่อมต่อ", + "net_testing": "กำลังทดสอบ…", + "net_test_ok": "เชื่อมต่อได้ ({0} ms)", + "net_test_fail": "เชื่อมต่อไม่ได้: {0}", + "net_hint": "การหมดเวลาเข้าสู่ระบบมักเกิดจากเครือข่าย หากใช้ VPN/พร็อกซี ให้กรอกที่อยู่ (เช่น http://127.0.0.1:7890) หรือสลับโปรแกรมพร็อกซีเป็นโหมดทั่วโลก (TUN)", + "net_pac_warning": "ระบบใช้สคริปต์ PAC ซึ่งปลั๊กอินอ่านไม่ได้ กรุณาเลือก \"กำหนดเอง\" และกรอกที่อยู่พร็อกซี", + "port_label": "พอร์ต", + "auto_start_label": "เริ่มอัตโนมัติ", + "debug_log_label": "บันทึกดีบัก", + "max_connections_label": "จำนวนการเชื่อมต่อสูงสุด", + "server_settings_title": "การตั้งค่าเซิร์ฟเวอร์", + "server_status_title": "สถานะเซิร์ฟเวอร์", + "connection_info_title": "ข้อมูลการเชื่อมต่อ", + "tools_count": "{0} เครื่องมือ", + "tools_stats": "{0} เครื่องมือ ({1} เปิดใช้งาน / {2} ปิดใช้งาน)", + "quick_config_title": "ตั้งค่าไคลเอนต์ MCP อย่างรวดเร็ว", + "quick_config_desc": "กำหนดค่าเซิร์ฟเวอร์ MCP ปัจจุบันลงในโปรแกรมแก้ไข AI และเครื่องมือ CLI ยอดนิยมโดยอัตโนมัติ", + "server_info": "ข้อมูลเซิร์ฟเวอร์", + "server_name_label": "ชื่อเซิร์ฟเวอร์", + "server_address": "ที่อยู่เซิร์ฟเวอร์", + "timeout_ms": "หมดเวลา (มิลลิวินาที)", + "auto_config_title": "กำหนดค่าอัตโนมัติ (โปรแกรมแก้ไข IDE + Codex CLI)", + "add_all": "เพิ่มทั้งหมด", + "remove_all": "ลบทั้งหมด", + "auto_config_note": "คลิกปุ่มเพื่อแก้ไขไฟล์กำหนดค่าโดยอัตโนมัติ (Cursor, Windsurf, Trae, Codex CLI)", + "configured": "กำหนดค่าแล้ว", + "not_configured": "ยังไม่ได้กำหนดค่า", + "auto_config_btn": "กำหนดค่าอัตโนมัติ", + "delete_btn": "ลบ", + "copy_config": "คัดลอกการกำหนดค่า", + "open_config": "เปิดการกำหนดค่า", + "manual_config_title": "กำหนดค่าด้วยตนเอง (Claude CLI + Gemini CLI)", + "refresh_commands": "รีเฟรชคำสั่ง", + "manual_config_note": "เครื่องมือ CLI ต่อไปนี้ต้องรันคำสั่งในเทอร์มินัลด้วยตนเอง", + "config_scope": "ขอบเขตการกำหนดค่า:", + "scope_user": "ระดับผู้ใช้", + "scope_project": "ระดับโปรเจกต์", + "operation_log": "บันทึกการดำเนินการ", + "no_logs": "ไม่มีบันทึกการดำเนินการ", + "copyright_line": "© 2025 LiDaxian - Cocos Creator MCP Server v{0}", + "protocol_line": "อิงตามโปรโตคอล Streamable HTTP (MCP 2025-03-26)", + "tools_copyright_line1": "ระบบเครื่องมือ - เครื่องมือระดับเจตนา 13 รายการ, การดำเนินการในโปรแกรมแก้ไขกว่า 150 รายการ, ส่งต่อด้วยรหัส action", + "config_copyright_line1": "ตั้งค่าด่วน - รองรับ Cursor, Windsurf, Trae, Codex CLI, Claude CLI, Gemini CLI", + "email_required": "โปรดกรอกอีเมลและรหัสเปิดใช้งาน", + "permanent_label": "ถาวร", + "logout_button": "ออกจากระบบ", + "invite_code_label": "รหัสเชิญ", + "copy_button": "คัดลอก", + "change_code_button": "เปลี่ยนรหัส", + "change_code_title": "เปลี่ยนรหัสเปิดใช้งาน", + "change_code_desc": "กรอกรหัสเปิดใช้งานใหม่ของคุณ การผูกอุปกรณ์ปัจจุบันจะถูกยกเลิกก่อน", + "confirm_change": "ยืนยัน", + "cancel": "ยกเลิก", + "code_required": "โปรดกรอกรหัสเปิดใช้งาน", + "expiry_inline_warning": "ใกล้หมดอายุ!", + "store_purchase_hint": "หากคุณซื้อปลั๊กอินนี้จาก Cocos Store โปรดติดต่อผมเพื่อรับรหัสเปิดใช้งาน", + "license_expired_title": "ไลเซนส์หมดอายุ", + "license_expired_message": "ไลเซนส์ของคุณหมดอายุแล้ว จึงไม่สามารถเริ่มเซิร์ฟเวอร์ได้ โปรดต่ออายุหรือเปิดใช้งานใหม่เพื่อดำเนินการต่อ", + "go_to_login": "ไปที่หน้าเข้าสู่ระบบ", + + "log_load_config_failed": "โหลดสถานะการกำหนดค่าไม่สำเร็จ: {0}", + "log_gen_cli_failed": "สร้างคำสั่ง CLI ไม่สำเร็จ: {0}", + "log_add_client_failed": "เพิ่มลงใน {0} ไม่สำเร็จ: {1}", + "log_remove_client_failed": "ลบออกจาก {0} ไม่สำเร็จ: {1}", + "quick_config_dialog_title": "กำหนดค่าด้วยคลิกเดียว", + "config_operation_failed": "การดำเนินการกำหนดค่าไม่สำเร็จ", + "config_file_not_found_changed_path": "กำหนดค่าไม่สำเร็จ: ไม่พบไฟล์กำหนดค่า {0} อาจถูกติดตั้งไว้ในพาธที่กำหนดเอง", + "log_batch_add_failed": "เพิ่มแบบกลุ่มไม่สำเร็จ: {0}", + "log_batch_remove_failed": "ลบแบบกลุ่มไม่สำเร็จ: {0}", + "log_copied_config": "คัดลอกการกำหนดค่า {0} ไปยังคลิปบอร์ดแล้ว", + "log_gen_config_failed": "สร้างการกำหนดค่าไม่สำเร็จ", + "log_copy_config_failed": "คัดลอกการกำหนดค่าไม่สำเร็จ: {0}", + "log_copied_command": "คัดลอกคำสั่ง {0} ไปยังคลิปบอร์ดแล้ว", + "log_copy_command_failed": "คัดลอกคำสั่งไม่สำเร็จ: {0}", + "log_opened_config_file": "เปิดไฟล์กำหนดค่าแล้ว: {0}", + "log_open_config_failed": "เปิดไฟล์กำหนดค่าไม่สำเร็จ", + "log_open_config_error": "เปิดไฟล์กำหนดค่าไม่สำเร็จ: {0}", + + "update_available_title": "มีอัปเดตใหม่", + "update_new_version": "มีเวอร์ชันใหม่ v{0} แล้ว!", + "update_now": "อัปเดตตอนนี้", + "update_not_now": "ไว้ทีหลัง", + "update_skip_version": "ข้าม v{0}", + "check_for_updates": "ตรวจหาอัปเดต", + "update_checking": "กำลังตรวจสอบ...", + "update_no_update": "คุณกำลังใช้เวอร์ชันล่าสุดอยู่แล้ว", + "update_urgency_critical": "อัปเดตเร่งด่วน", + "update_urgency_high": "อัปเดตสำคัญ", + "update_current_version": "เวอร์ชันปัจจุบัน: v{0}", + "update_changelog": "บันทึกการเปลี่ยนแปลง" + ,"update_changelog_empty": "ไม่มีบันทึกการเปลี่ยนแปลงสำหรับเวอร์ชันนี้" + ,"subscription_login_title": "บัญชีสมาชิก VberAI" + ,"subscription_password_label": "รหัสผ่าน" + ,"subscription_password_placeholder": "กรอกรหัสผ่าน" + ,"subscription_login_button": "เข้าสู่ระบบด้วย VberAI" + ,"subscription_google_button": "เข้าสู่ระบบด้วย Google" + ,"subscription_google_pending": "เปิดเบราว์เซอร์แล้ว โปรดทำการอนุญาตผ่าน Google ให้เสร็จ แล้วกลับมาที่ Cocos Creator" + ,"subscription_google_pending_button": "กำลังรอการอนุญาตจาก Google..." + ,"subscription_register_button": "สร้างบัญชี VberAI" + ,"subscription_logging_in": "กำลังเข้าสู่ระบบ..." + ,"subscription_credentials_required": "โปรดกรอกอีเมลและรหัสผ่าน" + ,"subscription_login_success": "เข้าสู่ระบบบัญชีสมาชิกแล้ว" + ,"subscription_login_failed": "เข้าสู่ระบบบัญชีสมาชิกไม่สำเร็จ" + ,"subscription_not_entitled": "การสมัครสมาชิกปัจจุบันของคุณไม่รวม Cocos 3.x MCP โปรดอัปเกรดเพื่อดำเนินการต่อ" + ,"subscription_upgrade_to": "อัปเกรดเป็น {0} เพื่อใช้ผลิตภัณฑ์นี้" + ,"subscription_upgrade_action": "อัปเกรดการสมัครสมาชิก" + ,"subscription_logged_in": "บัญชีที่เข้าสู่ระบบ" + ,"subscription_choose_button": "บัญชีสมาชิก VberAI" + ,"license_choose_button": "รหัสเปิดใช้งาน" + ,"subscription_method_label": "สมาชิก" + ,"back_to_login_choices": "← เลือกวิธีเข้าสู่ระบบอื่น" + ,"subscription_signed_out_other_device": "ออกจากระบบแล้ว: บัญชีของคุณถูกใช้งานบนอุปกรณ์อื่น" + ,"subscription_google_cancelled": "การเข้าสู่ระบบด้วย Google ถูกยกเลิก" + ,"subscription_request_timeout": "คำขอหมดเวลา โปรดตรวจสอบเครือข่ายแล้วลองใหม่อีกครั้ง" + ,"subscription_network_error": "การเชื่อมต่อเครือข่ายล้มเหลว โปรดตรวจสอบเครือข่ายแล้วลองใหม่อีกครั้ง" + ,"subscription_server_error": "เซิร์ฟเวอร์ตอบกลับไม่ถูกต้อง โปรดลองใหม่ภายหลัง" + ,"subscription_google_authorization_failed": "การอนุญาตผ่าน Google ไม่เสร็จสมบูรณ์ โปรดลองใหม่อีกครั้ง" + ,"lan_access_label": "อนุญาตการเข้าถึงผ่าน LAN" + ,"lan_access_warning": "ผูกกับ 0.0.0.0 แล้ว ใครก็ตามในเครือข่ายนี้สามารถเชื่อมต่อและควบคุมโปรแกรมแก้ไขได้ ปลายทางนี้ไม่ตรวจสอบข้อมูลรับรองใด ๆ เปิดใช้เฉพาะในเครือข่ายที่เชื่อถือได้เท่านั้น" + ,"lan_address": "ที่อยู่ LAN" +}; diff --git a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/tr.js b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/tr.js new file mode 100644 index 0000000..a693e7b --- /dev/null +++ b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/tr.js @@ -0,0 +1,259 @@ +"use strict"; + +module.exports = { + "extension_name": "Cocos MCP Server", + "description": "Cocos Creator 3.8 için AI MCP Sunucusu", + "panel_title": "MCP Sunucusu", + "open_panel": "MCP Panelini Aç", + "start_server": "Sunucuyu Başlat", + "stop_server": "Sunucuyu Durdur", + "server_status": "Sunucu Durumu", + "port": "Bağlantı Noktası", + "settings": "Ayarlar", + "connected": "Bağlandı", + "disconnected": "Bağlantı Kesildi", + "server_running": "Sunucu {0} numaralı bağlantı noktasında çalışıyor", + "server_stopped": "Sunucu durduruldu", + "auto_start": "Otomatik Başlat", + "debug_log": "Hata Ayıklama Günlüğü", + "max_connections": "Maksimum Bağlantı", + "connection_info": "Bağlantı Bilgisi", + "http_url": "HTTP URL", + "copy": "Kopyala", + "save_settings": "Ayarları Kaydet", + "settings_saved": "Ayarlar başarıyla kaydedildi", + "server_started": "MCP Sunucusu Başlatıldı", + "server_stopped_msg": "MCP Sunucusu Durduruldu", + "failed_to_start": "Sunucu başlatılamadı", + "failed_to_stop": "Sunucu durdurulamadı", + "failed_to_save": "Ayarlar kaydedilemedi", + "url_copied": "HTTP URL panoya kopyalandı", + "tool_manager": "Araç Yöneticisi", + "open_tool_manager": "Araç Yöneticisini Aç", + "create_config": "Yapılandırma Oluştur", + "edit_config": "Yapılandırmayı Düzenle", + "delete_config": "Yapılandırmayı Sil", + "import_config": "Yapılandırma İçe Aktar", + "export_config": "Yapılandırma Dışa Aktar", + "apply_config": "Yapılandırmayı Uygula", + "select_all": "Tümünü Seç", + "deselect_all": "Tüm Seçimi Kaldır", + "save_changes": "Değişiklikleri Kaydet", + "config_name": "Yapılandırma Adı", + "config_description": "Yapılandırma Açıklaması", + "current_config": "Geçerli Yapılandırma", + "tool_management": "Araç Yönetimi", + "total_tools": "Toplam Araç", + "enabled_tools": "Etkin", + "disabled_tools": "Devre Dışı", + "no_config_selected": "Yapılandırma Seçilmedi", + "select_config_first": "Lütfen önce bir yapılandırma seçin veya yeni bir tane oluşturun", + "config_created": "Yapılandırma başarıyla oluşturuldu", + "config_updated": "Yapılandırma başarıyla güncellendi", + "config_deleted": "Yapılandırma başarıyla silindi", + "config_applied": "Yapılandırma başarıyla uygulandı", + "config_exported": "Yapılandırma başarıyla dışa aktarıldı", + "config_imported": "Yapılandırma başarıyla içe aktarıldı", + "confirm_delete": "Silmeyi Onayla", + "delete_config_confirm": "\"{0}\" yapılandırmasını silmek istediğinizden emin misiniz? Bu işlem geri alınamaz.", + "max_config_slots_reached": "Maksimum yapılandırma yuvası sayısına ulaşıldı ({0})", + "invalid_config_format": "Geçersiz yapılandırma biçimi", + "invalid_json_format": "Geçersiz JSON biçimi veya yapılandırma yapısı", + "server_tab": "Sunucu", + "tools_tab": "Araç Yönetimi", + "available_tools": "Kullanılabilir Araçlar", + "scene_tools": "Sahne Araçları", + "node_tools": "Düğüm Araçları", + "component_tools": "Bileşen Araçları", + "prefab_tools": "Prefab Araçları", + "project_tools": "Proje Araçları", + "debug_tools": "Hata Ayıklama Araçları", + "preferences_tools": "Tercihler", + "server_tools": "Sunucu Araçları", + "broadcast_tools": "Yayın Araçları", + "scene_advanced_tools": "Gelişmiş Sahne Araçları", + "scene_view_tools": "Sahne Görünümü Araçları", + "reference_image_tools": "Referans Görsel Araçları", + "asset_advanced_tools": "Gelişmiş Varlık Araçları", + "validation_tools": "Doğrulama Araçları", + "brand_name": "LiDaxian MCP Series", + "brand_subtitle": "LiDaxian MCP Series", + "contact_email": "E-posta", + "contact_wechat": "WeChat", + "contact_github": "GitHub", + "machine_id_label": "Makine Kimliği", + "purchase_renew": "Satın Al / Yenile", + "purchase_url": "https://www.vberai.com/game-engines/cocos", + "auth_title": "Bir oturum açma yöntemi seçin", + "auth_subtitle": "E-postanızı ve etkinleştirme kodunuzu girin", + "auth_choose_subtitle": "Devam etmek için bir oturum açma yöntemi seçin", + "email_label": "E-posta Adresi", + "activation_code_label": "Etkinleştirme Kodu", + "email_placeholder": "E-posta girin", + "code_placeholder": "Kodu girin (XXXXX-XXXXX-XXXXX-XXXXX-XXXXX)", + "activate_button": "Etkinleştir", + "deactivate_button": "Devre Dışı Bırak", + "activating": "Etkinleştiriliyor...", + "deactivating": "Devre dışı bırakılıyor...", + "license_status": "Lisans Durumu", + "license_type": "Lisans Türü", + "expiry_date": "Son Kullanma Tarihi", + "days_remaining": "Kalan Gün", + "days_unit": "gün", + "permanent": "Kalıcı", + "expiry_warning_title": "Lisansın Süresi Yakında Doluyor", + "expiry_warning_message": "Lisansınızın süresi {0} gün içinde dolacak. Hizmet kesintisini önlemek için lütfen yenileyin.", + "renew_now": "Şimdi Yenile", + "i_understand": "Anladım", + "activation_success": "Lisans başarıyla etkinleştirildi!", + "activation_failed": "Etkinleştirme başarısız: {0}", + "invalid_code": "Geçersiz etkinleştirme kodu biçimi", + "purchase_license": "Lisans Satın Al", + "renew_license": "Lisansı Yenile", + "contact_support": "Destek", + "language_switch": "Türkçe", + "version_label": "Sürüm", + "license_required": "Sunucuyu başlatmak için lisans gerekli", + "license_check_failed": "Lisans denetimi başarısız", + + "status_stopped": "Durduruldu", + "status_running": "Çalışıyor", + "status_error": "Bağlantı Başarısız", + "config_tab": "Hızlı Yapılandırma", + "status_label": "Durum", + "connections_count": "Bağlantılar", + "transport_protocol": "Aktarım Protokolü", + "transport_type": "Aktarım Türü", + "mcp_url": "MCP URL", + "port_fallback_title": "Port {0} kullanımda — {1} portuna geçildi", + "net_title": "Ağ / Proxy", + "net_direct": "Doğrudan bağlantı", + "net_via": "{0} üzerinden ({1})", + "net_source_manual": "elle", + "net_source_env": "ortam değişkeni", + "net_source_system": "sistem ayarları", + "net_mode_auto": "Otomatik algıla", + "net_mode_manual": "Elle", + "net_mode_off": "Proxy yok", + "net_save": "Kaydet", + "net_test": "Bağlantıyı test et", + "net_testing": "Test ediliyor…", + "net_test_ok": "Bağlandı ({0} ms)", + "net_test_fail": "Başarısız: {0}", + "net_hint": "Oturum açma zaman aşımları genellikle ağ kaynaklıdır. VPN/proxy kullanıyorsanız adresini buraya girin (örn. http://127.0.0.1:7890) ya da istemciyi global (TUN) moda alın.", + "net_pac_warning": "Sistem, bu eklentinin çözemediği bir PAC betiği kullanıyor. Elle moduna geçip proxy adresini girin.", + "port_label": "Bağlantı Noktası", + "auto_start_label": "Otomatik Başlat", + "debug_log_label": "Hata Ayıklama Günlüğü", + "max_connections_label": "Maksimum Bağlantı", + "server_settings_title": "Sunucu Ayarları", + "server_status_title": "Sunucu Durumu", + "connection_info_title": "Bağlantı Bilgisi", + "tools_count": "{0} araç", + "tools_stats": "{0} araç ({1} etkin / {2} devre dışı)", + "quick_config_title": "MCP İstemcilerini Hızlı Yapılandır", + "quick_config_desc": "Geçerli MCP sunucusunu yaygın AI editörlerine ve CLI araçlarına otomatik olarak yapılandırın", + "server_info": "Sunucu Bilgisi", + "server_name_label": "Sunucu Adı", + "server_address": "Sunucu Adresi", + "timeout_ms": "Zaman Aşımı (ms)", + "auto_config_title": "Otomatik Yapılandırma (IDE Editörleri + Codex CLI)", + "add_all": "Tümünü Ekle", + "remove_all": "Tümünü Kaldır", + "auto_config_note": "Yapılandırma dosyalarını otomatik değiştirmek için düğmeye tıklayın (Cursor, Windsurf, Trae, Codex CLI)", + "configured": "Yapılandırıldı", + "not_configured": "Yapılandırılmadı", + "auto_config_btn": "Otomatik Yapılandır", + "delete_btn": "Sil", + "copy_config": "Yapılandırmayı Kopyala", + "open_config": "Yapılandırmayı Aç", + "manual_config_title": "Manuel Yapılandırma (Claude CLI + Gemini CLI)", + "refresh_commands": "Komutları Yenile", + "manual_config_note": "Aşağıdaki CLI araçları için terminal komutlarının elle çalıştırılması gerekir", + "config_scope": "Yapılandırma Kapsamı:", + "scope_user": "Kullanıcı Düzeyi", + "scope_project": "Proje Düzeyi", + "operation_log": "İşlem Günlüğü", + "no_logs": "İşlem kaydı yok", + "copyright_line": "© 2025 LiDaxian - Cocos Creator MCP Server v{0}", + "protocol_line": "Streamable HTTP Protokolü temellidir (MCP 2025-03-26)", + "tools_copyright_line1": "Araç Sistemi - 13 amaç düzeyinde araç, 150+ editör işlemi, action kodu ile dağıtım", + "config_copyright_line1": "Hızlı Yapılandırma - Cursor, Windsurf, Trae, Codex CLI, Claude CLI, Gemini CLI desteklenir", + "email_required": "Lütfen e-posta ve etkinleştirme kodunu girin", + "permanent_label": "Kalıcı", + "logout_button": "Çıkış Yap", + "invite_code_label": "Davet Kodu", + "copy_button": "Kopyala", + "change_code_button": "Kodu Değiştir", + "change_code_title": "Etkinleştirme Kodunu Değiştir", + "change_code_desc": "Yeni etkinleştirme kodunuzu girin. Geçerli cihaz bağlaması önce serbest bırakılacaktır.", + "confirm_change": "Onayla", + "cancel": "İptal", + "code_required": "Lütfen bir etkinleştirme kodu girin", + "expiry_inline_warning": "Süresi yakında doluyor!", + "store_purchase_hint": "Bu eklentiyi Cocos Store'dan satın aldıysanız, etkinleştirme kodunuzu almak için lütfen benimle iletişime geçin.", + "license_expired_title": "Lisansın Süresi Doldu", + "license_expired_message": "Lisansınızın süresi doldu ve sunucu başlatılamıyor. Devam etmek için lütfen yenileyin veya yeniden etkinleştirin.", + "go_to_login": "Oturum Açmaya Git", + + "log_load_config_failed": "Yapılandırma durumu yüklenemedi: {0}", + "log_gen_cli_failed": "CLI komutları oluşturulamadı: {0}", + "log_add_client_failed": "{0} öğesine eklenemedi: {1}", + "log_remove_client_failed": "{0} öğesinden kaldırılamadı: {1}", + "quick_config_dialog_title": "Tek Tıkla Yapılandırma", + "config_operation_failed": "Yapılandırma işlemi başarısız", + "config_file_not_found_changed_path": "Yapılandırma başarısız: yapılandırma dosyası bulunamadı. {0} özel bir yola kurulmuş olabilir.", + "log_batch_add_failed": "Toplu ekleme başarısız: {0}", + "log_batch_remove_failed": "Toplu kaldırma başarısız: {0}", + "log_copied_config": "{0} yapılandırması panoya kopyalandı", + "log_gen_config_failed": "Yapılandırma oluşturulamadı", + "log_copy_config_failed": "Yapılandırma kopyalanamadı: {0}", + "log_copied_command": "{0} komutu panoya kopyalandı", + "log_copy_command_failed": "Komut kopyalanamadı: {0}", + "log_opened_config_file": "Yapılandırma dosyası açıldı: {0}", + "log_open_config_failed": "Yapılandırma dosyası açılamadı", + "log_open_config_error": "Yapılandırma dosyası açılamadı: {0}", + + "update_available_title": "Güncelleme Mevcut", + "update_new_version": "Yeni sürüm v{0} yayınlandı!", + "update_now": "Şimdi Güncelle", + "update_not_now": "Şimdi Değil", + "update_skip_version": "v{0} sürümünü atla", + "check_for_updates": "Güncellemeleri Denetle", + "update_checking": "Denetleniyor...", + "update_no_update": "En son sürümü kullanıyorsunuz", + "update_urgency_critical": "Kritik Güncelleme", + "update_urgency_high": "Önemli Güncelleme", + "update_current_version": "Geçerli sürüm: v{0}", + "update_changelog": "Değişiklik Günlüğü" + ,"update_changelog_empty": "Bu sürüm için sürüm notu sağlanmadı." + ,"subscription_login_title": "VberAI abonelik hesabı" + ,"subscription_password_label": "Parola" + ,"subscription_password_placeholder": "Parolayı girin" + ,"subscription_login_button": "VberAI ile oturum aç" + ,"subscription_google_button": "Google ile oturum aç" + ,"subscription_google_pending": "Tarayıcı açıldı. Google yetkilendirmesini tamamlayın, ardından Cocos Creator'a dönün." + ,"subscription_google_pending_button": "Google yetkilendirmesi bekleniyor..." + ,"subscription_register_button": "VberAI hesabı oluştur" + ,"subscription_logging_in": "Oturum açılıyor..." + ,"subscription_credentials_required": "Lütfen e-posta ve parolayı girin" + ,"subscription_login_success": "Abonelik hesabıyla oturum açıldı" + ,"subscription_login_failed": "Abonelik oturum açma başarısız" + ,"subscription_not_entitled": "Mevcut aboneliğiniz Cocos 3.x MCP'yi içermiyor. Devam etmek için yükseltin." + ,"subscription_upgrade_to": "Bu ürünü kullanmak için {0} planına yükseltin" + ,"subscription_upgrade_action": "Aboneliği yükselt" + ,"subscription_logged_in": "Oturum açılan hesap" + ,"subscription_choose_button": "VberAI abonelik hesabı" + ,"license_choose_button": "Etkinleştirme kodu" + ,"subscription_method_label": "Abonelik" + ,"back_to_login_choices": "← Başka bir oturum açma yöntemi seç" + ,"subscription_signed_out_other_device": "Oturum kapatıldı: hesabınız başka bir cihazda kullanıldı." + ,"subscription_google_cancelled": "Google ile oturum açma iptal edildi." + ,"subscription_request_timeout": "İstek zaman aşımına uğradı. Ağınızı denetleyip yeniden deneyin." + ,"subscription_network_error": "Ağ bağlantısı başarısız. Ağınızı denetleyip yeniden deneyin." + ,"subscription_server_error": "Sunucu geçersiz bir yanıt döndürdü. Daha sonra yeniden deneyin." + ,"subscription_google_authorization_failed": "Google yetkilendirmesi tamamlanmadı. Lütfen yeniden deneyin." + ,"lan_access_label": "Yerel ağ erişimine izin ver" + ,"lan_access_warning": "0.0.0.0 adresine bağlandı. Bu ağdaki herkes bağlanıp editörü kullanabilir — bu uç nokta hiçbir kimlik bilgisini doğrulamaz. Yalnızca güvendiğiniz ağlarda etkinleştirin." + ,"lan_address": "Yerel ağ adresi" +}; diff --git a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/vi.js b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/vi.js index d261677..3f1f3b4 100644 --- a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/vi.js +++ b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/vi.js @@ -124,11 +124,23 @@ module.exports = { "transport_protocol": "Giao thức truyền tải", "transport_type": "Loại truyền tải", "mcp_url": "MCP URL", - "port_fallback_title": "Cổng {0} không khả dụng — đã chuyển sang {1}", - "port_fallback_reason": "Cổng {0} bị hệ thống dành riêng hoặc bị tường lửa/phần mềm diệt virus chặn (thường gặp trên Windows có cài Hyper-V, WSL2 hoặc Docker). Máy chủ đang chạy bình thường trên cổng mới.", - "port_fallback_resynced": "Đã cập nhật cấu hình cho: {0}. Hãy khởi động lại các client này để cổng mới có hiệu lực.", - "port_fallback_no_clients": "Nếu bạn đã cấu hình client AI, hãy cấu hình lại sang cổng mới bằng thiết lập một chạm.", - "port_fallback_dismiss": "Đã hiểu", + "port_fallback_title": "Cổng {0} đang bận — đã chuyển sang {1}", + "net_title": "Mạng / Proxy", + "net_direct": "Kết nối trực tiếp", + "net_via": "qua {0} ({1})", + "net_source_manual": "thủ công", + "net_source_env": "biến môi trường", + "net_source_system": "cài đặt hệ thống", + "net_mode_auto": "Tự động", + "net_mode_manual": "Chỉ định thủ công", + "net_mode_off": "Không dùng proxy", + "net_save": "Lưu", + "net_test": "Kiểm tra kết nối", + "net_testing": "Đang kiểm tra…", + "net_test_ok": "Kết nối thành công ({0} ms)", + "net_test_fail": "Thất bại: {0}", + "net_hint": "Lỗi hết thời gian đăng nhập thường do mạng. Nếu dùng VPN/proxy, hãy nhập địa chỉ (ví dụ http://127.0.0.1:7890) hoặc chuyển ứng dụng proxy sang chế độ toàn cục (TUN).", + "net_pac_warning": "Hệ thống dùng script PAC tự động mà plugin không đọc được. Hãy chọn \"Chỉ định thủ công\" và nhập địa chỉ proxy.", "port_label": "Cổng", "auto_start_label": "Tự động khởi động", "debug_log_label": "Nhật ký gỡ lỗi", @@ -241,4 +253,7 @@ module.exports = { "subscription_network_error": "Kết nối mạng thất bại. Kiểm tra mạng và thử lại.", "subscription_server_error": "Máy chủ trả về phản hồi không hợp lệ. Thử lại sau.", "subscription_google_authorization_failed": "Ủy quyền Google chưa hoàn tất. Vui lòng thử lại." + ,"lan_access_label": "Cho phép truy cập LAN" + ,"lan_access_warning": "Đã gắn vào 0.0.0.0. Bất kỳ ai trong mạng này đều có thể kết nối và điều khiển trình biên tập — điểm cuối này không xác minh thông tin đăng nhập nào. Chỉ bật trong mạng đáng tin cậy." + ,"lan_address": "Địa chỉ LAN" }; diff --git a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/zh-TW.js b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/zh-TW.js new file mode 100644 index 0000000..d72aa81 --- /dev/null +++ b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/zh-TW.js @@ -0,0 +1,259 @@ +"use strict"; + +module.exports = { + "extension_name": "Cocos MCP 伺服器", + "description": "適用於 Cocos Creator 3.8 的 AI MCP 伺服器", + "panel_title": "MCP 伺服器", + "open_panel": "開啟 MCP 面板", + "start_server": "啟動伺服器", + "stop_server": "停止伺服器", + "server_status": "伺服器狀態", + "port": "連接埠", + "settings": "設定", + "connected": "已連線", + "disconnected": "未連線", + "server_running": "伺服器正在連接埠 {0} 上執行", + "server_stopped": "伺服器已停止", + "auto_start": "自動啟動", + "debug_log": "除錯日誌", + "max_connections": "最大連線數", + "connection_info": "連線資訊", + "http_url": "HTTP 位址", + "copy": "複製", + "save_settings": "儲存設定", + "settings_saved": "設定儲存成功", + "server_started": "MCP 伺服器已啟動", + "server_stopped_msg": "MCP 伺服器已停止", + "failed_to_start": "啟動伺服器失敗", + "failed_to_stop": "停止伺服器失敗", + "failed_to_save": "儲存設定失敗", + "url_copied": "HTTP 位址已複製到剪貼簿", + "tool_manager": "工具管理員", + "open_tool_manager": "開啟工具管理員", + "create_config": "新增設定", + "edit_config": "編輯設定", + "delete_config": "刪除設定", + "import_config": "匯入設定", + "export_config": "匯出設定", + "apply_config": "套用設定", + "select_all": "全選", + "deselect_all": "取消全選", + "save_changes": "儲存變更", + "config_name": "設定名稱", + "config_description": "設定描述", + "current_config": "目前設定", + "tool_management": "工具管理", + "total_tools": "工具總數", + "enabled_tools": "已啟用", + "disabled_tools": "已停用", + "no_config_selected": "尚未選擇設定", + "select_config_first": "請先選擇一個設定,或建立新的設定", + "config_created": "設定建立成功", + "config_updated": "設定更新成功", + "config_deleted": "設定刪除成功", + "config_applied": "設定套用成功", + "config_exported": "設定匯出成功", + "config_imported": "設定匯入成功", + "confirm_delete": "確認刪除", + "delete_config_confirm": "確定要刪除設定 \"{0}\" 嗎?此操作無法復原。", + "max_config_slots_reached": "已達到最大設定插槽數量 ({0})", + "invalid_config_format": "無效的設定格式", + "invalid_json_format": "無效的 JSON 格式或設定結構", + "server_tab": "伺服器", + "tools_tab": "工具管理", + "available_tools": "可用工具", + "scene_tools": "場景工具", + "node_tools": "節點工具", + "component_tools": "元件工具", + "prefab_tools": "預製件工具", + "project_tools": "專案工具", + "debug_tools": "除錯工具", + "preferences_tools": "偏好設定", + "server_tools": "伺服器工具", + "broadcast_tools": "廣播工具", + "scene_advanced_tools": "進階場景工具", + "scene_view_tools": "場景檢視工具", + "reference_image_tools": "參考圖片工具", + "asset_advanced_tools": "進階資源工具", + "validation_tools": "驗證工具", + "brand_name": "李大仙 MCP 系列", + "brand_subtitle": "LiDaxian MCP Series", + "contact_email": "電子郵件", + "contact_wechat": "微信", + "contact_github": "GitHub", + "machine_id_label": "機器碼", + "purchase_renew": "購買/續約", + "purchase_url": "https://www.vberai.com/game-engines/cocos", + "auth_title": "選擇登入方式", + "auth_subtitle": "請輸入您的電子郵件與啟用碼", + "auth_choose_subtitle": "請選擇一種登入方式以繼續", + "email_label": "電子郵件位址", + "activation_code_label": "啟用碼", + "email_placeholder": "請輸入電子郵件", + "code_placeholder": "請輸入啟用碼 (XXXXX-XXXXX-XXXXX-XXXXX-XXXXX)", + "activate_button": "啟用", + "deactivate_button": "取消啟用", + "activating": "啟用中...", + "deactivating": "取消啟用中...", + "license_status": "授權狀態", + "license_type": "授權類型", + "expiry_date": "到期日期", + "days_remaining": "剩餘天數", + "days_unit": "天", + "permanent": "永久", + "expiry_warning_title": "授權即將到期", + "expiry_warning_message": "您的授權將在 {0} 天後到期,請及時續約以確保服務不中斷。", + "renew_now": "立即續約", + "i_understand": "我知道了", + "activation_success": "授權啟用成功!", + "activation_failed": "啟用失敗:{0}", + "invalid_code": "無效的啟用碼格式", + "purchase_license": "購買授權", + "renew_license": "續約授權", + "contact_support": "技術支援", + "language_switch": "繁體中文", + "version_label": "版本", + "license_required": "需要授權才能啟動伺服器", + "license_check_failed": "授權檢查失敗", + + "status_stopped": "已停止", + "status_running": "執行中", + "status_error": "連線失敗", + "config_tab": "一鍵設定", + "status_label": "狀態", + "connections_count": "連線數", + "transport_protocol": "傳輸協定", + "transport_type": "傳輸類型", + "mcp_url": "MCP URL", + "port_fallback_title": "連接埠 {0} 被佔用,已自動改用 {1}", + "net_title": "網路 / 代理", + "net_direct": "直連", + "net_via": "經 {0}({1})", + "net_source_manual": "手動填寫", + "net_source_env": "環境變數", + "net_source_system": "系統設定", + "net_mode_auto": "自動偵測", + "net_mode_manual": "手動指定", + "net_mode_off": "不使用代理", + "net_save": "儲存", + "net_test": "測試連線", + "net_testing": "測試中…", + "net_test_ok": "連線正常({0} ms)", + "net_test_fail": "連線失敗:{0}", + "net_hint": "登入逾時多半是網路問題:伺服器在境外,若你在用 VPN/代理,請在此填寫代理位址(如 http://127.0.0.1:7890),或把代理軟體切到全域(TUN)模式。", + "net_pac_warning": "系統使用了 PAC 自動設定指令碼,外掛無法解析。請改為「手動指定」並填寫代理位址。", + "port_label": "連接埠", + "auto_start_label": "自動啟動", + "debug_log_label": "除錯日誌", + "max_connections_label": "最大連線數", + "server_settings_title": "伺服器設定", + "server_status_title": "伺服器狀態", + "connection_info_title": "連線資訊", + "tools_count": "{0} 個工具", + "tools_stats": "{0} 個工具 ({1} 啟用 / {2} 停用)", + "quick_config_title": "一鍵設定 MCP 用戶端", + "quick_config_desc": "自動將目前的 MCP 伺服器設定到主流 AI 編輯器與 CLI 工具中", + "server_info": "伺服器資訊", + "server_name_label": "伺服器名稱", + "server_address": "伺服器位址", + "timeout_ms": "逾時時間(ms)", + "auto_config_title": "自動設定 (IDE 編輯器 + Codex CLI)", + "add_all": "全部新增", + "remove_all": "全部刪除", + "auto_config_note": "點擊按鈕將自動修改設定檔(包括 Cursor、Windsurf、Trae、Codex CLI)", + "configured": "已設定", + "not_configured": "未設定", + "auto_config_btn": "自動設定", + "delete_btn": "刪除", + "copy_config": "複製設定", + "open_config": "開啟設定", + "manual_config_title": "手動設定 (Claude CLI + Gemini CLI)", + "refresh_commands": "重新整理指令", + "manual_config_note": "以下 CLI 工具需要在終端機中手動執行指令進行設定", + "config_scope": "設定範圍:", + "scope_user": "使用者層級", + "scope_project": "專案層級", + "operation_log": "操作日誌", + "no_logs": "目前沒有操作紀錄", + "copyright_line": "© 2025 李大仙 (LiDaxian) - Cocos Creator MCP Server v{0}", + "protocol_line": "基於 Streamable HTTP 協定 (MCP 2025-03-26)", + "tools_copyright_line1": "工具系統 - 13 個意圖級工具,150+ 編輯器操作,action 操作碼分派", + "config_copyright_line1": "一鍵設定 - 支援 Cursor、Windsurf、Trae、Codex CLI、Claude CLI、Gemini CLI", + "email_required": "請輸入電子郵件與啟用碼", + "permanent_label": "永久", + "logout_button": "登出", + "invite_code_label": "邀請碼", + "copy_button": "複製", + "change_code_button": "變更啟用碼", + "change_code_title": "變更啟用碼", + "change_code_desc": "輸入新的啟用碼,目前裝置的啟用佔位將被釋放後重新啟用。", + "confirm_change": "確認變更", + "cancel": "取消", + "code_required": "請輸入啟用碼", + "expiry_inline_warning": "即將到期!", + "store_purchase_hint": "如果您已在 Cocos Store 購買了本外掛,請聯絡我取得啟用碼。", + "license_expired_title": "授權已過期", + "license_expired_message": "您的授權已過期,無法啟動服務。請續約或重新啟用以繼續使用。", + "go_to_login": "重新登入", + + "log_load_config_failed": "載入設定狀態失敗: {0}", + "log_gen_cli_failed": "產生 CLI 指令失敗: {0}", + "log_add_client_failed": "新增到 {0} 失敗: {1}", + "log_remove_client_failed": "從 {0} 刪除失敗: {1}", + "quick_config_dialog_title": "一鍵設定", + "config_operation_failed": "設定操作失敗", + "config_file_not_found_changed_path": "設定失敗:找不到設定檔,{0} 安裝時可能變更了路徑", + "log_batch_add_failed": "批次新增失敗: {0}", + "log_batch_remove_failed": "批次刪除失敗: {0}", + "log_copied_config": "已複製 {0} 設定到剪貼簿", + "log_gen_config_failed": "產生設定失敗", + "log_copy_config_failed": "複製設定失敗: {0}", + "log_copied_command": "已複製 {0} 指令到剪貼簿", + "log_copy_command_failed": "複製指令失敗: {0}", + "log_opened_config_file": "已開啟設定檔: {0}", + "log_open_config_failed": "開啟設定檔失敗", + "log_open_config_error": "開啟設定檔失敗: {0}", + + "update_available_title": "發現新版本", + "update_new_version": "新版本 v{0} 已發布!", + "update_now": "立即更新", + "update_not_now": "暫不更新", + "update_skip_version": "略過 v{0}", + "check_for_updates": "檢查更新", + "update_checking": "檢查中...", + "update_no_update": "目前已是最新版本", + "update_urgency_critical": "緊急更新", + "update_urgency_high": "重要更新", + "update_current_version": "目前版本: v{0}", + "update_changelog": "更新日誌" + ,"update_changelog_empty": "該版本尚未填寫更新內容。" + ,"subscription_login_title": "VberAI 官網訂閱帳號" + ,"subscription_password_label": "密碼" + ,"subscription_password_placeholder": "請輸入密碼" + ,"subscription_login_button": "使用 VberAI 帳號登入" + ,"subscription_google_button": "使用 Google 登入" + ,"subscription_google_pending": "已開啟瀏覽器,請完成 Google 授權後返回 Cocos Creator。" + ,"subscription_google_pending_button": "正在等待 Google 授權..." + ,"subscription_register_button": "註冊 VberAI 帳號" + ,"subscription_logging_in": "登入中..." + ,"subscription_credentials_required": "請輸入電子郵件與密碼" + ,"subscription_login_success": "訂閱帳號登入成功" + ,"subscription_login_failed": "訂閱帳號登入失敗" + ,"subscription_not_entitled": "目前的訂閱方案不包含 Cocos 3.x MCP,請升級後使用。" + ,"subscription_upgrade_to": "升級到「{0}」即可使用" + ,"subscription_upgrade_action": "前往升級訂閱" + ,"subscription_logged_in": "目前登入帳號" + ,"subscription_choose_button": "VberAI 官網訂閱帳號" + ,"license_choose_button": "啟用碼授權" + ,"subscription_method_label": "訂閱帳號" + ,"back_to_login_choices": "← 返回選擇登入方式" + ,"subscription_signed_out_other_device": "帳號已在另一台裝置登入,目前裝置已登出。" + ,"subscription_google_cancelled": "已取消 Google 登入" + ,"subscription_request_timeout": "請求逾時,請檢查網路後重試。" + ,"subscription_network_error": "網路連線失敗,請檢查網路後重試。" + ,"subscription_server_error": "伺服器回應異常,請稍後重試。" + ,"subscription_google_authorization_failed": "Google 授權未完成,請重試。" + ,"lan_access_label": "允許區域網路存取" + ,"lan_access_warning": "已繫結 0.0.0.0。同一網路內的任何人都能連上並操作編輯器,本介面不驗證任何憑證。請僅在可信任的網路下開啟。" + ,"lan_address": "區域網路位址" +}; diff --git a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/zh.js b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/zh.js index b852f34..390620b 100644 --- a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/zh.js +++ b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/i18n/zh.js @@ -124,11 +124,23 @@ module.exports = { "transport_protocol": "传输协议", "transport_type": "传输类型", "mcp_url": "MCP URL", - "port_fallback_title": "端口 {0} 不可用,已自动切换到 {1}", - "port_fallback_reason": "端口 {0} 被系统保留或被防火墙/杀毒软件拦截(安装了 Hyper-V、WSL2 或 Docker 的 Windows 上很常见)。服务已在新端口上正常运行。", - "port_fallback_resynced": "已自动更新这些客户端的配置:{0}。请重启它们,新端口才会生效。", - "port_fallback_no_clients": "如果已配置过 AI 客户端,请在\"一键配置\"里重新配置到新端口。", - "port_fallback_dismiss": "知道了", + "port_fallback_title": "端口 {0} 被占用,已自动改用 {1}", + "net_title": "网络 / 代理", + "net_direct": "直连", + "net_via": "经 {0}({1})", + "net_source_manual": "手动填写", + "net_source_env": "环境变量", + "net_source_system": "系统设置", + "net_mode_auto": "自动检测", + "net_mode_manual": "手动指定", + "net_mode_off": "不使用代理", + "net_save": "保存", + "net_test": "测试连接", + "net_testing": "测试中…", + "net_test_ok": "连接正常({0} ms)", + "net_test_fail": "连接失败:{0}", + "net_hint": "登录超时多半是网络问题:服务器在境外,若你在用 VPN/代理,请在此填写代理地址(如 http://127.0.0.1:7890),或把代理软件切到全局(TUN)模式。", + "net_pac_warning": "系统使用了 PAC 自动配置脚本,插件无法解析。请改为「手动指定」并填写代理地址。", "port_label": "端口", "auto_start_label": "自动启动", "debug_log_label": "调试日志", @@ -240,4 +252,7 @@ module.exports = { ,"subscription_network_error": "网络连接失败,请检查网络后重试。" ,"subscription_server_error": "服务器响应异常,请稍后重试。" ,"subscription_google_authorization_failed": "Google 授权未完成,请重试。" + ,"lan_access_label": "允许局域网访问" + ,"lan_access_warning": "已绑定 0.0.0.0。同一网络内的任何人都能连上并操作编辑器,本接口不校验任何凭证。仅在可信网络下开启。" + ,"lan_address": "局域网地址" }; diff --git a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/package.json b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/package.json index aa64d74..f99bcb2 100644 --- a/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/package.json +++ b/cocoscreator_projects/YouleNexus/extensions/cocos-mcp-server/package.json @@ -2,7 +2,7 @@ "$schema": "./@types/schema/package/index.json", "package_version": 2, "name": "cocos-mcp-server", - "version": "1.7.9", + "version": "1.8.0", "author": "LiDaxian", "editor": ">=3.7.0", "description": "i18n:cocos-mcp-server.description", @@ -236,6 +236,21 @@ "methods": [ "default.device-removed" ] + }, + "get-network-status": { + "methods": [ + "getNetworkStatus" + ] + }, + "set-proxy-config": { + "methods": [ + "setProxyConfig" + ] + }, + "test-connectivity": { + "methods": [ + "testConnectivity" + ] } }, "scene": { diff --git a/cocoscreator_projects/YouleNexus/settings/.mcp-version b/cocoscreator_projects/YouleNexus/settings/.mcp-version index cb1ad9b..afa2b35 100644 --- a/cocoscreator_projects/YouleNexus/settings/.mcp-version +++ b/cocoscreator_projects/YouleNexus/settings/.mcp-version @@ -1 +1 @@ -1.7.9 \ No newline at end of file +1.8.0 \ No newline at end of file diff --git a/cocoscreator_projects/YouleNexus/settings/mcp-server.json b/cocoscreator_projects/YouleNexus/settings/mcp-server.json index ac6d885..7957055 100644 --- a/cocoscreator_projects/YouleNexus/settings/mcp-server.json +++ b/cocoscreator_projects/YouleNexus/settings/mcp-server.json @@ -5,5 +5,7 @@ "allowedOrigins": [ "*" ], - "maxConnections": 10 + "maxConnections": 10, + "allowLanAccess": false, + "activePort": 3000 } \ No newline at end of file diff --git a/cocoscreator_projects/YouleNexus/settings/tool-manager.json b/cocoscreator_projects/YouleNexus/settings/tool-manager.json index e4f4c2e..6a27f0e 100644 --- a/cocoscreator_projects/YouleNexus/settings/tool-manager.json +++ b/cocoscreator_projects/YouleNexus/settings/tool-manager.json @@ -1,7 +1,7 @@ { "configurations": [ { - "id": "1a189805-4f21-4147-91ab-461fe9ff5f28", + "id": "e5e2ece0-4a82-44e1-8051-43ad5805be23", "name": "默认配置", "description": "自动创建的默认工具配置", "tools": [ @@ -39,7 +39,7 @@ "category": "cocos", "name": "editor", "enabled": true, - "description": "Editor utilities — project info, console logs, preferences, build, preview, run/stop, reload.\nGroups: project_*, console_*, log_*, pref_*, build*, server_*, run, stop, reload.\n\"run\" launches preview (platform: browser/simulator/editor). \"stop\" stops editor preview. \"reload\" reloads editor window (Developer → 重新加载).\nExample: {action:\"run\", platform:\"editor\"} then {action:\"stop\"}" + "description": "Editor utilities — project info, console logs, preferences, build, preview, run/stop/refresh, reload.\nGroups: project_*, console_*, log_*, pref_*, build*, server_*, run, stop, refresh_preview, reload.\n\"run\" launches preview (platform: browser/simulator/editor). \"stop\" stops editor preview. \"refresh_preview\" reloads the ALREADY RUNNING preview in place — use it after editing scenes or scripts instead of stop+run. \"reload\" reloads the editor window itself (Developer → 重新加载).\nExample: {action:\"run\", platform:\"editor\"} → edit something → {action:\"refresh_preview\"} → {action:\"stop\"}" }, { "category": "cocos", @@ -102,10 +102,10 @@ "description": "Label & Text — manage cc.Label, cc.RichText, cc.EditBox. Query/set text, font, style, outline, shadow. Batch operations.\nActions: info, list, set_text, set_font, set_style, set_outline, set_shadow, batch_set_font, batch_set_style.\nSupports: cc.Label (full), cc.RichText (text/font/fontSize/color), cc.EditBox (text/placeholder).\nExample: {action:\"set_text\", node:\"Title\", text:\"Hello\"}\n{action:\"set_style\", node:\"Title\", fontSize:32, isBold:true, color:{r:255,g:0,b:0,a:255}}\n{action:\"batch_set_font\", font:\"db://assets/fonts/myfont.ttf\"}" } ], - "createdAt": "2026-08-18T23:28:53.590Z", - "updatedAt": "2026-08-18T23:28:53.590Z" + "createdAt": "2026-08-27T13:18:56.268Z", + "updatedAt": "2026-08-27T13:18:56.268Z" } ], - "currentConfigId": "1a189805-4f21-4147-91ab-461fe9ff5f28", + "currentConfigId": "e5e2ece0-4a82-44e1-8051-43ad5805be23", "maxConfigSlots": 5 } \ No newline at end of file diff --git a/projects/Game_Surface_3/js/00_Surface/04_Data.js b/projects/Game_Surface_3/js/00_Surface/04_Data.js index 8321e70..0f464ba 100644 --- a/projects/Game_Surface_3/js/00_Surface/04_Data.js +++ b/projects/Game_Surface_3/js/00_Surface/04_Data.js @@ -142,7 +142,7 @@ GameData.hallConfigName = ["enablePay", 'wareHouse',//是否开启仓库功能0->不开启1->开启保险箱不开启赠送2->开启赠送不开启保险箱3->开启星星赠送(开启保险箱)4->开启房卡赠送(开启保险箱)5->开启星星房卡赠送(开启保险箱) 'betaText',//版本号后的beta显示内容 'launchImgUrl',//启动页图片地址 - 'shareType:',//分享朋友圈类型0->链接分享 1->图片分享 + 'shareType',//分享朋友圈类型0->链接分享 1->图片分享 'shareImgUrl',//分享朋友圈图片链接 'launchWaitTime',//启动等待时间 'shareBgUrl',//分享背景图片 @@ -151,7 +151,8 @@ GameData.hallConfigName = ["enablePay", 'channelKey',//支付key 'payCSS',//支付css 'payJS',//支付js - 'openVideo' + 'openVideo', + 'showVisitor'//是否显示游客登陆 ];//是否开启视频]; GameData.hallConfig = { enablePay:0, @@ -185,6 +186,7 @@ GameData.hallConfig = { payCSS:"",//支付css payJS:"",//支付js openVideo:0,//是否开启视频 + showVisitor:0//是否显示游客登陆 }; GameData.starName = "星星"; GameData.roomCardName = "房卡"; diff --git a/projects/Game_Surface_3/js/00_Surface/05_Func.js b/projects/Game_Surface_3/js/00_Surface/05_Func.js index 6689ccc..696f6ff 100644 --- a/projects/Game_Surface_3/js/00_Surface/05_Func.js +++ b/projects/Game_Surface_3/js/00_Surface/05_Func.js @@ -15,16 +15,16 @@ */ var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ -var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */ -var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ +var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */ +var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ /* * These are the functions you'll usually want to call * They take string arguments and return either hex or base-64 encoded strings */ -function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));} -function b64_md5(s){ return binl2b64(core_md5(str2binl(s), s.length * chrsz));} -function str_md5(s){ return binl2str(core_md5(str2binl(s), s.length * chrsz));} +function hex_md5(s) { return binl2hex(core_md5(str2binl(s), s.length * chrsz)); } +function b64_md5(s) { return binl2b64(core_md5(str2binl(s), s.length * chrsz)); } +function str_md5(s) { return binl2str(core_md5(str2binl(s), s.length * chrsz)); } function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); } function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); } function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); } @@ -32,230 +32,211 @@ function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); } /* * Perform a simple self-test to see if the VM is working */ -function md5_vm_test() -{ - return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"; +function md5_vm_test() { + return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"; } /* * Calculate the MD5 of an array of little-endian words, and a bit length */ -function core_md5(x, len) -{ - /* append padding */ - x[len >> 5] |= 0x80 << ((len) % 32); - x[(((len + 64) >>> 9) << 4) + 14] = len; +function core_md5(x, len) { + /* append padding */ + x[len >> 5] |= 0x80 << ((len) % 32); + x[(((len + 64) >>> 9) << 4) + 14] = len; - var a = 1732584193; - var b = -271733879; - var c = -1732584194; - var d = 271733878; + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; - for(var i = 0; i < x.length; i += 16) - { - var olda = a; - var oldb = b; - var oldc = c; - var oldd = d; + for (var i = 0; i < x.length; i += 16) { + var olda = a; + var oldb = b; + var oldc = c; + var oldd = d; - a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); - d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); - c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); - b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); - a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); - d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); - c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); - b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); - a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); - d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); - c = md5_ff(c, d, a, b, x[i+10], 17, -42063); - b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); - a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); - d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); - c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); - b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); + a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936); + d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586); + c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819); + b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330); + a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897); + d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426); + c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341); + b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983); + a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416); + d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417); + c = md5_ff(c, d, a, b, x[i + 10], 17, -42063); + b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162); + a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682); + d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101); + c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290); + b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329); - a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); - d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); - c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); - b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); - a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); - d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); - c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); - b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); - a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); - d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); - c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); - b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); - a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); - d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); - c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); - b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); + a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510); + d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632); + c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713); + b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302); + a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691); + d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083); + c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335); + b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848); + a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438); + d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690); + c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961); + b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501); + a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467); + d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784); + c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473); + b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734); - a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); - d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); - c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); - b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); - a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); - d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); - c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); - b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); - a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); - d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); - c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); - b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); - a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); - d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); - c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); - b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); + a = md5_hh(a, b, c, d, x[i + 5], 4, -378558); + d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463); + c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562); + b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556); + a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060); + d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353); + c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632); + b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640); + a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174); + d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222); + c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979); + b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189); + a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487); + d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835); + c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520); + b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651); - a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); - d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); - c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); - b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); - a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); - d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); - c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); - b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); - a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); - d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); - c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); - b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); - a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); - d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); - c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); - b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); + a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844); + d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415); + c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905); + b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055); + a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571); + d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606); + c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523); + b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799); + a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359); + d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744); + c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380); + b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649); + a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070); + d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379); + c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259); + b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551); - a = safe_add(a, olda); - b = safe_add(b, oldb); - c = safe_add(c, oldc); - d = safe_add(d, oldd); - } - return Array(a, b, c, d); + a = safe_add(a, olda); + b = safe_add(b, oldb); + c = safe_add(c, oldc); + d = safe_add(d, oldd); + } + return Array(a, b, c, d); } /* * These functions implement the four basic operations the algorithm uses. */ -function md5_cmn(q, a, b, x, s, t) -{ - return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); +function md5_cmn(q, a, b, x, s, t) { + return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b); } -function md5_ff(a, b, c, d, x, s, t) -{ - return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); +function md5_ff(a, b, c, d, x, s, t) { + return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); } -function md5_gg(a, b, c, d, x, s, t) -{ - return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); +function md5_gg(a, b, c, d, x, s, t) { + return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); } -function md5_hh(a, b, c, d, x, s, t) -{ - return md5_cmn(b ^ c ^ d, a, b, x, s, t); +function md5_hh(a, b, c, d, x, s, t) { + return md5_cmn(b ^ c ^ d, a, b, x, s, t); } -function md5_ii(a, b, c, d, x, s, t) -{ - return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); +function md5_ii(a, b, c, d, x, s, t) { + return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); } /* * Calculate the HMAC-MD5, of a key and some data */ -function core_hmac_md5(key, data) -{ - var bkey = str2binl(key); - if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz); +function core_hmac_md5(key, data) { + var bkey = str2binl(key); + if (bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz); - var ipad = Array(16), opad = Array(16); - for(var i = 0; i < 16; i++) - { - ipad[i] = bkey[i] ^ 0x36363636; - opad[i] = bkey[i] ^ 0x5C5C5C5C; - } + var ipad = Array(16), opad = Array(16); + for (var i = 0; i < 16; i++) { + ipad[i] = bkey[i] ^ 0x36363636; + opad[i] = bkey[i] ^ 0x5C5C5C5C; + } - var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz); - return core_md5(opad.concat(hash), 512 + 128); + var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz); + return core_md5(opad.concat(hash), 512 + 128); } /* * Add integers, wrapping at 2^32. This uses 16-bit operations internally * to work around bugs in some JS interpreters. */ -function safe_add(x, y) -{ - var lsw = (x & 0xFFFF) + (y & 0xFFFF); - var msw = (x >> 16) + (y >> 16) + (lsw >> 16); - return (msw << 16) | (lsw & 0xFFFF); +function safe_add(x, y) { + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); } /* * Bitwise rotate a 32-bit number to the left. */ -function bit_rol(num, cnt) -{ - return (num << cnt) | (num >>> (32 - cnt)); +function bit_rol(num, cnt) { + return (num << cnt) | (num >>> (32 - cnt)); } /* * Convert a string to an array of little-endian words * If chrsz is ASCII, characters >255 have their hi-byte silently ignored. */ -function str2binl(str) -{ - var bin = Array(); - var mask = (1 << chrsz) - 1; - for(var i = 0; i < str.length * chrsz; i += chrsz) - bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32); - return bin; +function str2binl(str) { + var bin = Array(); + var mask = (1 << chrsz) - 1; + for (var i = 0; i < str.length * chrsz; i += chrsz) + bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (i % 32); + return bin; } /* * Convert an array of little-endian words to a string */ -function binl2str(bin) -{ - var str = ""; - var mask = (1 << chrsz) - 1; - for(var i = 0; i < bin.length * 32; i += chrsz) - str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask); - return str; +function binl2str(bin) { + var str = ""; + var mask = (1 << chrsz) - 1; + for (var i = 0; i < bin.length * 32; i += chrsz) + str += String.fromCharCode((bin[i >> 5] >>> (i % 32)) & mask); + return str; } /* * Convert an array of little-endian words to a hex string. */ -function binl2hex(binarray) -{ - var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; - var str = ""; - for(var i = 0; i < binarray.length * 4; i++) - { - str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) + - hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF); - } - return str; +function binl2hex(binarray) { + var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; + var str = ""; + for (var i = 0; i < binarray.length * 4; i++) { + str += hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8 + 4)) & 0xF) + + hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8)) & 0xF); + } + return str; } /* * Convert an array of little-endian words to a base-64 string */ -function binl2b64(binarray) -{ - var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - var str = ""; - for(var i = 0; i < binarray.length * 4; i += 3) - { - var triplet = (((binarray[i >> 2] >> 8 * ( i %4)) & 0xFF) << 16) - | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 ) - | ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF); - for(var j = 0; j < 4; j++) - { - if(i * 8 + j * 6 > binarray.length * 32) str += b64pad; - else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); - } - } - return str; +function binl2b64(binarray) { + var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + var str = ""; + for (var i = 0; i < binarray.length * 4; i += 3) { + var triplet = (((binarray[i >> 2] >> 8 * (i % 4)) & 0xFF) << 16) + | (((binarray[i + 1 >> 2] >> 8 * ((i + 1) % 4)) & 0xFF) << 8) + | ((binarray[i + 2 >> 2] >> 8 * ((i + 2) % 4)) & 0xFF); + for (var j = 0; j < 4; j++) { + if (i * 8 + j * 6 > binarray.length * 32) str += b64pad; + else str += tab.charAt((triplet >> 6 * (3 - j)) & 0x3F); + } + } + return str; } var _context = null; @@ -266,239 +247,239 @@ _gameSoundsObj.completed = false; _gameSoundsObj.soundList = {}; _gameSoundsObj.requestList = {}; _gameSoundsObj.autoBgmList = {}; -_gameSoundsObj.loadAudio = function(item,callback){ - var src = "assets/wav/"+item.src; - if (!_context) callback('Audio Downloader: no web audio context.',null); +_gameSoundsObj.loadAudio = function (item, callback) { + var src = "assets/wav/" + item.src; + if (!_context) callback('Audio Downloader: no web audio context.', null); //var request = new XMLHttpRequest(); - //request.open("GET", src, true); - //request.responseType = "arraybuffer"; + //request.open("GET", src, true); + //request.responseType = "arraybuffer"; - //request.onload = function () { - //_context["decodeAudioData"](request.response, function(buffer){ - //item.buffer = buffer; - //_gameSoundsObj.soundList[item.id] = item; - //_gameSoundsObj.soundList[item.id].touched = false; - //callback(null, item.src); - //}, function(){ - //callback('decode error - ' + item.src,null); - //}); - //}; + //request.onload = function () { + //_context["decodeAudioData"](request.response, function(buffer){ + //item.buffer = buffer; + //_gameSoundsObj.soundList[item.id] = item; + //_gameSoundsObj.soundList[item.id].touched = false; + //callback(null, item.src); + //}, function(){ + //callback('decode error - ' + item.src,null); + //}); + //}; - //request.onerror = function(){ - //callback('request error - ' + item.src,null); - //}; + //request.onerror = function(){ + //callback('request error - ' + item.src,null); + //}; - //request.send(); - _gameSoundsObj.requestList[item.src] = new XMLHttpRequest(); - _gameSoundsObj.requestList[item.src].open("GET", src, true); - _gameSoundsObj.requestList[item.src].responseType = "arraybuffer"; + //request.send(); + _gameSoundsObj.requestList[item.src] = new XMLHttpRequest(); + _gameSoundsObj.requestList[item.src].open("GET", src, true); + _gameSoundsObj.requestList[item.src].responseType = "arraybuffer"; - _gameSoundsObj.requestList[item.src].onload = function () { - _context["decodeAudioData"](_gameSoundsObj.requestList[item.src].response, function(buffer){ - item.buffer = buffer; - _gameSoundsObj.completedLoad++; - //logmessage(_gameSoundsObj.completedLoad+"/"+_gameSoundsObj.loadCount,1); - _gameSoundsObj.soundList[item.id] = item; - _gameSoundsObj.soundList[item.id].touched = false; - //var source = _context.createBufferSource(); + _gameSoundsObj.requestList[item.src].onload = function () { + _context["decodeAudioData"](_gameSoundsObj.requestList[item.src].response, function (buffer) { + item.buffer = buffer; + _gameSoundsObj.completedLoad++; + //logmessage(_gameSoundsObj.completedLoad+"/"+_gameSoundsObj.loadCount,1); + _gameSoundsObj.soundList[item.id] = item; + _gameSoundsObj.soundList[item.id].touched = false; + //var source = _context.createBufferSource(); //source.buffer = _gameSoundsObj.soundList[item.id].buffer;// //source.connect(_context.destination);// - callback(null, item.src); - }, function(){ - callback('decode error - ' + item.src,null); - }); - }; + callback(null, item.src); + }, function () { + callback('decode error - ' + item.src, null); + }); + }; - _gameSoundsObj.requestList[item.src].onerror = function(){ - callback('request error - ' + item.src,null); - }; + _gameSoundsObj.requestList[item.src].onerror = function () { + callback('request error - ' + item.src, null); + }; - _gameSoundsObj.requestList[item.src].send(); - if(GameData.OS == ConstVal.OS.apple){ + _gameSoundsObj.requestList[item.src].send(); + if (GameData.OS == ConstVal.OS.apple) { document.addEventListener('touchstart', function () { - //logmessage("touchstart1",1); - if(!_gameSoundsObj.completed){ - //logmessage("touchstart2",1); - var scount = 0; - for(src in _gameSoundsObj.soundList){ - scount++; + //logmessage("touchstart1",1); + if (!_gameSoundsObj.completed) { + //logmessage("touchstart2",1); + var scount = 0; + for (src in _gameSoundsObj.soundList) { + scount++; //for(var i=0;i<_gameSoundsObj.soundList[src].sourceList.length;i++){ - try{ - if(!_gameSoundsObj.soundList[src].touched){ - //logmessage("touched"+_gameSoundsObj.soundList[src].id,1); - _gameSoundsObj.soundList[src].touched = true; - _gameSoundsObj.soundList[src].connected = true; - var source = _context.createBufferSource(); - source.buffer = _gameSoundsObj.soundList[src].buffer;// - source.connect(_context.destination);// - } - - }catch(e){ - + try { + if (!_gameSoundsObj.soundList[src].touched) { + //logmessage("touched"+_gameSoundsObj.soundList[src].id,1); + _gameSoundsObj.soundList[src].touched = true; + _gameSoundsObj.soundList[src].connected = true; + var source = _context.createBufferSource(); + source.buffer = _gameSoundsObj.soundList[src].buffer;// + source.connect(_context.destination);// } + + } catch (e) { + + } //} } - for(src in _gameSoundsObj.autoBgmList){ - try{ - - //logmessage(src+"touched:"+_gameSoundsObj.soundList[src].touched+"、connected:"+_gameSoundsObj.soundList[src].connected,1); - if(_gameSoundsObj.soundList[src].touched && _gameSoundsObj.soundList[src].connected){ - //logmessage("autoBgmList:"+_gameSoundsObj.soundList[src].id,1); - _gameSoundsObj.play(src,true); - delete _gameSoundsObj.autoBgmList.src; - break; - } - - }catch(e){ + for (src in _gameSoundsObj.autoBgmList) { + try { + //logmessage(src+"touched:"+_gameSoundsObj.soundList[src].touched+"、connected:"+_gameSoundsObj.soundList[src].connected,1); + if (_gameSoundsObj.soundList[src].touched && _gameSoundsObj.soundList[src].connected) { + //logmessage("autoBgmList:"+_gameSoundsObj.soundList[src].id,1); + _gameSoundsObj.play(src, true); + delete _gameSoundsObj.autoBgmList.src; + break; } + + } catch (e) { + + } } - - for(var i=0;i0){//背景音 + if (loop && item.sourceList.length > 0) {//背景音 return; } //logmessage("_gameSoundsObj.play2",1); var source = _context.createBufferSource(); - - source.buffer = item.buffer;// - source.connect(_context.destination);// - source.loop = loop; - source.playing = true; - source.isEnded = false; - source.onended = function(){ - this.isEnded = true; - this.playing = false; - _gameSoundsObj.clearEndedSource(); + + source.buffer = item.buffer;// + source.connect(_context.destination);// + source.loop = loop; + source.playing = true; + source.isEnded = false; + source.onended = function () { + this.isEnded = true; + this.playing = false; + _gameSoundsObj.clearEndedSource(); } - item.sourceList.push(source); + item.sourceList.push(source); //logmessage("play",1); - source.start(0);// - }catch(e){ + source.start(0);// + } catch (e) { } - + } -_gameSoundsObj.stop = function(src){ - try{ +_gameSoundsObj.stop = function (src) { + try { //logmessage("stop1:"+src,1); - for(var i=0;i<_gameSoundsObj.soundList[src].sourceList.length;i++){ + for (var i = 0; i < _gameSoundsObj.soundList[src].sourceList.length; i++) { //logmessage("stop2:"+src,1); - if(!_gameSoundsObj.soundList[src].sourceList[i].isEnded){ - + if (!_gameSoundsObj.soundList[src].sourceList[i].isEnded) { + _gameSoundsObj.soundList[src].sourceList[i].stop(); _gameSoundsObj.soundList[src].sourceList[i].isEnded = true; - _gameSoundsObj.soundList[src].sourceList[i].splice(i,1); + _gameSoundsObj.soundList[src].sourceList[i].splice(i, 1); i--; } - + } - for(src in _gameSoundsObj.autoBgmList){ - try{ + for (src in _gameSoundsObj.autoBgmList) { + try { //logmessage(src+"touched2:"+_gameSoundsObj.soundList[src].touched+"、connected:"+_gameSoundsObj.soundList[src].connected,1); - if(_gameSoundsObj.soundList[src]){ + if (_gameSoundsObj.soundList[src]) { //logmessage("autoBgmList2:"+_gameSoundsObj.soundList[src].id,1); delete _gameSoundsObj.autoBgmList.src; } - }catch(e){ + } catch (e) { } - } - }catch(e){ + } + } catch (e) { } } -_gameSoundsObj.clearAllSource = function(src){ - for(var i=0;i<_gameSoundsObj.soundList[src].sourceList.length;i++){ - try{ - if(!_gameSoundsObj.soundList[src].sourceList[i].isEnded){ +_gameSoundsObj.clearAllSource = function (src) { + for (var i = 0; i < _gameSoundsObj.soundList[src].sourceList.length; i++) { + try { + if (!_gameSoundsObj.soundList[src].sourceList[i].isEnded) { _gameSoundsObj.soundList[src].sourceList[i].stop(); } _gameSoundsObj.soundList[src].sourceList = null; - }catch(e){ + } catch (e) { } } _gameSoundsObj.soundList[src].sourceList = []; } -_gameSoundsObj.clearEndedSource = function(){ - for(src in _gameSoundsObj.soundList){ - for(var i=0;i<_gameSoundsObj.soundList[src].sourceList.length;i++){ - try{ - if(_gameSoundsObj.soundList[src].sourceList[i].isEnded){ - _gameSoundsObj.soundList[src].sourceList.splice(i,1); +_gameSoundsObj.clearEndedSource = function () { + for (src in _gameSoundsObj.soundList) { + for (var i = 0; i < _gameSoundsObj.soundList[src].sourceList.length; i++) { + try { + if (_gameSoundsObj.soundList[src].sourceList[i].isEnded) { + _gameSoundsObj.soundList[src].sourceList.splice(i, 1); i--; } - }catch(e){ + } catch (e) { } } @@ -506,126 +487,126 @@ _gameSoundsObj.clearEndedSource = function(){ } var dynamicLoading = { - css: function(path){ - if(!path || path.length === 0){ + css: function (path) { + if (!path || path.length === 0) { throw new Error('argument "path" is required !'); } var head = document.getElementsByTagName('head')[0]; - var link = document.createElement('link'); - link.href = path; - link.rel = 'stylesheet'; - link.type = 'text/css'; - head.appendChild(link); - }, - js: function(path){ - if(!path || path.length === 0){ + var link = document.createElement('link'); + link.href = path; + link.rel = 'stylesheet'; + link.type = 'text/css'; + head.appendChild(link); + }, + js: function (path) { + if (!path || path.length === 0) { throw new Error('argument "path" is required !'); } var head = document.getElementsByTagName('head')[0]; - var script = document.createElement('script'); - script.src = path; - script.type = 'text/javascript'; - head.appendChild(script); - } + var script = document.createElement('script'); + script.src = path; + script.type = 'text/javascript'; + head.appendChild(script); + } } -var setPostUrl = function setPostUrl(url){ +var setPostUrl = function setPostUrl(url) { GameData.sharePostUrl = url; } -var isArray = function isArray(o){ - return Object.prototype.toString.call(o)=='[object Array]'; +var isArray = function isArray(o) { + return Object.prototype.toString.call(o) == '[object Array]'; } -var gameLog = function gameLog(msg,mode){ +var gameLog = function gameLog(msg, mode) { //logmessage(msg,1); } -var checkMobile = function checkMobile(sMobile){ - //var sMobile = document.mobileform.mobile.value +var checkMobile = function checkMobile(sMobile) { + //var sMobile = document.mobileform.mobile.value ///^1[3|4|5|7|8|9][0-9]{9}$/ - if(!(/^1[3|4|5|6|7|8|9][0-9]{9}$/.test(sMobile))){ - return false; - } - return true; -} -var sliceStrByKey = function(str,key){ + if (!(/^1[3|4|5|6|7|8|9][0-9]{9}$/.test(sMobile))) { + return false; + } + return true; +} +var sliceStrByKey = function (str, key) { var idx = str.indexOf(key); - if(idx>-1){ - return str.slice(0,idx); + if (idx > -1) { + return str.slice(0, idx); } return str; } //获取网页参数 -var fGetQuery = function(name){//获取参数值 +var fGetQuery = function (name) {//获取参数值 //var sUrl = window.location.search.substr(1); //var r = sUrl.match(new RegExp("(^|&)" + name + "=([^&]*)(&|$)")); //return (r == null ? null : unescape(r[2])); - if(typeof(window.location.search)!="undefined"&&window.location.search!=''){ + if (typeof (window.location.search) != "undefined" && window.location.search != '') { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); - var r = window.location.search.substr(1).match(reg); - if (r != null) { - return r[2]; - } - } - return null; + var r = window.location.search.substr(1).match(reg); + if (r != null) { + return r[2]; + } + } + return null; } -var fGetQuery1 = function(url,name){//获取参数值 +var fGetQuery1 = function (url, name) {//获取参数值 //if(typeof(window.location.search)!="undefined"&&window.location.search!=''){ - var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); - var r = url.slice(url.indexOf("?"),url.length).substr(1).match(reg); - if (r != null) { - return r[2]; - } - //} - return null; + var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); + var r = url.slice(url.indexOf("?"), url.length).substr(1).match(reg); + if (r != null) { + return r[2]; + } + //} + return null; } -var fixUrl = function(url){ - +var fixUrl = function (url) { + var idx = url.indexOf("?"); - if(idx>-1){ - var preUrl = url.substr(0,idx+1); - var subUrl = url.substr(idx+1,url.length); - return preUrl+min_replaceAll(subUrl,"\\?","&"); - }else{ + if (idx > -1) { + var preUrl = url.substr(0, idx + 1); + var subUrl = url.substr(idx + 1, url.length); + return preUrl + min_replaceAll(subUrl, "\\?", "&"); + } else { return url; } } -var addParam = function(url,paramKey,paramVal){ - var andStr = "?"; - var beforeparam = url.indexOf("?"); - if(beforeparam != -1){ - andStr = "&"; - } - return url + andStr + paramKey + "="+ encodeURIComponent(paramVal); +var addParam = function (url, paramKey, paramVal) { + var andStr = "?"; + var beforeparam = url.indexOf("?"); + if (beforeparam != -1) { + andStr = "&"; + } + return url + andStr + paramKey + "=" + encodeURIComponent(paramVal); } -var delParam = function(url,paramKey){ - var urlParam = url.substr(url.indexOf("?")+1); - var beforeUrl = url.substr(0,url.indexOf("?")); - var nextUrl = ""; - - var arr = new Array(); - if(urlParam!=""){ - var urlParamArr = urlParam.split("&"); - - for(var i=0;i0){ - nextUrl = "?"+arr.join("&"); - } - url = beforeUrl+nextUrl; - return url; +var delParam = function (url, paramKey) { + var urlParam = url.substr(url.indexOf("?") + 1); + var beforeUrl = url.substr(0, url.indexOf("?")); + var nextUrl = ""; + + var arr = new Array(); + if (urlParam != "") { + var urlParamArr = urlParam.split("&"); + + for (var i = 0; i < urlParamArr.length; i++) { + var paramArr = urlParamArr[i].split("="); + if (paramArr[0] != paramKey) { + arr.push(urlParamArr[i]); + } + } + } + + if (arr.length > 0) { + nextUrl = "?" + arr.join("&"); + } + url = beforeUrl + nextUrl; + return url; } -var Func=Func||{}; +var Func = Func || {}; var bForcepc = fGetQuery("dv") == "pc"; //获取当前系统 -var fBrowserRedirect = function(){ -//function fBrowserRedirect(){ +var fBrowserRedirect = function () { + //function fBrowserRedirect(){ var sUserAgent = navigator.userAgent.toLowerCase(); var bIsIpad = sUserAgent.match(/ipad/i) == "ipad"; var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os"; @@ -635,65 +616,65 @@ var fBrowserRedirect = function(){ var bIsAndroid = sUserAgent.match(/android/i) == "android"; var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce"; var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile"; - if(bIsIpad||bIsIphoneOs){ + if (bIsIpad || bIsIphoneOs) { return ConstVal.OS.apple; } - if(bIsAndroid){ + if (bIsAndroid) { return ConstVal.OS.android; } - if(bIsWM){ + if (bIsWM) { return ConstVal.OS.winphone; } return ConstVal.OS.other; } -var getQueryString =function(name) { - if(typeof(window.location.search)!="undefined"&&window.location.search!=''){ +var getQueryString = function (name) { + if (typeof (window.location.search) != "undefined" && window.location.search != '') { - var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); - var r = window.location.search.substr(1).match(reg); - if (r !== null) { - return r[2]; - } - } - return null; + var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); + var r = window.location.search.substr(1).match(reg); + if (r !== null) { + return r[2]; + } + } + return null; } -var strToJson =function(str){ - var json = eval('(' + str + ')'); - return json; +var strToJson = function (str) { + var json = eval('(' + str + ')'); + return json; //return JSON.parse(str); - + } //获取字符字节长度 -String.prototype.gblen = function() { - var len = 0; - for (var i=0; i127 || this.charCodeAt(i)==94) { - len += 2; - } else { - len ++; - } - } - return len; +String.prototype.gblen = function () { + var len = 0; + for (var i = 0; i < this.length; i++) { + if (this.charCodeAt(i) > 127 || this.charCodeAt(i) == 94) { + len += 2; + } else { + len++; + } + } + return len; } //克隆数组 -Func.cloneArray = function(input_arr){ +Func.cloneArray = function (input_arr) { return [].concat(input_arr); } //精确乘法 -Func.accMul = function(arg1,arg2){ - var m=0,s1=arg1.toString(),s2=arg2.toString(); - try{m+=s1.split(".")[1].length}catch(e){} - try{m+=s2.split(".")[1].length}catch(e){} - return Number(s1.replace(".",""))*Number(s2.replace(".",""))/Math.pow(10,m); +Func.accMul = function (arg1, arg2) { + var m = 0, s1 = arg1.toString(), s2 = arg2.toString(); + try { m += s1.split(".")[1].length } catch (e) { } + try { m += s2.split(".")[1].length } catch (e) { } + return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m); } //敏感词过滤 -Func.filter = function(str) { +Func.filter = function (str) { for (var i = 0; i < arrBan.length; i++) { - if(str.indexOf(arrBan[i])>=0 && arrBan[i]){ + if (str.indexOf(arrBan[i]) >= 0 && arrBan[i]) { return true; } } @@ -702,46 +683,45 @@ Func.filter = function(str) { } //字符是否为空 -Func.strisNull =function( str ){ - if ( str == "" ) return true; +Func.strisNull = function (str) { + if (str == "") return true; var regu = "^[ ]+$"; var re = new RegExp(regu); return re.test(str); } -Func.setTextArea = function(id,isResize,maxlen){//精灵id,是否禁用大小调整,最大输入长度 +Func.setTextArea = function (id, isResize, maxlen) {//精灵id,是否禁用大小调整,最大输入长度 var obj = null; - obj = gameabc_face.getdiv("div"+id); - if(isResize){ + obj = gameabc_face.getdiv("div" + id); + if (isResize) { obj.style.resize = "none"; } - if(maxlen){ - try{ + if (maxlen) { + try { maxlen = Number(maxlen); - }catch(e){ - return ; - } - obj.maxLength = maxlen; - } + } catch (e) { + return; + } + obj.maxLength = maxlen; + } obj = null; } -Func.setInput = function(id,maxlen){//精灵id,是否禁用大小调整,最大输入长度 - other_setdom("div"+id,"maxlength",maxlen); +Func.setInput = function (id, maxlen) {//精灵id,是否禁用大小调整,最大输入长度 + other_setdom("div" + id, "maxlength", maxlen); } -Func.SetText=function(_msg,len){ - var text_copy=""; - for(var k=0;k<_msg.length;k++){ - text_copy+=_msg[k]; - if(k%len==0&&k!=0){ - text_copy+="\n"; +Func.SetText = function (_msg, len) { + var text_copy = ""; + for (var k = 0; k < _msg.length; k++) { + text_copy += _msg[k]; + if (k % len == 0 && k != 0) { + text_copy += "\n"; } } return text_copy; } -Func.AjaxHttp = function(_data, func_callbackSucc, func_callbackFail, obj_inputmsg) -{ -// +Func.AjaxHttp = function (_data, func_callbackSucc, func_callbackFail, obj_inputmsg) { + // var obj_config = {}; obj_config.url = GameData.AjaxUrl; obj_config.callbackdata = obj_inputmsg; @@ -751,8 +731,7 @@ Func.AjaxHttp = function(_data, func_callbackSucc, func_callbackFail, obj_inputm obj_config.error = func_callbackFail; min_http(obj_config); } -Func.AjaxHttp2 = function(_url,_data, func_callbackSucc, func_callbackFail, obj_inputmsg) -{ +Func.AjaxHttp2 = function (_url, _data, func_callbackSucc, func_callbackFail, obj_inputmsg) { var obj_config = {}; obj_config.url = _url; @@ -763,11 +742,10 @@ Func.AjaxHttp2 = function(_url,_data, func_callbackSucc, func_callbackFail, obj_ obj_config.error = func_callbackFail; min_http(obj_config); } -Func.AjaxHttp3 = function(_url,_data, func_callbackSucc, func_callbackFail, obj_inputmsg) -{ +Func.AjaxHttp3 = function (_url, _data, func_callbackSucc, func_callbackFail, obj_inputmsg) { //var sData = "?"; //for(var key in _data){ - //sData += "&"+key+"="+_data[key]; + //sData += "&"+key+"="+_data[key]; //} var obj_config = {}; obj_config.url = _url; @@ -778,44 +756,44 @@ Func.AjaxHttp3 = function(_url,_data, func_callbackSucc, func_callbackFail, obj_ obj_config.error = func_callbackFail; min_http(obj_config); } -var IDValidator = function() { +var IDValidator = function () { var param = { - error : { - longNumber : '长数字存在精度问题,请使用字符串传值! Long number is not allowed, because the precision of the Number In JavaScript.' + error: { + longNumber: '长数字存在精度问题,请使用字符串传值! Long number is not allowed, because the precision of the Number In JavaScript.' } }; var util = { - checkArg : function(id) { + checkArg: function (id) { var argType = (typeof id); switch (argType) { - case 'number': - // long number not allowed - id = id.toString(); - if (id.length > 15) { - this.error(param.error.longNumber); + case 'number': + // long number not allowed + id = id.toString(); + if (id.length > 15) { + this.error(param.error.longNumber); + return false; + } + break; + case 'string': + break; + default: return false; - } - break; - case 'string': - break; - default: - return false; } id = id.toUpperCase(); var code = null; if (id.length === 18) { // 18位 code = { - body : id.slice(0, 17), - checkBit : id.slice(-1), - type : 18 + body: id.slice(0, 17), + checkBit: id.slice(-1), + type: 18 }; } else if (id.length === 15) { // 15位 code = { - body : id, - type : 15 + body: id, + type: 15 }; } else { return false; @@ -824,13 +802,13 @@ var IDValidator = function() { } // 地址码检查 , - checkAddr : function(addr, GB2260) { + checkAddr: function (addr, GB2260) { var addrInfo = this.getAddrInfo(addr, GB2260); return (addrInfo === false ? false : true); } // 取得地址码信息 , - getAddrInfo : function(addr, GB2260) { + getAddrInfo: function (addr, GB2260) { GB2260 = GB2260 || null; // 查询GB/T2260,没有引入GB2260时略过 if (GB2260 === null) { @@ -856,7 +834,7 @@ var IDValidator = function() { } // 生日码检查 , - checkBirth : function(birth) { + checkBirth: function (birth) { var year, month, day; if (birth.length == 8) { year = parseInt(birth.slice(0, 4), 10); @@ -882,25 +860,25 @@ var IDValidator = function() { } // 顺序码检查 , - checkOrder : function(order) { + checkOrder: function (order) { // 暂无需检测 return true; } // 加权 , - weight : function(t) { + weight: function (t) { return Math.pow(2, t - 1) % 11; } // 随机整数 , - rand : function(max, min) { + rand: function (max, min) { min = min || 1; return Math.round(Math.random() * (max - min)) + min; } // 数字补位 , - str_pad : function(str, len, chr, right) { + str_pad: function (str, len, chr, right) { str = str.toString(); len = len || 2; chr = chr || '0'; @@ -920,13 +898,13 @@ var IDValidator = function() { } // 抛错 , - error : function(msg) { + error: function (msg) { var e = new Error(); e.message = 'IDValidator: ' + msg; throw e; } }; - var _IDValidator = function(GB2260) { + var _IDValidator = function (GB2260) { if (typeof GB2260 !== "undefined") { this.GB2260 = GB2260; } @@ -934,7 +912,7 @@ var IDValidator = function() { this.cache = {}; }; _IDValidator.prototype = { - isValid : function(id) { + isValid: function (id) { var GB2260 = this.GB2260 || null; var code = util.checkArg(id); if (code === false) { @@ -942,7 +920,7 @@ var IDValidator = function() { } // 查询cache if (this.cache.hasOwnProperty(id) - && typeof this.cache[id].valid !== 'undefined') { + && typeof this.cache[id].valid !== 'undefined') { return this.cache[id].valid; } else { if (!this.cache.hasOwnProperty(id)) { @@ -952,11 +930,11 @@ var IDValidator = function() { var addr = code.body.slice(0, 6); var birth = (code.type === 18 ? code.body.slice(6, 14) : code.body - .slice(6, 12)); + .slice(6, 12)); var order = code.body.slice(-3); if (!(util.checkAddr(addr, GB2260) && util.checkBirth(birth) && util - .checkOrder(order))) { + .checkOrder(order))) { this.cache[id].valid = false; return false; } @@ -991,7 +969,7 @@ var IDValidator = function() { checkBit = checkBit % 11; } checkBit = (typeof checkBit === 'number' ? checkBit.toString() - : checkBit); + : checkBit); // 检查校验码 if (checkBit !== code.checkBit) { @@ -1006,7 +984,7 @@ var IDValidator = function() { // 分析详细信息 , - getInfo : function(id) { + getInfo: function (id) { var GB2260 = this.GB2260 || null; // 号码必须有效 if (this.isValid(id) === false) { @@ -1023,7 +1001,7 @@ var IDValidator = function() { var addr = code.body.slice(0, 6); var birth = (code.type === 18 ? code.body.slice(6, 14) : code.body - .slice(6, 12)); + .slice(6, 12)); var order = code.body.slice(-3); var info = {}; @@ -1031,10 +1009,10 @@ var IDValidator = function() { if (GB2260 !== null) { info.addr = util.getAddrInfo(addr, GB2260); } - info.birth = (code.type === 18 ? (([ birth.slice(0, 4), - birth.slice(4, 6), birth.slice(-2) ]).join('-')) : ([ - '19' + birth.slice(0, 2), birth.slice(2, 4), - birth.slice(-2) ]).join('-')); + info.birth = (code.type === 18 ? (([birth.slice(0, 4), + birth.slice(4, 6), birth.slice(-2)]).join('-')) : ([ + '19' + birth.slice(0, 2), birth.slice(2, 4), + birth.slice(-2)]).join('-')); info.sex = (order % 2 === 0 ? 0 : 1); info.length = code.type; if (code.type === 18) { @@ -1049,7 +1027,7 @@ var IDValidator = function() { // 仿造一个号 , - makeID : function(isFifteen) { + makeID: function (isFifteen) { var GB2260 = this.GB2260 || null; // 地址码 @@ -1065,7 +1043,7 @@ var IDValidator = function() { var prov = util.str_pad(util.rand(50), 2, '0'); var city = util.str_pad(util.rand(20), 2, '0'); var area = util.str_pad(util.rand(20), 2, '0'); - var addrTest = [ prov, city, area ].join(''); + var addrTest = [prov, city, area].join(''); if (GB2260[addrTest]) { addr = addrTest; break; @@ -1081,12 +1059,12 @@ var IDValidator = function() { var da = util.str_pad(util.rand(28, 1), 2, '0'); if (isFifteen) { return addr + yr + mo + da - + util.str_pad(util.rand(999, 1), 3, '1'); + + util.str_pad(util.rand(999, 1), 3, '1'); } yr = '19' + yr; var body = addr + yr + mo + da - + util.str_pad(util.rand(999, 1), 3, '1'); + + util.str_pad(util.rand(999, 1), 3, '1'); // 位置加权 var posWeight = []; @@ -1110,7 +1088,7 @@ var IDValidator = function() { checkBit = checkBit % 11; } checkBit = (typeof checkBit === 'number' ? checkBit.toString() - : checkBit); + : checkBit); return (body + checkBit); } @@ -1119,726 +1097,731 @@ var IDValidator = function() { GB2260 = GB2260 == null ? "" : GB2260; return new _IDValidator(GB2260); } -Func.subString=function(str, len, hasDot) -{ - var newLength = 0; - var newStr = ""; - var chineseRegex = /[^\x00-\xff]/g; - var singleChar = ""; - var strLength = str.replace(chineseRegex,"**").length; - for(var i = 0;i < strLength;i++) - { - singleChar = str.charAt(i).toString(); - if(singleChar.match(chineseRegex) != null) - { - newLength += 2; - } - else - { - newLength++; - } - if(newLength > len) - { - break; - } - newStr += singleChar; - } - - if(hasDot && strLength > len) - { - newStr += "..."; - } - return newStr; -} -Func.subString2=function(str, len, hasDot) -{ +Func.subString = function (str, len, hasDot) { var newLength = 0; var newStr = ""; var chineseRegex = /[^\x00-\xff]/g; var singleChar = ""; - var strLength = str.replace(chineseRegex,"**").length; - for(var i = 0;i < strLength;i++) - { + var strLength = str.replace(chineseRegex, "**").length; + for (var i = 0; i < strLength; i++) { singleChar = str.charAt(i).toString(); - if(singleChar.match(chineseRegex) != null) - { + if (singleChar.match(chineseRegex) != null) { newLength += 2; } - else - { + else { newLength++; } - if(newLength > len) - { + if (newLength > len) { break; } newStr += singleChar; } - if(hasDot && strLength > len) - { + if (hasDot && strLength > len) { newStr += "..."; } return newStr; } -Func.getKeywordCount = function(str,keyword){ - var reg = new RegExp(keyword,"g"); +Func.subString2 = function (str, len, hasDot) { + var newLength = 0; + var newStr = ""; + var chineseRegex = /[^\x00-\xff]/g; + var singleChar = ""; + var strLength = str.replace(chineseRegex, "**").length; + for (var i = 0; i < strLength; i++) { + singleChar = str.charAt(i).toString(); + if (singleChar.match(chineseRegex) != null) { + newLength += 2; + } + else { + newLength++; + } + if (newLength > len) { + break; + } + newStr += singleChar; + } + + if (hasDot && strLength > len) { + newStr += "..."; + } + return newStr; +} +Func.getKeywordCount = function (str, keyword) { + var reg = new RegExp(keyword, "g"); var result = str.match(reg); - if(result){ + if (result) { return result.length; } return 0; } //设置普通震动 -Func.vibrator=function(time){ - try{ - if(GameData.appstate){ +Func.vibrator = function (time) { + try { + if (GameData.appstate) { window.settings.vibrator(time); } - }catch(e){ + } catch (e) { } } //是否重复震动 -Func.repeatvibrator=function(repeat){ - try{ - if(GameData.appstate){ +Func.repeatvibrator = function (repeat) { + try { + if (GameData.appstate) { window.settings.repeatvibrator(repeat); } - }catch(e){ + } catch (e) { } } //取消震动 -Func.canclevibrator=function(){ - try{ +Func.canclevibrator = function () { + try { window.settings.canclevibrator(); - }catch(e){ + } catch (e) { } } //横竖屏 orientation 1 为横屏 2 为竖屏 -Func.orientation=function(Orientation){ - try{ +Func.orientation = function (Orientation) { + try { window.settings.orientation(Orientation); - }catch(e){ + } catch (e) { } } //通知 -Func.notification=function(Ticker,title,content){ +Func.notification = function (Ticker, title, content) { //因为游戏打包之前调用会报错,所以要使用try{}catch{} try 里面 使用打包调用的函数 //var Ticker//手机状态栏通知 //var title//标题 //var content//内容 - try{ - window.settings.notification(Ticker,title,content); - }catch(e){ + try { + window.settings.notification(Ticker, title, content); + } catch (e) { } } -Func.sharefinend=function(sharefriend,type,webpageUrl,title,description,spidList){ +Func.sharefinend = function (sharefriend, type, webpageUrl, title, description, spidList) { GameData.shareFriendInfo = { - sharefriend:sharefriend, - type:type, - webpageUrl:webpageUrl, - title:title, - description:description, - spidList:spidList + sharefriend: sharefriend, + type: type, + webpageUrl: webpageUrl, + title: title, + description: description, + spidList: spidList }; + console.log(GameData.shareFriendInfo); //h5和非h5 - if(GameData.sysConfig.otherShare == 2){ - if(!GameData.h5Version){ + if (GameData.sysConfig.otherShare == 2) { + if (!GameData.h5Version) { GameUI.openSharePannel(); - }else{ + } else { Func.sharefriend(GameData.shareFriendInfo); } - }else{ - Func.sharefriend(GameData.shareFriendInfo); + } else { + try{ + Func.sharefriend(GameData.shareFriendInfo); + }catch(e){ + + } } } -Func.visitorLogin = function(){ +Func.visitorLogin = function () { //游客身份登入,随机游客数据 - GameData.isVisitor = true; - GameData.isDeviceLogin = false; + // GameData.isVisitor = true; + // GameData.isDeviceLogin = false; var WxInfo = Utl.ReadData(Utl.Config.visitorinfo); - if(WxInfo != null){ + if (WxInfo != null) { WxInfo = JSON.parse(WxInfo); - sharelogin(WxInfo.openid,WxInfo.headimgurl,WxInfo.nickname,WxInfo.sex,WxInfo.city,WxInfo.Province,WxInfo.unionid); - }else{ - var ram = 100000+ifast_random(100000); - var headLoginList=["http://img5.imgtn.bdimg.com/it/u=110166870,238965605&fm=27&gp=0.jpg", - "http://www.qqzhi.com/uploadpic/2015-01-15/200511535.jpg", - "http://img0.imgtn.bdimg.com/it/u=2722294531,1396252661&fm=27&gp=0.jpg", - "http://p2.gexing.com/touxiang/20130201/1735/510b8c7c1e572_200x200_3.jpg?recache=20131108", - "http://www.qqzhi.com/uploadpic/2015-01-15/200512924.jpg"]; - sharelogin(""+ram,headLoginList[ifast_random(headLoginList.length)],"游客"+ram,ifast_random(2)+1,"nanchang","jiangxi","ylgame"+ram); + sharelogin(WxInfo.openid, WxInfo.headimgurl, WxInfo.nickname, WxInfo.sex, WxInfo.city, WxInfo.Province, WxInfo.unionid); + } else { + var pInfo = Func.simulatePlayerInfo("游客"); + + sharelogin(pInfo.openid, pInfo.openid.headimgurl, pInfo.nickname, pInfo.sex, pInfo.city, pInfo.province, pInfo.unionid); } -} -Func.deviceLogin = function(phone,sms){ +} +Func.simulatePlayerInfo = function (nameString) { + var headLoginList = [ + "https://img2.baidu.com/it/u=1823726962,2692568839&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500", + "https://img0.baidu.com/it/u=320875415,2231067789&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500", + "https://img1.baidu.com/it/u=3407774307,2859661062&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500", + "https://img2.baidu.com/it/u=1161398577,3592656327&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500", + "https://img1.baidu.com/it/u=2061657615,4194426181&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=501", + "https://img2.baidu.com/it/u=3081347414,2363887197&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500", + "https://img1.baidu.com/it/u=1364384963,3982203144&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500", + "https://img1.baidu.com/it/u=3041194995,2386060237&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500", + "https://img2.baidu.com/it/u=2904976445,2884058010&fm=253&fmt=auto&app=120&f=JPEG?w=529&h=500", + "https://img0.baidu.com/it/u=1801052125,1596537112&fm=253&fmt=auto&app=120&f=JPEG?w=529&h=500", + + ]; + var ram = ifast_random(100000); + var resInfo = { + openid: "testopenid_" + ram, + headimgurl: headLoginList[ifast_random(headLoginList.length)], + nickname: ram + '_' + nameString, + sex: ifast_random(2) + 1, + city: "nanchang", + province: "jiangxi", + unionid: "ylgame" + ram + } + return resInfo; +} +Func.deviceLogin = function (phone, sms) { //设备登录 GameData.isVisitor = false; GameData.isDeviceLogin = true; var WxInfo = Utl.getCookie(Utl.Config.devicePlayer); - if(WxInfo){ + if (WxInfo) { WxInfo = JSON.parse(WxInfo); - sharelogin(WxInfo.openid,WxInfo.headimgurl,WxInfo.nickname,WxInfo.sex,WxInfo.city,WxInfo.Province,WxInfo.unionid,phone,sms); - }else{ + sharelogin(WxInfo.openid, WxInfo.headimgurl, WxInfo.nickname, WxInfo.sex, WxInfo.city, WxInfo.Province, WxInfo.unionid, phone, sms); + } else { var unionid = min_randomChar(25); - if(GameData.phoneInfo){ - if(GameData.phoneInfo.PhoneIMEI){ + if (GameData.phoneInfo) { + if (GameData.phoneInfo.PhoneIMEI) { unionid = GameData.phoneInfo.PhoneIMEI; - }else{ + } else { //GameUI.OpenTips("请到设置中打开游戏读取手机信息权限"); GameData.phoneInfo.PhoneIMEI = unionid; - Utl.SaveData(Utl.Config.phoneInfo1,JSON.stringify(GameData.phoneInfo)); + Utl.SaveData(Utl.Config.phoneInfo1, JSON.stringify(GameData.phoneInfo)); } - }else{ + } else { //GameUI.OpenTips("请到设置中打开游戏读取手机信息权限"); GameData.phoneInfo = { - PhoneIMEI:unionid + PhoneIMEI: unionid }; - Utl.SaveData(Utl.Config.phoneInfo1,JSON.stringify(GameData.phoneInfo)); + Utl.SaveData(Utl.Config.phoneInfo1, JSON.stringify(GameData.phoneInfo)); } - var ram = 100000+ifast_random(100000); - - var name2 = String(hex_md5(unionid)).slice(0,6); + var ram = 100000 + ifast_random(100000); + + var name2 = String(hex_md5(unionid)).slice(0, 6); var avatar = ""; - if(GameData.sysConfig.avatarUrl){ + if (GameData.sysConfig.avatarUrl) { var avatar = GameData.sysConfig.avatarUrl + min_random(GameData.sysConfig.avatarRange[0], - GameData.sysConfig.avatarRange[1])+".jpg"; + GameData.sysConfig.avatarRange[1]) + ".jpg"; } - var nickName = "User_"+name2; - sharelogin(unionid,avatar,nickName,ifast_random(2)+1, - "China","HongKong",unionid,phone,sms); + var nickName = "User_" + name2; + sharelogin(unionid, avatar, nickName, ifast_random(2) + 1, + "China", "HongKong", unionid, phone, sms); //var ram1 = 10000+ifast_random(10000); - + } } -Func.phoneLogin = function(phone,sms){ +Func.phoneLogin = function (phone, sms) { //手机登录 GameData.isVisitor = false; GameData.isDeviceLogin = true; var WxInfo = Utl.getCookie(Utl.Config.devicePlayer); - if(WxInfo){ + if (WxInfo) { WxInfo = JSON.parse(WxInfo); - sharelogin(WxInfo.openid,WxInfo.headimgurl,WxInfo.nickname,WxInfo.sex,WxInfo.city,WxInfo.Province,WxInfo.unionid,phone,sms); - }else{ - var unionid = "phone_"+phone; - - - var name2 = String(hex_md5(unionid)).slice(0,6); + sharelogin(WxInfo.openid, WxInfo.headimgurl, WxInfo.nickname, WxInfo.sex, WxInfo.city, WxInfo.Province, WxInfo.unionid, phone, sms); + } else { + var unionid = "phone_" + phone; + + + var name2 = String(hex_md5(unionid)).slice(0, 6); var avatar = ""; - if(GameData.sysConfig.avatarUrl){ + if (GameData.sysConfig.avatarUrl) { var avatar = GameData.sysConfig.avatarUrl + min_random(GameData.sysConfig.avatarRange[0], - GameData.sysConfig.avatarRange[1])+".jpg"; + GameData.sysConfig.avatarRange[1]) + ".jpg"; } - var nickName = "User_"+name2; - sharelogin(unionid,avatar,nickName,ifast_random(2)+1, - "China","ShangHai",unionid,phone,sms); + var nickName = "User_" + name2; + sharelogin(unionid, avatar, nickName, ifast_random(2) + 1, + "China", "ShangHai", unionid, phone, sms); //var ram1 = 10000+ifast_random(10000); - + } } -Func.accreditlogin=function(type){ +Func.accreditlogin = function (type) { //因为游戏打包之前调用会报错,所以要使用try{}catch{} try 里面 使用打包调用的函数 catch() 里 GameData.isVisitor = false; GameData.isDeviceLogin = false; -// logmessage("accreditlogin",1); - try{ + // logmessage("accreditlogin",1); + try { var tp = 2; - if(type){ - tp=type; + if (type) { + tp = type; } window.settings.accreditlogin(tp); - - }catch(e){ - if(GameData.h5Version == 1){ - - }else{ - var headLoginList=[ - "https://img2.baidu.com/it/u=1823726962,2692568839&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500", - "https://img0.baidu.com/it/u=320875415,2231067789&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500", - "https://img1.baidu.com/it/u=3407774307,2859661062&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500", - "https://img2.baidu.com/it/u=1161398577,3592656327&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500", - "https://img1.baidu.com/it/u=2061657615,4194426181&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=501", - "https://img2.baidu.com/it/u=3081347414,2363887197&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500", - "https://img1.baidu.com/it/u=1364384963,3982203144&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500", - "https://img1.baidu.com/it/u=3041194995,2386060237&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500", - "https://img2.baidu.com/it/u=2904976445,2884058010&fm=253&fmt=auto&app=120&f=JPEG?w=529&h=500", - "https://img0.baidu.com/it/u=1801052125,1596537112&fm=253&fmt=auto&app=120&f=JPEG?w=529&h=500", - ]; - var ram = ifast_random(100000); - - sharelogin("fff23"+ram,headLoginList[ifast_random(headLoginList.length)],"测试"+ram,ifast_random(2)+1,"nanchang","jiangxi","ylgame"+ram); + } catch (e) { + if (GameData.h5Version == 1) { + + } else { + var pInfo = Func.simulatePlayerInfo("测试"); + + sharelogin(pInfo.openid, pInfo.openid.headimgurl, pInfo.nickname, pInfo.sex, pInfo.city, pInfo.province, pInfo.unionid); // sharelogin("fff23"+ram,headLoginList[ifast_random(headLoginList.length)],"测试"+ram,ifast_random(2)+1,"nanchang","jiangxi","oLVKis6bj3_l8qspMybG60KV2GN4"); } - + } } -var sharelogin = function(openid,headimgurl,nickname,sex,city,Province,unionid,phone,sms){ - if(!sex){ +var sharelogin = function (openid, headimgurl, nickname, sex, city, Province, unionid, phone, sms) { + if (!sex) { sex = 1; } - - if(!nickname && !headimgurl){//全为空时无法登陆 - GameUI.OpenTips("授权失败,请重新授权!"); - }else{ - var wxdata={}; - wxdata.openid = openid; - wxdata.headimgurl = headimgurl; - wxdata.nickname = nickname; - wxdata.sex = sex; - wxdata.city = city; - wxdata.Province = Province; - wxdata.unionid = unionid; - if(phone){ - wxdata.telphone = phone; - C_Player.setTel(phone); - } - wxdata=JSON.stringify(wxdata); - // if(GameData.isVisitor){ - // Utl.SaveData(Utl.Config.visitorinfo,wxdata); - // } - // if(GameData.isDeviceLogin){ - // Utl.SaveData(Utl.Config.devicePlayer,wxdata); - // } - if(!GameData.isVisitor && !GameData.isDeviceLogin){ - Utl.setCookie(Utl.Config.wxinfo,wxdata,Utl.Config.maxtime); - } - - C_Player.SetWxInfo(openid,headimgurl,nickname,sex,city,Province,unionid); - var data={}; - data.agentid = GameData.AgentId; - data.openid = C_Player.openid; - data.nickname = C_Player.nickname; - data.avatar = C_Player.avatar; - data.sex = C_Player.sex; - data.province = C_Player.province; - data.city = C_Player.city; - data.unionid = C_Player.unionid; - data.gameid=GameData.GameId; - data.version = GameData.versionCode; - data.channelid = GameData.ChannelId; - data.marketid = GameData.marketID; - if(phone){ - data.telphone = phone; - } - if(sms){ - if(sms != "telphoneAuto"){ - data.smmcode = sms; - data.telphoneAuto = false; - }else{ - data.telphoneAuto = true; - } - } - Net.Send_login(data); - - } + if (!nickname && !headimgurl) {//全为空时无法登陆 + GameUI.OpenTips("授权失败,请重新授权!"); + } else { + var wxdata = {}; + wxdata.openid = openid; + wxdata.headimgurl = headimgurl; + wxdata.nickname = nickname; + wxdata.sex = sex; + wxdata.city = city; + wxdata.Province = Province; + wxdata.unionid = unionid; + if (phone) { + wxdata.telphone = phone; + C_Player.setTel(phone); + } + wxdata = JSON.stringify(wxdata); + // if(GameData.isVisitor){ + // Utl.SaveData(Utl.Config.visitorinfo,wxdata); + // } + // if(GameData.isDeviceLogin){ + // Utl.SaveData(Utl.Config.devicePlayer,wxdata); + // } + if(!GameData.hallConfig.showVisitor){ + if (!GameData.isVisitor && !GameData.isDeviceLogin) { + Utl.setCookie(Utl.Config.wxinfo, wxdata, Utl.Config.maxtime); + } + }else{ + Utl.setCookie(Utl.Config.visitorinfo, wxdata, Utl.Config.maxtime); + } + C_Player.SetWxInfo(openid, headimgurl, nickname, sex, city, Province, unionid); + var data = {}; + data.agentid = GameData.AgentId; + data.openid = C_Player.openid; + data.nickname = C_Player.nickname; + data.avatar = C_Player.avatar; + data.sex = C_Player.sex; + data.province = C_Player.province; + data.city = C_Player.city; + data.unionid = C_Player.unionid; + data.gameid = GameData.GameId; + data.version = GameData.versionCode; + data.channelid = GameData.ChannelId; + data.marketid = GameData.marketID; + if (phone) { + data.telphone = phone; + } + if (sms) { + if (sms != "telphoneAuto") { + data.smmcode = sms; + data.telphoneAuto = false; + } else { + data.telphoneAuto = true; + } + } + Net.Send_login(data); + + + } } -var sharesuccess = function(success,type){//分享成功回调 +var sharesuccess = function (success, type) {//分享成功回调 success = Number(success); type = Number(type); - C_Player.sharesuccess(success,type); + C_Player.sharesuccess(success, type); } -Func.getDate = function(){ +Func.getDate = function () { - var today=new Date(); - var h=today.getHours(); - var m=today.getMinutes(); - if(m<10){ - m="0"+m; + var today = new Date(); + var h = today.getHours(); + var m = today.getMinutes(); + if (m < 10) { + m = "0" + m; } - if(h<10){ - h="0"+h; + if (h < 10) { + h = "0" + h; } - return [h,m]; + return [h, m]; } -Func.SetDate=function(){ - set_self(154,7,this.getDate()[0],0,0); - set_self(155,7,this.getDate()[1],0,0); +Func.SetDate = function () { + set_self(154, 7, this.getDate()[0], 0, 0); + set_self(155, 7, this.getDate()[1], 0, 0); } -Func.trim = function(str) { - return str.replace(/\s+/g, ""); +Func.trim = function (str) { + return str.replace(/\s+/g, ""); } -Func.insertFlag = function(str,flg,sn,bTemp){ +Func.insertFlag = function (str, flg, sn, bTemp) { //this.charCodeAt(i)>127 || this.charCodeAt(i)==94 - var newstr=""; - var strLen = str.length; - var count = 0; - var cutIndex = 0; - if(str.gblen()>sn){ - for(var i=0;i127 || str.charCodeAt(i)==94){//中文 + var newstr = ""; + var strLen = str.length; + var count = 0; + var cutIndex = 0; + if (str.gblen() > sn) { + for (var i = 0; i < str.length; i++) { + var delta = 0; + if (str.charCodeAt(i) > 127 || str.charCodeAt(i) == 94) {//中文 count += 2; - delta=2; - - }else{ + delta = 2; + + } else { count++; - delta=1; + delta = 1; } - if(count > sn){ - var tmp = str.slice(cutIndex,i); - if(i==strLen-1){ - if(bTemp){ - newstr += tmp+flg; - }else{ + if (count > sn) { + var tmp = str.slice(cutIndex, i); + if (i == strLen - 1) { + if (bTemp) { + newstr += tmp + flg; + } else { newstr += tmp; } - }else{ - newstr += tmp+flg; - cutIndex=i; + } else { + newstr += tmp + flg; + cutIndex = i; count = delta; } } - if(i==strLen-1 && cutIndex!=i){ - var tmp = str.slice(cutIndex,strLen); - if(bTemp){ - newstr += tmp+flg; - }else{ + if (i == strLen - 1 && cutIndex != i) { + var tmp = str.slice(cutIndex, strLen); + if (bTemp) { + newstr += tmp + flg; + } else { newstr += tmp; } - + } - - - } - }else{ - if(bTemp){ + + + } + } else { + if (bTemp) { newstr = str + flg; - }else{ + } else { newstr = str; } - + } - return newstr; + return newstr; } -Func.countFlag = function(str,flag){ - var rValue=0; - for(var i=0;iGame_Config.Max.reconnecttime){//超过重连时间 - if(Net.ws_tcp.readyState != WebSocket.OPEN){ - - GameData.disType = true; - GameData.ConnectType=false; - GameData.NetType=1; - Logic.TryConnect(); - }else{ - - GameData.ConnectType = false; - GameData.disType = true; - GameData.NetType=1; - GameUI.StartLoad(); - GameData.isClose = true; - //GameData.isCloseTimer = setTimeout(function(){ - //if(GameData.isClose){ - //Logic.DisConnect(); - //} - //},5000); - Net.ws_tcp.close(); - GameData.isCloseTimer = setInterval(function(){ - if(GameData.isClose){ - Net.ws_tcp.close(); - } - },5000); - } - }else{ - - if(Net.ws_tcp.readyState != WebSocket.OPEN){ - - GameData.disType = true; - GameData.ConnectType=false; - GameData.NetType=1; - Logic.TryConnect(); - }else{ - if(Desk.inDesk(C_Player.playerid)){ - if(Game_Modify.updateScene){ - Game_Modify.updateScene(); - } - }else{ - - } - - } - Utl.playMusic(); - + //} + }, ConstVal.Max.heartbeat); } - }else{ - Utl.playMusic(); + //Utl.TurnOnBgm(get_self(4,37,0,0,0)); + if (!ConstVal.isGameHall) { + var exp = new Date(); + if (exp.getTime() - GameData.leaveTime > Game_Config.Max.reconnecttime) {//超过重连时间 + if (Net.ws_tcp.readyState != WebSocket.OPEN) { + + GameData.disType = true; + GameData.ConnectType = false; + GameData.NetType = 1; + Logic.TryConnect(); + } else { + + GameData.ConnectType = false; + GameData.disType = true; + GameData.NetType = 1; + GameUI.StartLoad(); + GameData.isClose = true; + //GameData.isCloseTimer = setTimeout(function(){ + //if(GameData.isClose){ + //Logic.DisConnect(); + //} + //},5000); + Net.ws_tcp.close(); + GameData.isCloseTimer = setInterval(function () { + if (GameData.isClose) { + Net.ws_tcp.close(); + } + }, 5000); + } + } else { + + if (Net.ws_tcp.readyState != WebSocket.OPEN) { + + GameData.disType = true; + GameData.ConnectType = false; + GameData.NetType = 1; + Logic.TryConnect(); + } else { + if (Desk.inDesk(C_Player.playerid)) { + if (Game_Modify.updateScene) { + Game_Modify.updateScene(); + } + } else { + + } + + } + Utl.playMusic(); + + } + } else { + Utl.playMusic(); + } + } else {//切出 + + Utl.stopMusic(); + Game_Modify.stopAllSounds(); + GameData.appstate = false; + for (var i = 0; i < ConstVal.InterEffSoundsList.length; i++) { + Utl.stopSound(ConstVal.InterEffSoundsList[i]); + } + if (ConstVal.netType == 0) { + var exp = new Date(); + GameData.leaveTime = exp.getTime(); + } else { + + } + //关闭震动 + Func.canclevibrator(); + } - }else{//切出 - - Utl.stopMusic(); - Game_Modify.stopAllSounds(); - GameData.appstate=false; - for(var i=0;i0){ - var data={}; - data.agentid=GameData.AgentId; - data.gameid=GameData.GameId; - data.playerid=C_Player.playerid; - data.roomcode=Desk.roomcode; - data.voiceurl=audiourl; - data.time=time; - if(GameData.chatInfo){ + if (Number(time) > 0) { + var data = {}; + data.agentid = GameData.AgentId; + data.gameid = GameData.GameId; + data.playerid = C_Player.playerid; + data.roomcode = Desk.roomcode; + data.voiceurl = audiourl; + data.time = time; + if (GameData.chatInfo) { data.info = GameData.chatInfo; - data.type=2; + data.type = 2; } Net.Send_send_voice(data); } } -Func.mediaTypeAudio=function(audiourl,type,v){ +Func.mediaTypeAudio = function (audiourl, type, v) { //因为游戏打包之前调用会报错,所以要使用try{}catch{} try 里面 使用打包调用的函数 catch() 里面使用你自己的函数 - try{ - window.settings.mediaTypeAudio(audiourl,type,v); - }catch(e){ + try { + window.settings.mediaTypeAudio(audiourl, type, v); + } catch (e) { // gameui_play_voice(v); - Net.submit_error("mediaAudio:audiourl="+audiourl+",type="+type+",user="+v,e.stack); + Net.submit_error("mediaAudio:audiourl=" + audiourl + ",type=" + type + ",user=" + v, e.stack); } } -Func.up_imgurl=function(recid,photo){ -//[{photo:????,pid:??id}.....];String -//alert(photo); -//?????????????,?????try{}catch{} try ?? ????????? catch() ?????????? +Func.up_imgurl = function (recid, photo) { + //[{photo:????,pid:??id}.....];String + //alert(photo); + //?????????????,?????try{}catch{} try ?? ????????? catch() ?????????? //return; - if(!ConstVal.isGameHall){ - try{ + if (!ConstVal.isGameHall) { + try { //if(!photo){return;} - var input_data=[]; - var input_obj={}; - input_obj.photourl=photo; - input_obj.pid=String(recid); + var input_data = []; + var input_obj = {}; + input_obj.photourl = photo; + input_obj.pid = String(recid); input_data.push(input_obj); - - - input_data=JSON.stringify(input_data); + + + input_data = JSON.stringify(input_data); window.settings.getphoto(input_data); //Func.getphoto(input_data); - var pho=input_obj; - if(Number(pho.pid)==25){ - up_imgurl(Number(pho.pid),"assets/bmp/00170.png",1); - //}else if(Number(pho.pid)==115 || Number(pho.pid)==5){ - }else if(exceptSrc.indexOf(Number(pho.pid))>=0){ - }else{ - up_imgurl(Number(pho.pid),"assets/bmp/00170.png",1); + var pho = input_obj; + if (Number(pho.pid) == 25) { + up_imgurl(Number(pho.pid), "assets/bmp/00170.png", 1); + //}else if(Number(pho.pid)==115 || Number(pho.pid)==5){ + } else if (exceptSrc.indexOf(Number(pho.pid)) >= 0) { + } else { + up_imgurl(Number(pho.pid), "assets/bmp/00170.png", 1); } - - }catch(e){ - - if(recid==25){ - up_imgurl(recid,"assets/bmp/00170.png",1); + + } catch (e) { + + if (recid == 25) { + up_imgurl(recid, "assets/bmp/00170.png", 1); setTimeout( - function(){ - if(photo){ - up_imgurl(recid,photo,1); - GameData.playerHeadImgState = true; - }else{ - up_imgurl(recid,"assets/bmp/00170.png",1); - } - },ConstVal.Max.headImgTimer); - }else if(exceptSrc.indexOf(recid)>=0){ - up_imgurl(recid,photo,1); - }else{ - - up_imgurl(recid,"assets/bmp/00170.png",1); + function () { + if (photo) { + up_imgurl(recid, photo, 1); + GameData.playerHeadImgState = true; + } else { + up_imgurl(recid, "assets/bmp/00170.png", 1); + } + }, ConstVal.Max.headImgTimer); + } else if (exceptSrc.indexOf(recid) >= 0) { + up_imgurl(recid, photo, 1); + } else { + + up_imgurl(recid, "assets/bmp/00170.png", 1); setTimeout( - function(){ - if(photo){ - up_imgurl(recid,photo,1); - }else{ - up_imgurl(recid,"assets/bmp/00170.png",1); - } - } - ,ConstVal.Max.headImgTimer); - } - - } - }else{ - gameHallImport.up_imgurl(recid,photo); - } -} -var getphoto = function(photo){ - if(!ConstVal.isGameHall){ - var obj = strToJson(photo); - for(var i=0;i=0){ - up_imgurl(Number(pho.pid),pho.photourl,1); - }else{ - //up_imgurl(Number(pho.pid),"assets/bmp/00170.png",1); - setTimeout( - function(){ - if(pho.photourl){ - up_imgurl(Number(pho.pid),pho.photourl,1); - }else{ - up_imgurl(Number(pho.pid),"assets/bmp/00170.png",1); + function () { + if (photo) { + up_imgurl(recid, photo, 1); + } else { + up_imgurl(recid, "assets/bmp/00170.png", 1); } } - ,ConstVal.Max.headImgTimer); - } - } + , ConstVal.Max.headImgTimer); + } + } - }else{ - + } else { + gameHallImport.up_imgurl(recid, photo); + } +} +var getphoto = function (photo) { + if (!ConstVal.isGameHall) { + var obj = strToJson(photo); + for (var i = 0; i < obj.length; i++) { + var pho = obj[i]; + if (pho.photourl) { + if (Number(pho.pid) == 25) { + if (pho.photourl) { + up_imgurl(Number(pho.pid), pho.photourl, 1); + GameData.playerHeadImgState = true; + } else { + up_imgurl(Number(pho.pid), "assets/bmp/00170.png", 1); + } + } else if (exceptSrc.indexOf(Number(pho.pid)) >= 0) { + up_imgurl(Number(pho.pid), pho.photourl, 1); + } else { + //up_imgurl(Number(pho.pid),"assets/bmp/00170.png",1); + setTimeout( + function () { + if (pho.photourl) { + up_imgurl(Number(pho.pid), pho.photourl, 1); + } else { + up_imgurl(Number(pho.pid), "assets/bmp/00170.png", 1); + } + } + , ConstVal.Max.headImgTimer); + } + } + } + } else { + } } //调用手机默认浏览器打开链接 -Func.browser=function(url){ - try{ - if(url){ +Func.browser = function (url) { + try { + if (url) { url = fixUrl(url); var exp = new Date(); url += "×tamp=" + exp.getTime(); window.settings.browser(url); } - }catch(e){ + } catch (e) { console.log(url); } } //主动获取手机电量 -Func.getbattery=function(){ - try{ - var battery=window.settings.getbattery(); +Func.getbattery = function () { + try { + var battery = window.settings.getbattery(); return battery; - }catch(e){ + } catch (e) { //alert(e); return 1; @@ -1846,272 +1829,276 @@ Func.getbattery=function(){ } //手机电量变化调用 -var getBattery = function(Battery){ - GameData.Battery=Battery; - if(GameData.Battery<=0.2){ - set_self(338,43,3,0,0); - }else{ - set_self(338,43,2,0,0); +var getBattery = function (Battery) { + GameData.Battery = Battery; + if (GameData.Battery <= 0.2) { + set_self(338, 43, 3, 0, 0); + } else { + set_self(338, 43, 2, 0, 0); } } //分享图片(链接) -Func.sharephotourl=function(sharetype,url){ - try{ - window.settings.sharephotourl(sharetype,url); - }catch(e){ +Func.sharephotourl = function (sharetype, url) { + try { + window.settings.sharephotourl(sharetype, url); + } catch (e) { //alert(e); } } //获取网络类型 1 未连接网络 2 连接wifi 3 连接2G/3G/4G -Func.getnetwork=function(){ - try{ +Func.getnetwork = function () { + try { var type = window.settings.getnetwork(); return type; - }catch(e){ + } catch (e) { return 1; } } //获取wifi信号ssidname wifi名称 signalLevel wifi信号强度 0-4 弱到强 -Func.getwifisignalLevel=function(){ - try{ +Func.getwifisignalLevel = function () { + try { window.settings.getwifisignalLevel(); - }catch(e){ + } catch (e) { //alert(e); } } //WiFi信号变化调用 -var getwifiLevel=function(ssidname,signalLevel){ - GameData.WifiLevel=signalLevel; - GameData.WifiLevel= Number(GameData.WifiLevel); - switch(GameData.WifiLevel){ +var getwifiLevel = function (ssidname, signalLevel) { + GameData.WifiLevel = signalLevel; + GameData.WifiLevel = Number(GameData.WifiLevel); + switch (GameData.WifiLevel) { case 0: - set_self(336,43,1,0,0); - break; + set_self(336, 43, 1, 0, 0); + break; case 1: case 2: - set_self(336,43,2,0,0); - break; + set_self(336, 43, 2, 0, 0); + break; case 3: case 4: - set_self(336,43,3,0,0); - break; + set_self(336, 43, 3, 0, 0); + break; } } //网络状况改变 -var getnetwork=function(type){ - type=Number(type); - switch(type){ +var getnetwork = function (type) { + type = Number(type); + switch (type) { case 1: - break; + break; case 2: - set_self(336,43,3,0,0); - Func.getwifisignalLevel(); - break; + set_self(336, 43, 3, 0, 0); + Func.getwifisignalLevel(); + break; case 3: - set_self(336,43,4,0,0); - break; + set_self(336, 43, 4, 0, 0); + break; } } //获取版本类型 -Func.getVersionState = function(){ +Func.getVersionState = function () { //获取版本类型 用于判断版本是否高于服务器版本 - try{ + try { //苹果获取结果接口 return Number(window.settings.getcompareCode()); - }catch(e){ + } catch (e) { return 0; - //return 1; + // return 1; } } -Func.startshake = function(){ - if(Utl.ReadData(Utl.Config.shake)==1){ - if(GameData.shakeID != Game_Config.shakeList.nil){ - try{ +Func.startshake = function () { + if (Utl.ReadData(Utl.Config.shake) == 1) { + if (GameData.shakeID != Game_Config.shakeList.nil) { + try { window.settings.startshake(); - }catch(e){ + } catch (e) { } } } } -Func.stopshake = function(){ - try{ +Func.stopshake = function () { + try { window.settings.stopshake(); - }catch(e){ + } catch (e) { } } -Func.switchshakeVoice = function(Voicetype){ - try{ +Func.switchshakeVoice = function (Voicetype) { + try { window.settings.SwitchShake(Voicetype); - }catch(e){ + } catch (e) { } } -var shakeEnd = function(){//摇一摇回调 +var shakeEnd = function () {//摇一摇回调 Game_Modify.shakeEvent(); } //获得渠道名称 -Func.getchannelName = function(){// - try{ - var name=window.settings.getchannelName(); - if(name){ +Func.getchannelName = function () {// + try { + var name = window.settings.getchannelName(); + if (name) { return name; - }else{ - return ""; - } - }catch(e){ - if(GameData.userAgent != ConstVal.userAgent.uAgent_3){ + } else { return ""; - }else{ + } + } catch (e) { + if (GameData.userAgent != ConstVal.userAgent.uAgent_3) { + return ""; + } else { return app_channel; } } } //播放声音 -Func.play_wav = function(src,isloop){ - if(src){ - if(GameData.appstate ||(!GameData.appstate&&isloop==-1)){ - try{ - if(!GameData.isRecord){ - window.settings.srcIsloop(src,isloop); +Func.play_wav = function (src, isloop) { + if (src) { + if (GameData.appstate || (!GameData.appstate && isloop == -1)) { + try { + if (!GameData.isRecord) { + window.settings.srcIsloop(src, isloop); } - }catch(e){ - if(GameData.h5Version == 1 && GameData.OS == ConstVal.OS.apple){ + } catch (e) { + if (GameData.h5Version == 1 && GameData.OS == ConstVal.OS.apple) { //logmessage("apple play"+src+"、"+isloop,1); - switch(isloop){ + switch (isloop) { case 0: case 1: - _gameSoundsObj.play(src,isloop); + _gameSoundsObj.play(src, isloop); break; case -1: _gameSoundsObj.stop(src); - break; + break; } - }else{ - if(!GameData.isRecord){ - play_wav(src,isloop); + } else { + if (!GameData.isRecord) { + play_wav(src, isloop); } } - - } + + } } } } //开启扫一扫 -Func.OpenScan = function(){ - try{ +Func.OpenScan = function () { + try { window.settings.opensaoma(); - }catch(e){ + } catch (e) { - } -} + } +} //扫一扫回调数据 -var getsaomaData = function(data){ +var getsaomaData = function (data) { } //开启定位 -Func.startlocation = function(type){ - try{ +Func.startlocation = function (type) { + try { window.settings.startlocation(type); - }catch(e){ - console.log("Func.startlocation:",type); - getlocationinfo(JSON.stringify({"address":"江西省南昌市青云谱区施尧路靠近上海浦东发展银行(长天支行)","city":"南昌市", -"cityCode":"0791","country":"中国","district":"青云谱区","latitude":28.623546,"longitude":115.900333, -"province":"江西省","street":"施尧路","errorCode":0})); + } catch (e) { + console.log("Func.startlocation:", type); + getlocationinfo(JSON.stringify({ + "address": "江西省南昌市青云谱区施尧路靠近上海浦东发展银行(长天支行)", "city": "南昌市", + "cityCode": "0791", "country": "中国", "district": "青云谱区", "latitude": 28.623546, "longitude": 115.900333, + "province": "江西省", "street": "施尧路", "errorCode": 0 + })); } } //获取定位 -Func.getlocation = function(){ - try{ - if(GameData.otherLocation){ +Func.getlocation = function () { + try { + if (GameData.otherLocation) { GameData.otherLocationTimes++; - if(GameData.otherLocationTimes > GameData.otherLocationAllTimes){ + if (GameData.otherLocationTimes > GameData.otherLocationAllTimes) { return; } } - + window.settings.getlocationinfo(); - }catch(e){ + } catch (e) { console.log("Func.getlocation:"); - getlocationinfo(JSON.stringify({"address":"江西省南昌市青云谱区施尧路靠近上海浦东发展银行(长天支行)","city":"南昌市", -"cityCode":"0791","country":"中国","district":"青云谱区","latitude":28.623546,"longitude":115.900333, -"province":"江西省","street":"施尧路","errorCode":0})); + getlocationinfo(JSON.stringify({ + "address": "江西省南昌市青云谱区施尧路靠近上海浦东发展银行(长天支行)", "city": "南昌市", + "cityCode": "0791", "country": "中国", "district": "青云谱区", "latitude": 28.623546, "longitude": 115.900333, + "province": "江西省", "street": "施尧路", "errorCode": 0 + })); } } /* {"address":"江西省南昌市青云谱区施尧路靠近上海浦东发展银行(长天支行)","city":"南昌市", "cityCode":"0791","country":"中国","district":"青云谱区","latitude":28.623546,"longitude":115.900333, "province":"江西省","street":"施尧路"}*/ -var getlocationinfo=function(locationinfo){ - if(locationinfo){ - try{ +var getlocationinfo = function (locationinfo) { + if (locationinfo) { + try { locationinfo = JSON.parse(locationinfo); C_Player.SetLocationInfo(locationinfo); - if(locationinfo.city&&locationinfo.province){ - if(Game_Modify.onLocationInfo){ + if (locationinfo.city && locationinfo.province) { + if (Game_Modify.onLocationInfo) { Game_Modify.onLocationInfo(locationinfo); } - - if(GameData.isFirstLogin){ + + if (GameData.isFirstLogin) { GameData.isFirstLogin = false; var data = {}; - data.agentid = Utl.getAgentID(); - data.playerid = Utl.getMyPlayerid(); - data.info = locationinfo; - Net.Send_submit_location(data); - } + data.agentid = Utl.getAgentID(); + data.playerid = Utl.getMyPlayerid(); + data.info = locationinfo; + Net.Send_submit_location(data); } - }catch(e){ } + } catch (e) { + } } } // -Func.SwitchOverGameData = function(webtype,Gamedirectory,gamedownloadurl,data){ - - try{ - if(ConstVal.isGameHall){ +Func.SwitchOverGameData = function (webtype, Gamedirectory, gamedownloadurl, data) { + + try { + if (ConstVal.isGameHall) { GameData.hallLogin = false; - if(!gamedownloadurl || !Gamedirectory){ + if (!gamedownloadurl || !Gamedirectory) { gameHallImport.clearGameinfo(); return; } Utl.stopMusic(); } - window.settings.SwitchOverGameData(webtype,Gamedirectory,gamedownloadurl,data); - }catch(e){ - console.log("webtype:"+webtype+"Gamedirectory:"+Gamedirectory+"gamedownloadurl:"+gamedownloadurl+"data:"+data); + window.settings.SwitchOverGameData(webtype, Gamedirectory, gamedownloadurl, data); + } catch (e) { + console.log("webtype:" + webtype + "Gamedirectory:" + Gamedirectory + "gamedownloadurl:" + gamedownloadurl + "data:" + data); } } -Func.backgameData = function(data){// - try{ +Func.backgameData = function (data) {// + try { window.settings.backgameData(data); - }catch(e){ + } catch (e) { } } -var backgameData = function(){ - var data= {}; - if(C_Player.roomcard>-1){ +var backgameData = function () { + var data = {}; + if (C_Player.roomcard > -1) { data.data = C_Player.returnHallData(); data.opt = "updatePlayerInfo"; data.from = 2; data.gamename = app_gamename; data.gameid = GameData.GameId; Func.backgameData(JSON.stringify(data)); - }else{ + } else { data.opt = "saveGameId"; data.from = 2; data.gamename = app_gamename; @@ -2121,95 +2108,95 @@ var backgameData = function(){ Utl.stopMusic(); } -var getWebdata = function(data){ +var getWebdata = function (data) { //gameLog("收到数据:"+data,1); - + //if(data){ - //data = JSON.parse(data); - //C_Player.setRoomcard(data.roomcard); + //data = JSON.parse(data); + //C_Player.setRoomcard(data.roomcard); //} - if(!ConstVal.isGameHall){ - try{ - if(data){ - if(typeof data == "string"){ - data = JSON.parse(data); - } - - if(typeof data.from != "undefined"){ - - data.from = Number(data.from); - switch(data.from){ - case 0://游戏间调用 - switch(data.opt){ - case "uptate_roomcard": - C_Player.setRoomcard(data.roomcard); - break; - case "loginPlayerid": - GameData.loginPlayerid = (data.data == GameData.GameId); - break; - } - break; - case 1://网页调用 - GameData.ConnectType = false; - GameData.disType = true; - GameData.NetType=1; - GameUI.StartLoad(); - GameData.isClose = true; - Net.ws_tcp.close(); - //var _msg = data.gamedata; - GameData.backUrl = data.backurl; - //if(_msg.route==RouteList.platform||_msg.route==RouteList.agent||_msg.route==RouteList.room){ + if (!ConstVal.isGameHall) { + try { + if (data) { + if (typeof data == "string") { + data = JSON.parse(data); + } + + if (typeof data.from != "undefined") { + + data.from = Number(data.from); + switch (data.from) { + case 0://游戏间调用 + switch (data.opt) { + case "uptate_roomcard": + C_Player.setRoomcard(data.roomcard); + break; + case "loginPlayerid": + GameData.loginPlayerid = (data.data == GameData.GameId); + break; + } + break; + case 1://网页调用 + GameData.ConnectType = false; + GameData.disType = true; + GameData.NetType = 1; + GameUI.StartLoad(); + GameData.isClose = true; + Net.ws_tcp.close(); + //var _msg = data.gamedata; + GameData.backUrl = data.backurl; + //if(_msg.route==RouteList.platform||_msg.route==RouteList.agent||_msg.route==RouteList.room){ //if(min_ExitsFunction(Net[_msg.rpc])){ - //Net[_msg.rpc](_msg); + //Net[_msg.rpc](_msg); //} - //}else{ - - //} - break; - case 2: - switch(data.opt){ - case "updateHTML": - Logic.getHTML(); - break; - } - break; + //}else{ + + //} + break; + case 2: + switch (data.opt) { + case "updateHTML": + Logic.getHTML(); + break; + } + break; + } } } + } catch (e) { + } - }catch(e){ - - } - }else{ + } else { GameData.hallLogin = true; gameHallImport.getWebdata(data); } } -Func.ypayType = function(type){// - try{ +Func.ypayType = function (type) {// + try { window.settings.ypayType(type); - }catch(e){ - console.log("ypayType:"+type); + } catch (e) { + console.log("ypayType:" + type); } } -var yPaytype = function(type,num){ +var yPaytype = function (type, num) { //logmessage("type:"+type+"num:"+num,1); - type=Number(type); - num=Number(num); - switch(type){ + type = Number(type); + num = Number(num); + switch (type) { case 1://房卡 - Net._SendData("youle","agent","update_roomcard",{agentid:GameData.AgentId,playerid:C_Player.playerid,change:num,type:9}); + Net._SendData("youle", "agent", "update_roomcard", { agentid: GameData.AgentId, playerid: C_Player.playerid, change: num, type: 9 }); break; case 2://金币 - Net._SendData("youle","agent","update_bean",{agentid:GameData.AgentId,playerid:C_Player.playerid,change:num,type:9}); + Net._SendData("youle", "agent", "update_bean", { agentid: GameData.AgentId, playerid: C_Player.playerid, change: num, type: 9 }); break; } } -Func.getInstallInfo = function(data){// - try{ +Func.getInstallInfo = function (data) {// + try { var result = window.settings.getGameinstall(data); return Number(result); - }catch(e){ + } catch (e) { return ifast_random(2); } } @@ -2222,971 +2209,21 @@ tpyealpay 支付类型 1 微信 2 支付宝 body商品详情 price 价格 */ -Func.getGamepay = function(data){// - try{ +Func.getGamepay = function (data) {// + try { window.settings.getGameplay(data); - }catch(e){ + } catch (e) { var dt = JSON.parse(data); - PayuserPaytypePaystate(dt.playerid,dt.type,1,data.paytype,data) + PayuserPaytypePaystate(dt.playerid, dt.type, 1, data.paytype, data) } } -var PayuserPaytypePaystate=function(user,type,state,typeplay,_data){// +var PayuserPaytypePaystate = function (user, type, state, typeplay, _data) {// //logmessage("user:"+user+" type:"+type+" state:"+state+" typeplay:"+typeplay,1); GameUI.ClosePay(); GameUI.CloseCheckPay(); GameUI.EndLoad(); - if(Number(state) == 1){ - _data = JSON.parse(_data); - var data = {}; - data.agentid = Utl.getAgentID(); - data.playerid = _data.user; - data.channelid = GameData.ChannelId; - data.productid = _data.productid; - data.payid = _data.type; - data.amount = _data.amount; - data.money = _data.price; - data.paytype = _data.typeplay; - //Net.Send_pay_succ(data); - var senddata={}; - senddata.app=AppList.app; - senddata.route=RouteList.agent; - senddata.rpc=RpcList.pay_succ; - senddata.data=data; - Func.AjaxHttp(senddata,pay_succ_s,pay_succ_f); - var _msg={}; - var rd = Number(C_Player.roomcard) + Number(_data.amount); - var data1 ={ - roomcard:rd, - text:"购买"+GameData.roomCardName+",数量:"+_data.amount - }; - _msg.data=data1; - C_Player.UpdateRoomcard(_msg); - - - }else{ - GameUI.OpenTips("支付失败!",ConstVal.Tips.time); - } -} -var pay_succ_s = function(_msg,state,input_msg){ - //console.log("pay_succ_s"); - //_msg = JSON.parse(_msg); - //var rd = Number(_msg.data.roomcard); - //var rt = rd + Number(C_Player.roomcard); - //_msg.data.roomcard = rt; - //C_Player.UpdateRoomcard(_msg); - -} -var pay_succ_f=function(_msg,state,input_msg){ - //console.log("pay_succ_f"); -} -Func.callphone = function(tel){ - if(tel){ - window.location.href = 'tel://' + tel; - } -} -//复制到粘贴板 -Func.gameCopytext = function(text){// - try{ - window.settings.gameCopytext(text); - }catch(e){ - - } -} -//获得粘贴板内容 -Func.gamepastetext = function(){// - try{ - return window.settings.gamepastetext(); - }catch(e){ - return ""; - } -} -//获取手机信息 -Func.getphoneInfo = function(){// - try{ - if(Utl.ReadData(Utl.Config.phoneInfo1)){ - return; - } - if(GameData.isGetPhoneInfo){ - return; - }else{ - GameData.isGetPhoneInfo = true; - } - return window.settings.getphoneInfo(); - }catch(e){ - var data={}; - data.PhoneIMEI = "phone_"+min_randomChar(25); - getphoneinfo(data); - } -} -var getphoneinfo = function(data){ - if(data){ - if(typeof data == "string"){ - data = JSON.parse(data); - - //var msg={}; - //msg.info = {}; - //msg.info.phoneInfo = GameData.phoneInfo; - //msg.info.addrBook = GameData.addressBook; - //msg.agentid =GameData.AgentId; - //msg.playerid = C_Player.playerid; - //Net.Send_submit_phoneinfo(msg); - } - Utl.SaveData(Utl.Config.phoneInfo1,JSON.stringify(data)); - GameData.phoneInfo = data; - GameData.submitPhoneInfo = true; - } -} - -//获取手机信息 -Func.getAddressBook = function(){// - try{ - if(Number(Utl.ReadData(Utl.Config.book)) == 1){ - return; - }else{ - Utl.SaveData(Utl.Config.book,1); - } - return window.settings.getAddressBook(); - }catch(e){ - return ""; - } -} -var getAddressBook = function(data){ - if(data){ - //if(typeof data == "string"){ - //data = JSON.parse(data); - GameData.addressBook = data; - var msg={}; - msg.info = {}; - msg.info.phoneInfo = GameData.phoneInfo; - msg.info.addrBook = GameData.addressBook; - msg.agentid =GameData.AgentId; - msg.playerid = C_Player.playerid; - Net.Send_submit_phoneinfo(msg); - //} - GameData.submitAddressBook = true; - } -} -var gamepastetext_callback = function(resp){ - switch(GameData.gamepastetext){ - case "Logic.pasteRoomCode": - var reg = /[^0-9]/g; - var c_text = resp; - c_text = c_text.replace(reg,""); - var _text=String(c_text); - if(String(c_text).length>6){ - _text=String(c_text).substr(0,6); - } - RoomCode = String(_text); - RoomNum = Number(_text); - for(var i=0;i<6;i++){ - set_self(236+i,37,0,0,0); - } - for(var i=0;i= ConstVal.Com_History.content_tag){ - bTemp = true; - } - if(bTemp){ - play_ani(1,ConstVal.Com_History.f_spid+"add"+v,43,1,3,0,600,0,0,0,0,0,0); - }else{ - var x = Game_Config.Voice.VoiceLoc[v][0]; - var y = Game_Config.Voice.VoiceLoc[v][1]; - var dis_x = Game_Config.Voice.VoiceDis[0]; - var dis_y = Game_Config.Voice.VoiceDis[1]; - var isleft = Game_Config.Voice.isLeft[v]; - var text_len = get_self(642+v,20,0,0,0); - if(isleft){ - set_self(612+v,18,x,0,0); - set_self(612+v,19,y,0,0); - set_self(642+v,18,x+dis_x,0,0); - set_self(642+v,19,y+dis_y,0,0); - set_self(612+v,20,text_len+dis_x*2,0,0); - set_self(612+v,1,83,0,0); - set_self(612+v,37,1,0,0); - set_self(642+v,37,1,0,0); - }else{ - set_self(612+v,18,x-text_len-dis_x*2,0,0); - set_self(642+v,18,x-text_len-dis_x,0,0); - set_self(612+v,19,y,0,0); - set_self(642+v,19,y+dis_y,0,0); - set_self(612+v,20,text_len+dis_x*2,0,0); - set_self(612+v,1,86,0,0); - set_self(612+v,37,1,0,0); - set_self(642+v,37,1,0,0); - - } - play_ani(1,642+v,43,1,3,0,Game_Config.Voice.VoiceTime,0,0,0,0,0,0); - } - - //responseCallback(""); - }); - bridge.registerHandler("gameui_stop_voice",function(data,responseCallback){//通话状态改变是调用 - var v=Number(data); - var bTemp = false; - if(v>=ConstVal.Com_History.content_tag){ - bTemp = true; - } - if(bTemp){ - play_ani(0,ConstVal.Com_History.f_spid+"add"+v,43,1,3,0,600,0,0,0,0,0,0); - set_self(ConstVal.Com_History.f_spid+"add"+v,43,3,0,0); - }else{ - set_self(612+v,37,0,0,0); - set_self(642+v,37,0,0,0); - play_ani(0,642+v,43); - } - //responseCallback(""); - }); - - bridge.registerHandler("sharesuccess",function(data,responseCallback){//分享成功回调 - if(data){ - if(typeof data == "string"){ - data = strToJson(data); - } - } - var success = data.success; - var type = data.type; - success = Number(success); - type = Number(type); - C_Player.sharesuccess(success,type); - //responseCallback(""); - }); - bridge.registerHandler("getphoneinfo",function(data,responseCallback){//获取手机信息回调 - if(data){ - if(typeof data == "string"){ - data = strToJson(data); - - //var msg={}; - //msg.info = {}; - //msg.info.phoneInfo = GameData.phoneInfo; - //msg.info.addrBook = GameData.addressBook; - //msg.agentid =GameData.AgentId; - //msg.playerid = C_Player.playerid; - //Net.Send_submit_phoneinfo(msg); - } - Utl.SaveData(Utl.Config.phoneInfo1,JSON.stringify(data)); - GameData.phoneInfo = data; - GameData.submitPhoneInfo = true; - } - }); - - - bridge.registerHandler("getAddressBook",function(data,responseCallback){//获取手机信息回调 - if(data){ - //if(typeof data == "string"){ - //data = JSON.parse(data); - GameData.addressBook = data; - var msg={}; - msg.info = {}; - msg.info.phoneInfo = GameData.phoneInfo; - msg.info.addrBook = GameData.addressBook; - msg.agentid =GameData.AgentId; - msg.playerid = C_Player.playerid; - Net.Send_submit_phoneinfo(msg); - //} - GameData.submitAddressBook = true; - } - }); - bridge.registerHandler("phonestate",function(data,responseCallback){//通话状态改变是调用 - var state = data; - C_Player.phonestate(state); - //responseCallback(""); - }); - bridge.registerHandler("appservice",function(data,responseCallback){ - try{ - var service = data; - var isLog = false; - - service = Number(service); - - if(GameData.isLogin){ - if(service==1){//切回 - GameData.appstate=true; - if(GameData.heartBeatTimer){ - window.clearTimeout(GameData.heartBeatTimer); - } - if(!ConstVal.isGameHall){ - GameData.heartBeatTimer = setTimeout(function(){ - GameUI.OpenTips("网络较慢!",ConstVal.Tips.time); - GameData.heartBeatStage = true; - - //if(Net.ws_tcp.readyState == WebSocket.CLOSED){ - - //GameData.disType = true; - //GameData.ConnectType=false; - //GameData.NetType=1; - //Logic.TryConnect(); - //}else if(Net.ws_tcp.readyState == WebSocket.OPEN){ - - //GameData.ConnectType = false; - //GameData.disType = true; - //GameData.NetType=1; - //GameUI.StartLoad(); - //GameData.isClose = true; - //GameData.isCloseTimer = setTimeout(function(){ - //if(GameData.isClose){ - //Logic.DisConnect(); - //} - //},5000); - //Net.ws_tcp.close(); - //} - },ConstVal.Max.heartbeat); - } - //Utl.TurnOnBgm(get_self(4,37,0,0,0)); - if(ConstVal.netType == 0){ - var exp = new Date(); - if(exp.getTime()-GameData.leaveTime>Game_Config.Max.reconnecttime){//超过重连时间 - if(Net.ws_tcp.readyState != WebSocket.OPEN){ - - GameData.disType = true; - GameData.ConnectType=false; - GameData.NetType=1; - Logic.TryConnect(); - }else{ - - GameData.ConnectType = false; - GameData.disType = true; - GameData.NetType=1; - GameUI.StartLoad(); - GameData.isClose = true; - //GameData.isCloseTimer = setTimeout(function(){ - //if(GameData.isClose){ - //Logic.DisConnect(); - //} - //},5000); - Net.ws_tcp.close(); - GameData.isCloseTimer = setInterval(function(){ - if(GameData.isClose){ - Net.ws_tcp.close(); - } - },5000); - } - }else{ - - if(Net.ws_tcp.readyState != WebSocket.OPEN){ - - GameData.disType = true; - GameData.ConnectType=false; - GameData.NetType=1; - Logic.TryConnect(); - }else{ - if(Desk.inDesk(C_Player.playerid)){ - Game_Modify.updateScene(); - } - - } - Utl.playMusic(); - - } - }else{ - - } - }else{//切出 - Utl.stopMusic(); - Game_Modify.stopAllSounds(); - GameData.appstate=false; - for(var i=0;i0){ - var data={}; - data.agentid=GameData.AgentId; - data.gameid=GameData.GameId; - data.playerid=C_Player.playerid; - data.roomcode=Desk.roomcode; - data.voiceurl=audiourl; - data.time=time; - if(GameData.chatInfo){ - data.info = GameData.chatInfo; - data.type=2; - } - Net.Send_send_voice(data); - } - //responseCallback(""); - }); - - //手机电量变化调用 - bridge.registerHandler("getBattery",function(data,responseCallback){ - //logmessage(data,1); - - var Battery = data; - app_getbattery = Number(Battery); - GameData.Battery=Number(Battery); - if(GameData.Battery<=0.2){ - set_self(338,43,3,0,0); - }else{ - set_self(338,43,2,0,0); - } - //responseCallback(""); - }); - //WiFi信号变化调用 - bridge.registerHandler("getwifiLevel",function(data,responseCallback){ - if(data){ - if(typeof data == "string"){ - data = strToJson(data); - } - } - var ssidname = data.ssidname; - var signalLevel = data.signalLevel; - GameData.WifiLevel=signalLevel; - GameData.WifiLevel= Number(GameData.WifiLevel); - switch(GameData.WifiLevel){ - case 0: - set_self(336,43,1,0,0); - break; - case 1: - case 2: - set_self(336,43,2,0,0); - break; - case 3: - case 4: - set_self(336,43,3,0,0); - break; - } - //responseCallback(""); - }); - //网络状况改变 - bridge.registerHandler("getnetwork",function(data,responseCallback){ - var type=data; - type = Number(type); - app_getnetwork = type; - switch(type){ - case 1: - - break; - case 2: - set_self(336,43,3,0,0); - Func.getwifisignalLevel(); - break; - case 3: - set_self(336,43,4,0,0); - break; - } - //responseCallback(""); - }); - bridge.registerHandler("shakeEnd",function(data,responseCallback){//摇一摇回调 - Game_Modify.shakeEvent(); - //responseCallback(""); - }); - bridge.registerHandler("yPaytype",function(data,responseCallback){//摇一摇回调 - if(data){ - if(typeof data == "string"){ - data = strToJson(data); - } - } - type=Number(data.type); - num=Number(data.num); - switch(type){ - case 1://房卡 - Net._SendData("youle","agent","update_roomcard",{agentid:GameData.AgentId,playerid:C_Player.playerid,change:num,type:9}); - break; - case 2://金币 - Net._SendData("youle","agent","update_bean",{agentid:GameData.AgentId,playerid:C_Player.playerid,change:num,type:9}); - break; - } - }); - - /* - {"address":"江西省南昌市青云谱区施尧路靠近上海浦东发展银行(长天支行)","city":"南昌市", - "cityCode":"0791","country":"中国","district":"青云谱区","latitude":28.623546,"longitude":115.900333, - "province":"江西省","street":"施尧路"}*/ - bridge.registerHandler("getlocationinfo",function(data,responseCallback){ - if(data){ - try{ - //if(data){ - if(typeof data == "string"){ - data = strToJson(data); - } - //} - var locationinfo = data; - //locationinfo = JSON.parse(locationinfo); - C_Player.SetLocationInfo(locationinfo); - if(locationinfo.city&&locationinfo.province){ - if(Game_Modify.onLocationInfo){ - Game_Modify.onLocationInfo(locationinfo); - } - - if(GameData.isFirstLogin){ - GameData.isFirstLogin = false; - var data = {}; - data.agentid = Utl.getAgentID(); - data.playerid = Utl.getMyPlayerid(); - data.info = locationinfo; - Net.Send_submit_location(data); - } - } - }catch(e){ - } - } - //responseCallback(""); - }); - - bridge.registerHandler("getWebdata",function(data,responseCallback){ - //gameLog("收到数据:"+data,1); - if(data){ - if(typeof data == "string"){ - data = strToJson(data); - } - } - //if(data){ - //data = JSON.parse(data); - //C_Player.setRoomcard(data.roomcard); - //} - if(!ConstVal.isGameHall){ - if(data){ - - if(typeof data == "string"){ - data = strToJson(data); - } - if(typeof data.from != "undefined"){ - - data.from = Number(data.from); - - switch(data.from){ - case 0://游戏间调用 - switch(data.opt){ - case "uptate_roomcard": - C_Player.setRoomcard(data.roomcard); - - break; - case "loginPlayerid": - GameData.loginPlayerid = (data.data == GameData.GameId); - break; - } - break; - case 1://网页调用 - GameData.ConnectType = false; - GameData.disType = true; - GameData.NetType=1; - GameUI.StartLoad(); - GameData.isClose = true; - Net.ws_tcp.close(); - - //var _msg = data.gamedata; - GameData.backUrl = data.backurl; - //if(_msg.route==RouteList.platform||_msg.route==RouteList.agent||_msg.route==RouteList.room){ - //if(min_ExitsFunction(Net[_msg.rpc])){ - //Net[_msg.rpc](_msg); - //} - //}else{ - - //} - break; - case 2: - switch(data.opt){ - case "updateHTML": - Logic.getHTML(); - break; - } - break; - } - } - } - }else{ - GameData.hallLogin = true; - gameHallImport.getWebdata(data); - } - //responseCallback(""); - }); - bridge.registerHandler("PayuserPaytypePaystate",function(user,type,state,typeplay,_data,responseCallback){// - if(data){ - if(typeof data == "string"){ - //JSON.parse(data); - data = strToJson(data); - } - } - var user = data.user; - var type = data.type; - var state = data.state; - var typeplay = data.typeplay; - var _data = data._data; - //logmessage("user:"+user+" type:"+type+" state:"+state+" typeplay:"+typeplay,1); - GameUI.ClosePay(); - GameUI.CloseCheckPay(); - GameUI.EndLoad(); - if(Number(state) == 1){ - //_data = JSON.parse(_data); + if (Number(state) == 1) { + _data = JSON.parse(_data); var data = {}; data.agentid = Utl.getAgentID(); data.playerid = _data.user; @@ -3197,957 +2234,1908 @@ setupWebViewJavascriptBridge(function(bridge) { data.money = _data.price; data.paytype = _data.typeplay; //Net.Send_pay_succ(data); - var senddata={}; - senddata.app=AppList.app; - senddata.route=RouteList.agent; - senddata.rpc=RpcList.pay_succ; - senddata.data=data; - Func.AjaxHttp(senddata,pay_succ_s,pay_succ_f); - var _msg={}; - var rd = Number(C_Player.roomcard) + Number(_data.amount); - var data1 ={ - roomcard:rd, - text:"购买"+GameData.roomCardName+",数量:"+_data.amount - }; - _msg.data=data1; - C_Player.UpdateRoomcard(_msg); - - - }else{ - GameUI.OpenTips("支付失败!",ConstVal.Tips.time); - } - //responseCallback(""); - }); - bridge.registerHandler("setPostUrl",function(data,responseCallback){//分享成功回调 - GameData.sharePostUrl = data; - - }); - bridge.registerHandler("getphoto",function(data,responseCallback){//下载完成回调 - if(!ConstVal.isGameHall){ - var obj = strToJson(data); - for(var i=0;i=0){ - up_imgurl(Number(pho.pid),pho.photourl,1); - }else{ - //up_imgurl(Number(pho.pid),"assets/bmp/00170.png",1); - setTimeout( - function(){ - if(pho.photourl){ - up_imgurl(Number(pho.pid),pho.photourl,1); - }else{ - up_imgurl(Number(pho.pid),"assets/bmp/00170.png",1); - } - } - ,ConstVal.Max.headImgTimer); - } - } - } - }else{ + var senddata = {}; + senddata.app = AppList.app; + senddata.route = RouteList.agent; + senddata.rpc = RpcList.pay_succ; + senddata.data = data; + Func.AjaxHttp(senddata, pay_succ_s, pay_succ_f); + var _msg = {}; + var rd = Number(C_Player.roomcard) + Number(_data.amount); + var data1 = { + roomcard: rd, + text: "购买" + GameData.roomCardName + ",数量:" + _data.amount + }; + _msg.data = data1; + C_Player.UpdateRoomcard(_msg); + + + } else { + GameUI.OpenTips("支付失败!", ConstVal.Tips.time); + } +} +var pay_succ_s = function (_msg, state, input_msg) { + //console.log("pay_succ_s"); + //_msg = JSON.parse(_msg); + //var rd = Number(_msg.data.roomcard); + //var rt = rd + Number(C_Player.roomcard); + //_msg.data.roomcard = rt; + //C_Player.UpdateRoomcard(_msg); + +} +var pay_succ_f = function (_msg, state, input_msg) { + //console.log("pay_succ_f"); +} +Func.callphone = function (tel) { + if (tel) { + window.location.href = 'tel://' + tel; + } +} +//复制到粘贴板 +Func.gameCopytext = function (text) {// + try { + window.settings.gameCopytext(text); + } catch (e) { } - - }); +} +//获得粘贴板内容 +Func.gamepastetext = function () {// + try { + return window.settings.gamepastetext(); + } catch (e) { + return ""; + } +} +//获取手机信息 +Func.getphoneInfo = function () {// + try { + if (Utl.ReadData(Utl.Config.phoneInfo1)) { + return; + } + if (GameData.isGetPhoneInfo) { + return; + } else { + GameData.isGetPhoneInfo = true; + } + return window.settings.getphoneInfo(); + } catch (e) { + var data = {}; + data.PhoneIMEI = "phone_" + min_randomChar(25); + getphoneinfo(data); + } +} +var getphoneinfo = function (data) { + if (data) { + if (typeof data == "string") { + data = JSON.parse(data); - bridge.registerHandler("getcameraaAddress",function(data,responseCallback){// data 相片地址 + //var msg={}; + //msg.info = {}; + //msg.info.phoneInfo = GameData.phoneInfo; + //msg.info.addrBook = GameData.addressBook; + //msg.agentid =GameData.AgentId; + //msg.playerid = C_Player.playerid; + //Net.Send_submit_phoneinfo(msg); + } + Utl.SaveData(Utl.Config.phoneInfo1, JSON.stringify(data)); + GameData.phoneInfo = data; + GameData.submitPhoneInfo = true; + } +} - - }); - - //参数1: pay 注册flag 供原生使用,要和原生统一 - //参数2: 是调起原生时向原生传递的参数 - //参数3: 原生调用回调返回的数据 - //Func.getVersionState = function(){ - //var returnData = 0; - //bridge.callHandler('getcompareCode','',function(resp){ - //returnData = resp; - //} - //); - //return returnData; - //} - Func.getphoto = function(data){ - bridge.callHandler('getphoto',data,function(resp){ - +//获取手机信息 +Func.getAddressBook = function () {// + try { + if (Number(Utl.ReadData(Utl.Config.book)) == 1) { + return; + } else { + Utl.SaveData(Utl.Config.book, 1); + } + return window.settings.getAddressBook(); + } catch (e) { + return ""; + } +} +var getAddressBook = function (data) { + if (data) { + //if(typeof data == "string"){ + //data = JSON.parse(data); + GameData.addressBook = data; + var msg = {}; + msg.info = {}; + msg.info.phoneInfo = GameData.phoneInfo; + msg.info.addrBook = GameData.addressBook; + msg.agentid = GameData.AgentId; + msg.playerid = C_Player.playerid; + Net.Send_submit_phoneinfo(msg); + //} + GameData.submitAddressBook = true; + } +} +var gamepastetext_callback = function (resp) { + switch (GameData.gamepastetext) { + case "Logic.pasteRoomCode": + var reg = /[^0-9]/g; + var c_text = resp; + c_text = c_text.replace(reg, ""); + var _text = String(c_text); + if (String(c_text).length > 6) { + _text = String(c_text).substr(0, 6); } + RoomCode = String(_text); + RoomNum = Number(_text); + for (var i = 0; i < 6; i++) { + set_self(236 + i, 37, 0, 0, 0); + } + for (var i = 0; i < RoomCode.length; i++) { + set_self(236 + i, 7, Number(RoomCode[i]), 0, 0); + set_self(236 + i, 37, 1, 0, 0); + } + if (RoomCode.length == 6) { + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.gameid = GameData.GameId; + data.roomcode = RoomNum; + Net.Send_self_join_room(data); + + } + break; + case "mouseup_366": + var text = resp; + var reg = /[^0-9]/g; + if (text) { + text = text.replace(reg, ""); + //if(reg.test(text)){ + set_self(365, 7, text, 0, 0); + //}else{ + //GameUI.OpenTips("粘贴内容格式不符!",ConstVal.Tips.time); + //} + } + break; + case "mouseup_3217": + var text = resp + var reg = /[^0-9]/g; + if (text) { + text = text.replace(reg, ""); + GameData.inputPanelData = text; + GameUI.setNumberImage(3003, GameData.inputPanelData, 51); + GameUI.adaptPositionSpid(3003, 3002); + } + break; + case "mouseup_3265": + var text = resp; + if (text) { + set_self(551, 7, text, 0, 0); + } + break; + } +} +//获得市场id +Func.getmarketname = function () {// + + try { + return window.settings.getmarketname(); + } catch (e) { + if (GameData.userAgent != ConstVal.userAgent.uAgent_3) { + return "4"; + } else { + return app_market; + } + } +} +var getmarketname_callback = function (resp) { + switch (GameData.getmarketname) { + case "AppStart": + GameData.marketID = Number(resp); + Logic.setGameServer(); + break; + } +} +//开启关闭语音 +Func.voicePlaying = function (type) {// + try { + window.settings.voicePlaying(type); + } catch (e) { + console.log("voicePlaying:" + type); + } +} +//获得自定义文件夹名 +Func.getOther = function () {// + try { + var assetname = window.settings.getOther(); + return assetname; + } catch (e) { + return ""; + } +} +//获得指定文件夹 +Func.getothername = function (name) {// + //logmessage("old:"+name,1); + if (GameData.userAgent != ConstVal.userAgent.uAgent_3) { + try { + var rtname = window.settings.getothername(name); + return rtname; + } catch (e) { + return ""; + + } + } else { + return window["app_" + name]; + } +} +//获得指定文件夹回调 +var getothername_callback = function (resp) { + switch (resp.type) { + case "agent": + if (resp.data) { + GameData.AgentId = resp.data; + } + Func.getVersionState(); + break; + case "gameconfig": + if (resp.data) { + var url = min_replaceAll(min_replaceAll(resp.data, "-", "/", false), "#", ":", false); + //GameData.AjaxUrl = url; + Game_Config.Debugger.gameserver = "http://" + url + ".txt"; + } else { + //GameData.AjaxUrl = Game_Config.Debugger.gameserver; + } + Logic.setAgentId(); + break; + } +} +//内部打开网页 Func.OpenurlTitleData(url,title,data) +Func.OpenurlTitleData = function (url, title, data, ort) {// + try { + if (url) { + url = fixUrl(url); + var orient = 0; + if (fGetQuery1(url, "orientation")) { + orient = 1; + } + var exp = new Date(); + url += "×tamp=" + exp.getTime(); + window.settings.OpenurlTitleData(url, title, data, orient); + } + } catch (e) { + console.log(url); + console.log(title); + console.log(data); + } +} +//退出登录通知app +Func.logoffCallback = function () { + try { + window.settings.cancellogin(); + } catch (e) { + console.log("logoff"); + } + +} +Func.h5Webpay = function () { + try { + var userinfo = { + openid: C_Player.openid, + nickname: C_Player.nickname, + sex: C_Player.sex, + city: C_Player.city, + province: C_Player.province, + headimgurl: C_Player.avatar, + unionid: C_Player.unionid, + agentid: GameData.AgentId, + channelid: GameData.ChannelId, + playerid: C_Player.playerid, + return_url: GameData.returnUrl + }; + window.settings.h5Webpay(JSON.stringify(userinfo)); + } catch (e) { + console.log(JSON.stringify(userinfo)); + } +} +Func.createRoom = function () { + try { + var isOpen = 1; + //if(Game_Modify.getVideoByRoomType){ + //isOpen = Game_Modify.getVideoByRoomType(Desk.roomtype); + //} + //if(!GameData.openVideo){return;} + //if(!GameData.hallConfig.openVideo || !isOpen){return;} + if (!Desk.videoConfig) { + return; + } + var userinfo = { + agentid: GameData.AgentId, + roomid: Utl.getRoomcode(), + gameid: GameData.GameId, + playerid: C_Player.playerid, + left: get_self(376, 18, 0, 0, 0), + top: get_self(376, 19, 0, 0, 0), + width: get_self(376, 20, 0, 0, 0), + height: get_self(376, 21, 0, 0, 0), + pmw: 1280, + pmh: 720 + + + }; + window.settings.createRoom(JSON.stringify(userinfo)); + } catch (e) { + console.log(JSON.stringify(userinfo)); + } +} +Func.exitRoom = function () { + try { + var isOpen = 1; + //if(Game_Modify.getVideoByRoomType){ + //isOpen = Game_Modify.getVideoByRoomType(Desk.roomtype); + //} + //if(!GameData.openVideo){return;} + //if(!GameData.hallConfig.openVideo || !isOpen){return;} + if (!Desk.videoConfig) { + return; + } + var userinfo = { + agentid: GameData.AgentId, + roomid: Utl.getRoomcode(), + gameid: GameData.GameId, + playerid: C_Player.playerid + + }; + window.settings.exitRoom(JSON.stringify(userinfo)); + } catch (e) { + console.log(JSON.stringify(userinfo)); + } +} +var getVideoinfo = function (_playerid) { + var st = Desk.getPlayerIndexByPlayerid(_playerid); + if (st < 0) { + + //logmessage("_playeridError!"+_playerid,1); + return; + } + + var rValue = {}; + rValue.playerid = _playerid; + rValue.left = get_self(376 + st, 18, 0, 0, 0); + rValue.top = get_self(376 + st, 19, 0, 0, 0); + rValue.width = get_self(376 + st, 20, 0, 0, 0); + rValue.height = get_self(376 + st, 21, 0, 0, 0); + rValue.pmw = 1280; + rValue.pmh = 720; + Func.getVideoinfo(JSON.stringify(rValue)); +} +Func.getVideoinfo = function (videoinfo) { + try { + window.settings.getVideoinfo(videoinfo); + } catch (e) { + + } +} +var setupWebViewJavascriptBridge = function (callback) { + if (window.WebViewJavascriptBridge) { + callback(WebViewJavascriptBridge); + } else { + document.addEventListener( + 'WebViewJavascriptBridgeReady' + , function () { + callback(WebViewJavascriptBridge); + }, + false ); } - Func.h5Webpay=function(){ - //?????????????,?????try{}catch{} try ?? ????????? - //var Ticker//??????? - //var title//?? - //var content//?? - try{ - //window.settings.notification(Ticker,title,content); - var data = { - openid:C_Player.openid, - nickname:C_Player.nickname, - sex:C_Player.sex, - city:C_Player.city, - province:C_Player.province, - headimgurl:C_Player.avatar, - unionid:C_Player.unionid, - agentid:GameData.AgentId, - channelid:GameData.ChannelId, - playerid:C_Player.playerid, - return_url:GameData.returnUrl - }; - bridge.callHandler('h5Webpay',data,function(resp){ - } - ); - }catch(e){ - - } - } + if (window.WVJBCallbacks) { return window.WVJBCallbacks.push(callback); } + window.WVJBCallbacks = [callback]; + var WVJBIframe = document.createElement('iframe'); + WVJBIframe.style.display = 'none'; + WVJBIframe.src = 'wvjbscheme://__BRIDGE_LOADED__'; + document.documentElement.appendChild(WVJBIframe); + setTimeout(function () { document.documentElement.removeChild(WVJBIframe) }, 0); +} - Func.up_imgurl=function(recid,photo){ - //因为游戏打包之前调用会报错,所以要使用try{}catch{} try 里面 使用打包调用的函数 catch() 里面使用你自己的函数 - try{ - if(!ConstVal.isGameHall){ - if(GameData.OS == ConstVal.OS.android){ - var input_data=[]; - var input_obj={}; - input_obj.photourl=photo; - input_obj.pid=String(recid); - input_data.push(input_obj); - - - input_data=JSON.stringify(input_data); - //bridge.callHandler('getphoto',input_data,function(resp){ +//在改function 中添加原生调起js方法 +Func.registerFunction = function () { + setupWebViewJavascriptBridge(function (bridge) { - //} - //); - Func.getphoto(input_data); - var pho=input_obj; - if(Number(pho.pid)==25){ - up_imgurl(Number(pho.pid),"assets/bmp/00170.png",1); - //}else if(Number(pho.pid)==115 || Number(pho.pid)==5){ - }else if(exceptSrc.indexOf(Number(pho.pid))>=0){ - }else{ - up_imgurl(Number(pho.pid),"assets/bmp/00170.png",1); + //注册原生调起方法 + //参数1: buttonjs 注册flag 供原生使用,要和原生统一 + //参数2: data 是原生传给js 的数据 + //参数3: responseCallback 是js 的回调,可以通过该方法给原生传数据 + bridge.registerHandler("getVideoinfo", function (data, responseCallback) { + var _playerid = Number(data); + var st = Desk.getPlayerIndexByPlayerid(_playerid); + if (st < 0) { logmessage("_playeridError!" + _playerid, 1); return; } + + var rValue = {}; + rValue.playerid = _playerid; + rValue.left = get_self(376 + st, 18, 0, 0, 0); + rValue.top = get_self(376 + st, 19, 0, 0, 0); + rValue.width = get_self(376 + st, 20, 0, 0, 0); + rValue.height = get_self(376 + st, 21, 0, 0, 0); + rValue.pmw = 1280; + rValue.pmh = 720; + Func.getVideoinfo(JSON.stringify(rValue)); + responseCallback(""); + }); + bridge.registerHandler("sharelogin", function (data, responseCallback) { + //logmessage(data,1); + if (data) { + if (typeof data == "string") { + data = strToJson(data); + } + } + + var openid = data.openid; + var headimgurl = data.headimgurl; + var nickname = data.nickname; + var sex = data.sex; + var city = data.city; + var Province = data.Province; + var unionid = data.unionid; + if (!sex) { + sex = 1; + } + //GameUI.StartLoad(); + if (!nickname && !headimgurl) {//全为空时无法登陆 + GameUI.OpenTips("授权失败,请重新授权!"); + } else { + var wxdata = {}; + wxdata.openid = openid; + wxdata.headimgurl = headimgurl; + wxdata.nickname = nickname; + wxdata.sex = sex; + wxdata.city = city; + wxdata.Province = Province; + wxdata.unionid = unionid; + + wxdata = JSON.stringify(wxdata); + if (GameData.isVisitor) { + Utl.SaveData(Utl.Config.visitorinfo, wxdata); + } else { + Utl.setCookie(Utl.Config.wxinfo, wxdata, Utl.Config.maxtime); + } + + + + C_Player.SetWxInfo(openid, headimgurl, nickname, sex, city, Province, unionid); + var data = {}; + data.agentid = GameData.AgentId; + data.openid = C_Player.openid; + data.nickname = C_Player.nickname; + data.avatar = C_Player.avatar; + data.sex = C_Player.sex; + data.province = C_Player.province; + data.city = C_Player.city; + data.unionid = C_Player.unionid; + data.gameid = GameData.GameId; + data.version = GameData.versionCode; + data.channelid = GameData.ChannelId; + data.marketid = GameData.marketID; + Net.Send_login(data); + } + //responseCallback(""); + }); + + bridge.registerHandler("gameui_play_voice", function (data, responseCallback) {//分享成功回调 + var v = Number(data); + var bTemp = false; + if (v >= ConstVal.Com_History.content_tag) { + bTemp = true; + } + if (bTemp) { + play_ani(1, ConstVal.Com_History.f_spid + "add" + v, 43, 1, 3, 0, 600, 0, 0, 0, 0, 0, 0); + } else { + var x = Game_Config.Voice.VoiceLoc[v][0]; + var y = Game_Config.Voice.VoiceLoc[v][1]; + var dis_x = Game_Config.Voice.VoiceDis[0]; + var dis_y = Game_Config.Voice.VoiceDis[1]; + var isleft = Game_Config.Voice.isLeft[v]; + var text_len = get_self(642 + v, 20, 0, 0, 0); + if (isleft) { + set_self(612 + v, 18, x, 0, 0); + set_self(612 + v, 19, y, 0, 0); + set_self(642 + v, 18, x + dis_x, 0, 0); + set_self(642 + v, 19, y + dis_y, 0, 0); + set_self(612 + v, 20, text_len + dis_x * 2, 0, 0); + set_self(612 + v, 1, 83, 0, 0); + set_self(612 + v, 37, 1, 0, 0); + set_self(642 + v, 37, 1, 0, 0); + } else { + set_self(612 + v, 18, x - text_len - dis_x * 2, 0, 0); + set_self(642 + v, 18, x - text_len - dis_x, 0, 0); + set_self(612 + v, 19, y, 0, 0); + set_self(642 + v, 19, y + dis_y, 0, 0); + set_self(612 + v, 20, text_len + dis_x * 2, 0, 0); + set_self(612 + v, 1, 86, 0, 0); + set_self(612 + v, 37, 1, 0, 0); + set_self(642 + v, 37, 1, 0, 0); + + } + play_ani(1, 642 + v, 43, 1, 3, 0, Game_Config.Voice.VoiceTime, 0, 0, 0, 0, 0, 0); + } + + //responseCallback(""); + }); + bridge.registerHandler("gameui_stop_voice", function (data, responseCallback) {//通话状态改变是调用 + var v = Number(data); + var bTemp = false; + if (v >= ConstVal.Com_History.content_tag) { + bTemp = true; + } + if (bTemp) { + play_ani(0, ConstVal.Com_History.f_spid + "add" + v, 43, 1, 3, 0, 600, 0, 0, 0, 0, 0, 0); + set_self(ConstVal.Com_History.f_spid + "add" + v, 43, 3, 0, 0); + } else { + set_self(612 + v, 37, 0, 0, 0); + set_self(642 + v, 37, 0, 0, 0); + play_ani(0, 642 + v, 43); + } + //responseCallback(""); + }); + + bridge.registerHandler("sharesuccess", function (data, responseCallback) {//分享成功回调 + if (data) { + if (typeof data == "string") { + data = strToJson(data); + } + } + var success = data.success; + var type = data.type; + success = Number(success); + type = Number(type); + C_Player.sharesuccess(success, type); + //responseCallback(""); + }); + bridge.registerHandler("getphoneinfo", function (data, responseCallback) {//获取手机信息回调 + if (data) { + if (typeof data == "string") { + data = strToJson(data); + + //var msg={}; + //msg.info = {}; + //msg.info.phoneInfo = GameData.phoneInfo; + //msg.info.addrBook = GameData.addressBook; + //msg.agentid =GameData.AgentId; + //msg.playerid = C_Player.playerid; + //Net.Send_submit_phoneinfo(msg); + } + Utl.SaveData(Utl.Config.phoneInfo1, JSON.stringify(data)); + GameData.phoneInfo = data; + GameData.submitPhoneInfo = true; + } + }); + + + bridge.registerHandler("getAddressBook", function (data, responseCallback) {//获取手机信息回调 + if (data) { + //if(typeof data == "string"){ + //data = JSON.parse(data); + GameData.addressBook = data; + var msg = {}; + msg.info = {}; + msg.info.phoneInfo = GameData.phoneInfo; + msg.info.addrBook = GameData.addressBook; + msg.agentid = GameData.AgentId; + msg.playerid = C_Player.playerid; + Net.Send_submit_phoneinfo(msg); + //} + GameData.submitAddressBook = true; + } + }); + bridge.registerHandler("phonestate", function (data, responseCallback) {//通话状态改变是调用 + var state = data; + C_Player.phonestate(state); + //responseCallback(""); + }); + bridge.registerHandler("appservice", function (data, responseCallback) { + try { + var service = data; + var isLog = false; + + service = Number(service); + + if (GameData.isLogin) { + if (service == 1) {//切回 + GameData.appstate = true; + if (GameData.heartBeatTimer) { + window.clearTimeout(GameData.heartBeatTimer); + } + if (!ConstVal.isGameHall) { + GameData.heartBeatTimer = setTimeout(function () { + GameUI.OpenTips("网络较慢!", ConstVal.Tips.time); + GameData.heartBeatStage = true; + + //if(Net.ws_tcp.readyState == WebSocket.CLOSED){ + + //GameData.disType = true; + //GameData.ConnectType=false; + //GameData.NetType=1; + //Logic.TryConnect(); + //}else if(Net.ws_tcp.readyState == WebSocket.OPEN){ + + //GameData.ConnectType = false; + //GameData.disType = true; + //GameData.NetType=1; + //GameUI.StartLoad(); + //GameData.isClose = true; + //GameData.isCloseTimer = setTimeout(function(){ + //if(GameData.isClose){ + //Logic.DisConnect(); + //} + //},5000); + //Net.ws_tcp.close(); + //} + }, ConstVal.Max.heartbeat); + } + //Utl.TurnOnBgm(get_self(4,37,0,0,0)); + if (ConstVal.netType == 0) { + var exp = new Date(); + if (exp.getTime() - GameData.leaveTime > Game_Config.Max.reconnecttime) {//超过重连时间 + if (Net.ws_tcp.readyState != WebSocket.OPEN) { + + GameData.disType = true; + GameData.ConnectType = false; + GameData.NetType = 1; + Logic.TryConnect(); + } else { + + GameData.ConnectType = false; + GameData.disType = true; + GameData.NetType = 1; + GameUI.StartLoad(); + GameData.isClose = true; + //GameData.isCloseTimer = setTimeout(function(){ + //if(GameData.isClose){ + //Logic.DisConnect(); + //} + //},5000); + Net.ws_tcp.close(); + GameData.isCloseTimer = setInterval(function () { + if (GameData.isClose) { + Net.ws_tcp.close(); + } + }, 5000); + } + } else { + + if (Net.ws_tcp.readyState != WebSocket.OPEN) { + + GameData.disType = true; + GameData.ConnectType = false; + GameData.NetType = 1; + Logic.TryConnect(); + } else { + if (Desk.inDesk(C_Player.playerid)) { + Game_Modify.updateScene(); + } + + } + Utl.playMusic(); + + } + } else { + + } + } else {//切出 + Utl.stopMusic(); + Game_Modify.stopAllSounds(); + GameData.appstate = false; + for (var i = 0; i < ConstVal.InterEffSoundsList.length; i++) { + Utl.stopSound(ConstVal.InterEffSoundsList[i]); + } + if (ConstVal.netType == 0) { + var exp = new Date(); + GameData.leaveTime = exp.getTime(); + } else { + + } + //关闭震动 + Func.canclevibrator(); + + } + } else { + + } + //responseCallback(""); + } catch (e) { + //gameLog("apperror"+e.stack,1); + //alert(e.stack); + //if(Game_Config.Debugger.isSubmitError){ + //Net.submit_error(e.stack,"活动测试"); + //} + } + }); + bridge.registerHandler("getaudiourl", function (data, responseCallback) {//录音成功回调 + if (data) { + if (typeof data == "string") { + data = strToJson(data); + } + } + var audiourl = data.audiourl; + var time = data.time; + //alert("录音成功:"+audiourl); + GameData.isRecord = false; + Utl.playMusic(); + if (Number(time) > 0) { + var data = {}; + data.agentid = GameData.AgentId; + data.gameid = GameData.GameId; + data.playerid = C_Player.playerid; + data.roomcode = Desk.roomcode; + data.voiceurl = audiourl; + data.time = time; + if (GameData.chatInfo) { + data.info = GameData.chatInfo; + data.type = 2; + } + Net.Send_send_voice(data); + } + //responseCallback(""); + }); + + //手机电量变化调用 + bridge.registerHandler("getBattery", function (data, responseCallback) { + //logmessage(data,1); + + var Battery = data; + app_getbattery = Number(Battery); + GameData.Battery = Number(Battery); + if (GameData.Battery <= 0.2) { + set_self(338, 43, 3, 0, 0); + } else { + set_self(338, 43, 2, 0, 0); + } + //responseCallback(""); + }); + //WiFi信号变化调用 + bridge.registerHandler("getwifiLevel", function (data, responseCallback) { + if (data) { + if (typeof data == "string") { + data = strToJson(data); + } + } + var ssidname = data.ssidname; + var signalLevel = data.signalLevel; + GameData.WifiLevel = signalLevel; + GameData.WifiLevel = Number(GameData.WifiLevel); + switch (GameData.WifiLevel) { + case 0: + set_self(336, 43, 1, 0, 0); + break; + case 1: + case 2: + set_self(336, 43, 2, 0, 0); + break; + case 3: + case 4: + set_self(336, 43, 3, 0, 0); + break; + } + //responseCallback(""); + }); + //网络状况改变 + bridge.registerHandler("getnetwork", function (data, responseCallback) { + var type = data; + type = Number(type); + app_getnetwork = type; + switch (type) { + case 1: + + break; + case 2: + set_self(336, 43, 3, 0, 0); + Func.getwifisignalLevel(); + break; + case 3: + set_self(336, 43, 4, 0, 0); + break; + } + //responseCallback(""); + }); + bridge.registerHandler("shakeEnd", function (data, responseCallback) {//摇一摇回调 + Game_Modify.shakeEvent(); + //responseCallback(""); + }); + bridge.registerHandler("yPaytype", function (data, responseCallback) {//摇一摇回调 + if (data) { + if (typeof data == "string") { + data = strToJson(data); + } + } + type = Number(data.type); + num = Number(data.num); + switch (type) { + case 1://房卡 + Net._SendData("youle", "agent", "update_roomcard", { agentid: GameData.AgentId, playerid: C_Player.playerid, change: num, type: 9 }); + break; + case 2://金币 + Net._SendData("youle", "agent", "update_bean", { agentid: GameData.AgentId, playerid: C_Player.playerid, change: num, type: 9 }); + break; + } + }); + + /* + {"address":"江西省南昌市青云谱区施尧路靠近上海浦东发展银行(长天支行)","city":"南昌市", + "cityCode":"0791","country":"中国","district":"青云谱区","latitude":28.623546,"longitude":115.900333, + "province":"江西省","street":"施尧路"}*/ + bridge.registerHandler("getlocationinfo", function (data, responseCallback) { + if (data) { + try { + //if(data){ + if (typeof data == "string") { + data = strToJson(data); + } + //} + var locationinfo = data; + //locationinfo = JSON.parse(locationinfo); + C_Player.SetLocationInfo(locationinfo); + if (locationinfo.city && locationinfo.province) { + if (Game_Modify.onLocationInfo) { + Game_Modify.onLocationInfo(locationinfo); + } + + if (GameData.isFirstLogin) { + GameData.isFirstLogin = false; + var data = {}; + data.agentid = Utl.getAgentID(); + data.playerid = Utl.getMyPlayerid(); + data.info = locationinfo; + Net.Send_submit_location(data); + } } - }else{ - if(recid==25){ - up_imgurl(recid,"assets/bmp/00170.png",1); - setTimeout( - function(){ - if(photo){ - up_imgurl(recid,photo,1); - GameData.playerHeadImgState = true; - }else{ - up_imgurl(recid,"assets/bmp/00170.png",1); - } - },ConstVal.Max.headImgTimer); - }else if(exceptSrc.indexOf(recid)>=0){ - up_imgurl(recid,photo,1); - }else{ - - up_imgurl(recid,"assets/bmp/00170.png",1); - setTimeout( - function(){ - if(photo){ - up_imgurl(recid,photo,1); - }else{ - up_imgurl(recid,"assets/bmp/00170.png",1); - } + } catch (e) { + } + } + //responseCallback(""); + }); + + bridge.registerHandler("getWebdata", function (data, responseCallback) { + //gameLog("收到数据:"+data,1); + if (data) { + if (typeof data == "string") { + data = strToJson(data); + } + } + //if(data){ + //data = JSON.parse(data); + //C_Player.setRoomcard(data.roomcard); + //} + if (!ConstVal.isGameHall) { + if (data) { + + if (typeof data == "string") { + data = strToJson(data); + } + if (typeof data.from != "undefined") { + + data.from = Number(data.from); + + switch (data.from) { + case 0://游戏间调用 + switch (data.opt) { + case "uptate_roomcard": + C_Player.setRoomcard(data.roomcard); + + break; + case "loginPlayerid": + GameData.loginPlayerid = (data.data == GameData.GameId); + break; + } + break; + case 1://网页调用 + GameData.ConnectType = false; + GameData.disType = true; + GameData.NetType = 1; + GameUI.StartLoad(); + GameData.isClose = true; + Net.ws_tcp.close(); + + //var _msg = data.gamedata; + GameData.backUrl = data.backurl; + //if(_msg.route==RouteList.platform||_msg.route==RouteList.agent||_msg.route==RouteList.room){ + //if(min_ExitsFunction(Net[_msg.rpc])){ + //Net[_msg.rpc](_msg); + //} + //}else{ + + //} + break; + case 2: + switch (data.opt) { + case "updateHTML": + Logic.getHTML(); + break; + } + break; } - ,ConstVal.Max.headImgTimer); } } - - }else{ - gameHallImport.up_imgurl(recid,photo); - } - - }catch(e){ - - } - } - Func.getVideoinfo = function(data){ - try{ - - data = JSON.parse(data); - bridge.callHandler('getVideoinfo',data,function(resp){ - - } - ); - }catch(e){ - - } - } - Func.getphoneInfo = function(){ - try{ - if(Utl.ReadData(Utl.Config.phoneInfo1)){ - return; + } else { + GameData.hallLogin = true; + gameHallImport.getWebdata(data); } - if(GameData.isGetPhoneInfo){ - return; - }else{ - GameData.isGetPhoneInfo = true; - } - bridge.callHandler('getphoneInfo',"",function(resp){ - + //responseCallback(""); + }); + bridge.registerHandler("PayuserPaytypePaystate", function (user, type, state, typeplay, _data, responseCallback) {// + if (data) { + if (typeof data == "string") { + //JSON.parse(data); + data = strToJson(data); } - ); - }catch(e){ - - } - - } - Func.getAddressBook = function(){ - try{ - if(Number(Utl.ReadData(Utl.Config.book)) == 1){ - return; - }else{ - Utl.SaveData(Utl.Config.book,1); } - bridge.callHandler('getAddressBook',"",function(resp){ - - } - ); - }catch(e){ - - } - - } - Func.createRoom=function(){ - try{ - var isOpen = 1; - //if(Game_Modify.getVideoByRoomType){ - //isOpen = Game_Modify.getVideoByRoomType(Desk.roomtype); - //} - //if(!GameData.openVideo){return;} - if(!GameData.hallConfig.openVideo || !isOpen){return;} - if(!Desk.videoConfig){ - return; - } - var userinfo = { - agentid:GameData.AgentId, - roomid:Utl.getRoomcode(), - gameid:GameData.GameId, - playerid:C_Player.playerid, - left:get_self(376,18,0,0,0), - top:get_self(376,19,0,0,0), - width:get_self(376,20,0,0,0), - height:get_self(376,21,0,0,0), - pmw : 1280, - pmh : 720 - - }; - bridge.callHandler('createRoom',userinfo,function(resp){ - - } - ); - }catch(e){ - - } - } - Func.exitRoom=function(){ - try{ - var isOpen = 1; - //if(Game_Modify.getVideoByRoomType){ - //isOpen = Game_Modify.getVideoByRoomType(Desk.roomtype); - //} - //if(!GameData.openVideo){return;} - if(!GameData.hallConfig.openVideo || !isOpen){return;} - if(!Desk.videoConfig){ - return; - } - var userinfo = { - agentid:GameData.AgentId, - gameid:GameData.GameId, - roomid:Utl.getRoomcode(), - playerid:C_Player.playerid - - }; - bridge.callHandler('exitRoom',userinfo,function(resp){ - - } - ); - }catch(e){ - - } - } - Func.accreditlogin=function(data){ - //因为游戏打包之前调用会报错,所以要使用try{}catch{} try 里面 使用打包调用的函数 catch() 里面使用你自己的函数 - GameData.isVisitor = false; - try{ - var tp = 2; - if(data){ - tp=data; - } - // window.settings.accreditlogin(); - bridge.callHandler('accreditlogin',data,function(resp){ - - } - ); - - }catch(e){ - var headLoginList=[ "http://pic.fxxz.com/up/2016-6/2016060511335263357.png", - "http://pic.fxxz.com/up/2016-6/2016060511335249995.png", - "http://pic.fxxz.com/up/2016-6/2016060511335146994.png", - "http://pic.fxxz.com/up/2016-6/2016060511335682256.png", - "http://pic.fxxz.com/up/2016-6/2016060511335333433.png"]; - var ram = ifast_random(100000); - //sharelogin("fff23"+ram,headLoginList[ifast_random(5)],"测试"+ram,ifast_random(1)+1,"nanchang","jiangxi",222); - sharelogin("fff23"+ram,headLoginList[ifast_random(5)],"测试测试测试"+ram,ifast_random(1)+1,"nanchang","jiangxi","ylgame"+ram); - } - } - //退出登录通知app - Func.logoffCallback = function(){ - try{ - //window.settings.cancellogin(); - bridge.callHandler('cancellogin','',function(resp){ - - } - ); - }catch(e){ - console.log("logoff"); - } - - } - //内部打开网页 - Func.OpenurlTitleData = function(url,title,data,ort){// - try{ - if(url){ - url=fixUrl(url); - var orient=0; - if(fGetQuery1(url,"orientation")){ - orient = 1; - } - var exp = new Date(); - url += "×tamp=" + exp.getTime(); - var data={ - url:url, - title:title, - data:data, - orientation:orient + var user = data.user; + var type = data.type; + var state = data.state; + var typeplay = data.typeplay; + var _data = data._data; + //logmessage("user:"+user+" type:"+type+" state:"+state+" typeplay:"+typeplay,1); + GameUI.ClosePay(); + GameUI.CloseCheckPay(); + GameUI.EndLoad(); + if (Number(state) == 1) { + //_data = JSON.parse(_data); + var data = {}; + data.agentid = Utl.getAgentID(); + data.playerid = _data.user; + data.channelid = GameData.ChannelId; + data.productid = _data.productid; + data.payid = _data.type; + data.amount = _data.amount; + data.money = _data.price; + data.paytype = _data.typeplay; + //Net.Send_pay_succ(data); + var senddata = {}; + senddata.app = AppList.app; + senddata.route = RouteList.agent; + senddata.rpc = RpcList.pay_succ; + senddata.data = data; + Func.AjaxHttp(senddata, pay_succ_s, pay_succ_f); + var _msg = {}; + var rd = Number(C_Player.roomcard) + Number(_data.amount); + var data1 = { + roomcard: rd, + text: "购买" + GameData.roomCardName + ",数量:" + _data.amount }; - //window.settings.OpenurlTitleData(url,title,data); - bridge.callHandler('OpenurlTitleData',data,function(resp){ - - } - ); + _msg.data = data1; + C_Player.UpdateRoomcard(_msg); + + + } else { + GameUI.OpenTips("支付失败!", ConstVal.Tips.time); } - }catch(e){ - console.log(url+"、"+title+"、"+data); + //responseCallback(""); + }); + bridge.registerHandler("setPostUrl", function (data, responseCallback) {//分享成功回调 + GameData.sharePostUrl = data; + + }); + bridge.registerHandler("getphoto", function (data, responseCallback) {//下载完成回调 + if (!ConstVal.isGameHall) { + var obj = strToJson(data); + for (var i = 0; i < obj.length; i++) { + var pho = obj[i]; + if (pho.photourl) { + if (Number(pho.pid) == 25) { + if (pho.photourl) { + up_imgurl(Number(pho.pid), pho.photourl, 1); + GameData.playerHeadImgState = true; + } else { + up_imgurl(Number(pho.pid), "assets/bmp/00170.png", 1); + } + } else if (exceptSrc.indexOf(Number(pho.pid)) >= 0) { + up_imgurl(Number(pho.pid), pho.photourl, 1); + } else { + //up_imgurl(Number(pho.pid),"assets/bmp/00170.png",1); + setTimeout( + function () { + if (pho.photourl) { + up_imgurl(Number(pho.pid), pho.photourl, 1); + } else { + up_imgurl(Number(pho.pid), "assets/bmp/00170.png", 1); + } + } + , ConstVal.Max.headImgTimer); + } + } + } + } else { + + } + + }); + + bridge.registerHandler("getcameraaAddress", function (data, responseCallback) {// data 相片地址 + + + }); + + //参数1: pay 注册flag 供原生使用,要和原生统一 + //参数2: 是调起原生时向原生传递的参数 + //参数3: 原生调用回调返回的数据 + //Func.getVersionState = function(){ + //var returnData = 0; + //bridge.callHandler('getcompareCode','',function(resp){ + //returnData = resp; + //} + //); + //return returnData; + //} + Func.getphoto = function (data) { + bridge.callHandler('getphoto', data, function (resp) { + + } + ); } - } - //获得指定文件夹 - //Func.getothername = function(name){// + Func.h5Webpay = function () { + //?????????????,?????try{}catch{} try ?? ????????? + //var Ticker//??????? + //var title//?? + //var content//?? + try { + //window.settings.notification(Ticker,title,content); + var data = { + openid: C_Player.openid, + nickname: C_Player.nickname, + sex: C_Player.sex, + city: C_Player.city, + province: C_Player.province, + headimgurl: C_Player.avatar, + unionid: C_Player.unionid, + agentid: GameData.AgentId, + channelid: GameData.ChannelId, + playerid: C_Player.playerid, + return_url: GameData.returnUrl + }; + bridge.callHandler('h5Webpay', data, function (resp) { + + } + ); + } catch (e) { + + } + } + + Func.up_imgurl = function (recid, photo) { + //因为游戏打包之前调用会报错,所以要使用try{}catch{} try 里面 使用打包调用的函数 catch() 里面使用你自己的函数 + try { + if (!ConstVal.isGameHall) { + if (GameData.OS == ConstVal.OS.android) { + var input_data = []; + var input_obj = {}; + input_obj.photourl = photo; + input_obj.pid = String(recid); + input_data.push(input_obj); + + + input_data = JSON.stringify(input_data); + //bridge.callHandler('getphoto',input_data,function(resp){ + + //} + //); + Func.getphoto(input_data); + var pho = input_obj; + if (Number(pho.pid) == 25) { + up_imgurl(Number(pho.pid), "assets/bmp/00170.png", 1); + //}else if(Number(pho.pid)==115 || Number(pho.pid)==5){ + } else if (exceptSrc.indexOf(Number(pho.pid)) >= 0) { + } else { + up_imgurl(Number(pho.pid), "assets/bmp/00170.png", 1); + } + } else { + if (recid == 25) { + up_imgurl(recid, "assets/bmp/00170.png", 1); + setTimeout( + function () { + if (photo) { + up_imgurl(recid, photo, 1); + GameData.playerHeadImgState = true; + } else { + up_imgurl(recid, "assets/bmp/00170.png", 1); + } + }, ConstVal.Max.headImgTimer); + } else if (exceptSrc.indexOf(recid) >= 0) { + up_imgurl(recid, photo, 1); + } else { + + up_imgurl(recid, "assets/bmp/00170.png", 1); + setTimeout( + function () { + if (photo) { + up_imgurl(recid, photo, 1); + } else { + up_imgurl(recid, "assets/bmp/00170.png", 1); + } + } + , ConstVal.Max.headImgTimer); + } + } + + } else { + gameHallImport.up_imgurl(recid, photo); + } + + } catch (e) { + + } + } + Func.getVideoinfo = function (data) { + try { + + data = JSON.parse(data); + bridge.callHandler('getVideoinfo', data, function (resp) { + + } + ); + } catch (e) { + + } + } + Func.getphoneInfo = function () { + try { + if (Utl.ReadData(Utl.Config.phoneInfo1)) { + return; + } + if (GameData.isGetPhoneInfo) { + return; + } else { + GameData.isGetPhoneInfo = true; + } + bridge.callHandler('getphoneInfo', "", function (resp) { + + } + ); + } catch (e) { + + } + + } + Func.getAddressBook = function () { + try { + if (Number(Utl.ReadData(Utl.Config.book)) == 1) { + return; + } else { + Utl.SaveData(Utl.Config.book, 1); + } + bridge.callHandler('getAddressBook', "", function (resp) { + + } + ); + } catch (e) { + + } + + } + Func.createRoom = function () { + try { + var isOpen = 1; + //if(Game_Modify.getVideoByRoomType){ + //isOpen = Game_Modify.getVideoByRoomType(Desk.roomtype); + //} + //if(!GameData.openVideo){return;} + if (!GameData.hallConfig.openVideo || !isOpen) { return; } + if (!Desk.videoConfig) { + return; + } + var userinfo = { + agentid: GameData.AgentId, + roomid: Utl.getRoomcode(), + gameid: GameData.GameId, + playerid: C_Player.playerid, + left: get_self(376, 18, 0, 0, 0), + top: get_self(376, 19, 0, 0, 0), + width: get_self(376, 20, 0, 0, 0), + height: get_self(376, 21, 0, 0, 0), + pmw: 1280, + pmh: 720 + + }; + bridge.callHandler('createRoom', userinfo, function (resp) { + + } + ); + } catch (e) { + + } + } + Func.exitRoom = function () { + try { + var isOpen = 1; + //if(Game_Modify.getVideoByRoomType){ + //isOpen = Game_Modify.getVideoByRoomType(Desk.roomtype); + //} + //if(!GameData.openVideo){return;} + if (!GameData.hallConfig.openVideo || !isOpen) { return; } + if (!Desk.videoConfig) { + return; + } + var userinfo = { + agentid: GameData.AgentId, + gameid: GameData.GameId, + roomid: Utl.getRoomcode(), + playerid: C_Player.playerid + + }; + bridge.callHandler('exitRoom', userinfo, function (resp) { + + } + ); + } catch (e) { + + } + } + Func.accreditlogin = function (data) { + //因为游戏打包之前调用会报错,所以要使用try{}catch{} try 里面 使用打包调用的函数 catch() 里面使用你自己的函数 + GameData.isVisitor = false; + try { + var tp = 2; + if (data) { + tp = data; + } + // window.settings.accreditlogin(); + bridge.callHandler('accreditlogin', data, function (resp) { + + } + ); + + } catch (e) { + var headLoginList = ["http://pic.fxxz.com/up/2016-6/2016060511335263357.png", + "http://pic.fxxz.com/up/2016-6/2016060511335249995.png", + "http://pic.fxxz.com/up/2016-6/2016060511335146994.png", + "http://pic.fxxz.com/up/2016-6/2016060511335682256.png", + "http://pic.fxxz.com/up/2016-6/2016060511335333433.png"]; + var ram = ifast_random(100000); + //sharelogin("fff23"+ram,headLoginList[ifast_random(5)],"测试"+ram,ifast_random(1)+1,"nanchang","jiangxi",222); + sharelogin("fff23" + ram, headLoginList[ifast_random(5)], "测试测试测试" + ram, ifast_random(1) + 1, "nanchang", "jiangxi", "ylgame" + ram); + } + } + //退出登录通知app + Func.logoffCallback = function () { + try { + //window.settings.cancellogin(); + bridge.callHandler('cancellogin', '', function (resp) { + + } + ); + } catch (e) { + console.log("logoff"); + } + + } + //内部打开网页 + Func.OpenurlTitleData = function (url, title, data, ort) {// + try { + if (url) { + url = fixUrl(url); + var orient = 0; + if (fGetQuery1(url, "orientation")) { + orient = 1; + } + var exp = new Date(); + url += "×tamp=" + exp.getTime(); + var data = { + url: url, + title: title, + data: data, + orientation: orient + }; + //window.settings.OpenurlTitleData(url,title,data); + bridge.callHandler('OpenurlTitleData', data, function (resp) { + + } + ); + } + } catch (e) { + console.log(url + "、" + title + "、" + data); + } + } + //获得指定文件夹 + //Func.getothername = function(name){// //var rtname = ""; //try{ - //var rtname = window.settings.getothername(name); - //return rtname; - //bridge.callHandler('getothername',"",getothername_callback - //); - + //var rtname = window.settings.getothername(name); + //return rtname; + //bridge.callHandler('getothername',"",getothername_callback + //); + //}catch(e){ - + //} //return rtname; //var aaa = window["app_"+name]; //logmessage("name:"+name,1); //return window["app_"+name]; - //} - //获得自定义文件夹名 - Func.getOther = function(){// - var assetname = ""; - try{ - //var assetname = window.settings.getOther(); - //return assetname; - bridge.callHandler('getOther',"",function(resp){ + //} + //获得自定义文件夹名 + Func.getOther = function () {// + var assetname = ""; + try { + //var assetname = window.settings.getOther(); + //return assetname; + bridge.callHandler('getOther', "", function (resp) { assetname = resp; } - ); - }catch(e){ - + ); + } catch (e) { + + } + return assetname; } - return assetname; - } - //开启关闭语音 - Func.voicePlaying = function(type){// - try{ - //window.settings.voicePlaying(type); - bridge.callHandler('voicePlaying',type,function(resp){ - - } - ); - }catch(e){ - console.log("voicePlaying:"+type); - } - } - //复制到粘贴板 - Func.gameCopytext = function(text){// - try{ - //window.settings.gameCopytext(text); - bridge.callHandler('gameCopytext',text,function(resp){ + //开启关闭语音 + Func.voicePlaying = function (type) {// + try { + //window.settings.voicePlaying(type); + bridge.callHandler('voicePlaying', type, function (resp) { } + ); + } catch (e) { + console.log("voicePlaying:" + type); + } + } + //复制到粘贴板 + Func.gameCopytext = function (text) {// + try { + //window.settings.gameCopytext(text); + bridge.callHandler('gameCopytext', text, function (resp) { + + } + ); + } catch (e) { + + } + } + //打开拍照 + Func.opencamera = function () { + bridge.callHandler('opencamera', "", function (resp) { + + } ); - }catch(e){ - } - } - //打开拍照 - Func.opencamera = function(){ - bridge.callHandler('opencamera',"",function(resp){ - - } - ); - } - //获得粘贴板内容 - Func.gamepastetext = function(){// - var returnValue = ""; - try{ - //return window.settings.gamepastetext(); - bridge.callHandler('gamepastetext',"",gamepastetext_callback); - }catch(e){ - + //获得粘贴板内容 + Func.gamepastetext = function () {// + var returnValue = ""; + try { + //return window.settings.gamepastetext(); + bridge.callHandler('gamepastetext', "", gamepastetext_callback); + } catch (e) { + + } + return returnValue; } - return returnValue; - } - //获得市场id - Func.getmarketname = function(){// - //var returnValue = 1; - //try{ + //获得市场id + Func.getmarketname = function () {// + //var returnValue = 1; + //try{ //return window.settings.getmarketname(); //bridge.callHandler('getmarketname',"",getmarketname_callback //); - //}catch(e){ - - //} - //return returnValue; - //logmessage("market:"+app_market,1); - return app_market; - } - Func.getInstallInfo = function(data){// - if(!ConstVal.isGameHall){ - var returnValue = ifast_random(2); - try{ - //var result = window.settings.getGameinstall(data); - //return Number(result); - bridge.callHandler('getGameinstall',data,function(resp){ + //}catch(e){ + + //} + //return returnValue; + //logmessage("market:"+app_market,1); + return app_market; + } + Func.getInstallInfo = function (data) {// + if (!ConstVal.isGameHall) { + var returnValue = ifast_random(2); + try { + //var result = window.settings.getGameinstall(data); + //return Number(result); + bridge.callHandler('getGameinstall', data, function (resp) { returnValue = Number(resp); } + ); + } catch (e) { + //return ifast_random(2); + + } + return returnValue; + } else { + return gameHallImport.isInstalled(data); + } + } + /* + {"body":"哈哈哈","price":1,"user":"sdsax11221","type":"ylniuniu001","typeplay":"1"} + ?user 用户id??? + type:yl+gamename+00N???列子:ylniuniu001?ylniuniu002 + ? + tpyealpay 支付类型 1 微信 2 支付宝 + body商品详情 + price 价格 + */ + Func.getGamepay = function (data) {// + try { + //window.settings.getGameplay(data); + bridge.callHandler('getGameplay', "", function (resp) { + + } ); - }catch(e){ - //return ifast_random(2); - + } catch (e) { + //var dt = JSON.parse(data); + //PayuserPaytypePaystate(dt.playerid,dt.type,1,data.paytype,data) } - return returnValue; - }else{ - return gameHallImport.isInstalled(data); } - } - /* - {"body":"哈哈哈","price":1,"user":"sdsax11221","type":"ylniuniu001","typeplay":"1"} - ?user 用户id??? - type:yl+gamename+00N???列子:ylniuniu001?ylniuniu002 - ? - tpyealpay 支付类型 1 微信 2 支付宝 - body商品详情 - price 价格 - */ - Func.getGamepay = function(data){// - try{ - //window.settings.getGameplay(data); - bridge.callHandler('getGameplay',"",function(resp){ - - } - ); - }catch(e){ - //var dt = JSON.parse(data); - //PayuserPaytypePaystate(dt.playerid,dt.type,1,data.paytype,data) - } - } - Func.getphonestate = function(){ - bridge.callHandler('getphonestate',"",function(resp){ - //主动调用返回通话状态 - - } - ); + Func.getphonestate = function () { + bridge.callHandler('getphonestate', "", function (resp) { + //主动调用返回通话状态 - } - Func.ypayType = function(type){ - - bridge.callHandler('ypayType',type,function(resp){ - //主动调用返回通话状态 - - } - ); - - } - - // - Func.SwitchOverGameData = function(webtype,Gamedirectory,gamedownloadurl,data){ - try{ - //window.settings.SwitchOverGameData(webtype,Gamedirectory,gamedownloadurl,data); - var data={ - webtype:webtype, - Gamedirectory:Gamedirectory, - gamedownloadurl:gamedownloadurl, - data:data - }; - if(ConstVal.isGameHall){ - GameData.hallLogin = false; - if(!gamedownloadurl || !Gamedirectory){ - gameHallImport.clearGameinfo(); - return; - } - } - bridge.callHandler('SwitchOverGameData',data,function(resp){ + ); + + } + Func.ypayType = function (type) { + + bridge.callHandler('ypayType', type, function (resp) { + //主动调用返回通话状态 + + } + ); + + } + + // + Func.SwitchOverGameData = function (webtype, Gamedirectory, gamedownloadurl, data) { + try { + //window.settings.SwitchOverGameData(webtype,Gamedirectory,gamedownloadurl,data); + var data = { + webtype: webtype, + Gamedirectory: Gamedirectory, + gamedownloadurl: gamedownloadurl, + data: data + }; + if (ConstVal.isGameHall) { + GameData.hallLogin = false; + if (!gamedownloadurl || !Gamedirectory) { + gameHallImport.clearGameinfo(); + return; + } } - ); - }catch(e){ - //console.log("webtype:"+webtype+"Gamedirectory:"+Gamedirectory+"gamedownloadurl:"+gamedownloadurl+"data:"+data); + bridge.callHandler('SwitchOverGameData', data, function (resp) { + + } + ); + } catch (e) { + //console.log("webtype:"+webtype+"Gamedirectory:"+Gamedirectory+"gamedownloadurl:"+gamedownloadurl+"data:"+data); + } } - } - Func.backgameData = function(data){// - try{ - //var data= {}; - //if(C_Player.roomcard>-1){ + Func.backgameData = function (data) {// + try { + //var data= {}; + //if(C_Player.roomcard>-1){ //data.data = C_Player.returnHallData(); //data.opt = "updatePlayerInfo"; //data.from = 2; //data.gamename = app_gamename; //data.gameid = GameData.GameId; //Func.backgameData(JSON.stringify(data)); - //}else{ + //}else{ //data.opt = "saveGameId"; //data.from = 2; //data.gamename = app_gamename; //data.gameid = GameData.GameId; //Func.backgameData(JSON.stringify(data)); - //} - bridge.callHandler('backgameData',data,function(resp){ - - } - ); - }catch(e){ - - } - } - //开启定位 - Func.startlocation = function(type){ - try{ - //window.settings.startlocation(type); - bridge.callHandler('startlocation',type,function(resp){ + //} + bridge.callHandler('backgameData', data, function (resp) { } - ); - }catch(e){ - - } - } - //获取定位 - Func.getlocation = function(){ - try{ - if(GameData.otherLocation){ - GameData.otherLocationTimes++; - if(GameData.otherLocationTimes > GameData.otherLocationAllTimes){ - return; - } + ); + } catch (e) { + } - //window.settings.getlocationinfo(); - bridge.callHandler('getlocationinfo',"",function(resp){ + } + //开启定位 + Func.startlocation = function (type) { + try { + //window.settings.startlocation(type); + bridge.callHandler('startlocation', type, function (resp) { } - ); - }catch(e){ - + ); + } catch (e) { + + } } - } - Func.getchannelName = function(){// - - return app_channel; - } - - //播放声音 - Func.play_wav = function(src,isloop){ - if(src){ - if(GameData.appstate ||(!GameData.appstate&&isloop==-1)){ - try{ - if(!GameData.isRecord){ - //window.settings.srcIsloop(src,isloop); - var data = { - src:src, - isloop:isloop - }; - bridge.callHandler('srcIsloop',data,function(resp){ - + //获取定位 + Func.getlocation = function () { + try { + if (GameData.otherLocation) { + GameData.otherLocationTimes++; + if (GameData.otherLocationTimes > GameData.otherLocationAllTimes) { + return; + } + } + //window.settings.getlocationinfo(); + bridge.callHandler('getlocationinfo', "", function (resp) { + + } + ); + } catch (e) { + + } + } + Func.getchannelName = function () {// + + return app_channel; + } + + //播放声音 + Func.play_wav = function (src, isloop) { + if (src) { + if (GameData.appstate || (!GameData.appstate && isloop == -1)) { + try { + if (!GameData.isRecord) { + //window.settings.srcIsloop(src,isloop); + var data = { + src: src, + isloop: isloop + }; + bridge.callHandler('srcIsloop', data, function (resp) { + } + ); + } + + } catch (e) { + if (!GameData.isRecord) { + play_wav(src, isloop); + } + } + } + } + + } + + //开启扫一扫 + Func.OpenScan = function () { + try { + //window.settings.opensaoma(); + bridge.callHandler('opensaoma', "", function (resp) { + + } + ); + } catch (e) { + + } + } + Func.getVersionState = function () { + + return Number(app_appversion); + } + + Func.startshake = function () { + if (Utl.ReadData(Utl.Config.shake) == 1) { + if (GameData.shakeID != Game_Config.shakeList.nil) { + try { + //window.settings.startshake(); + bridge.callHandler('startshake', '', function (resp) { + + } ); - } - - }catch(e){ - if(!GameData.isRecord){ - play_wav(src,isloop); + } catch (e) { + } } } } - - } - - //开启扫一扫 - Func.OpenScan = function(){ - try{ - //window.settings.opensaoma(); - bridge.callHandler('opensaoma',"",function(resp){ + Func.stopshake = function () { + try { + //window.settings.stopshake(); + bridge.callHandler('stopshake', '', function (resp) { } - ); - }catch(e){ - + ); + } catch (e) { + + } } - } - Func.getVersionState = function(){ - - return Number(app_appversion); - } - - Func.startshake = function(){ - if(Utl.ReadData(Utl.Config.shake)==1){ - if(GameData.shakeID != Game_Config.shakeList.nil){ - try{ - //window.settings.startshake(); - bridge.callHandler('startshake','',function(resp){ - - } - ); - }catch(e){ - + Func.switchshakeVoice = function (Voicetype) { + try { + //window.settings.SwitchShake(Voicetype); + bridge.callHandler('SwitchShake', Voicetype, function (resp) { + } + ); + } catch (e) { + } } - } - Func.stopshake = function(){ - try{ - //window.settings.stopshake(); - bridge.callHandler('stopshake','',function(resp){ - } - ); - }catch(e){ - - } - } - Func.switchshakeVoice = function(Voicetype){ - try{ - //window.settings.SwitchShake(Voicetype); - bridge.callHandler('SwitchShake',Voicetype,function(resp){ + //分享图片(链接) + Func.sharephotourl = function (sharetype, url) { + try { + //window.settings.sharephotourl(sharetype,url); + var data = { + sharetype: sharetype, + url: url + }; + bridge.callHandler('sharephotourl', data, function (resp) { - } - ); - }catch(e){ - - } - } - - //分享图片(链接) - Func.sharephotourl=function(sharetype,url){ - try{ - //window.settings.sharephotourl(sharetype,url); - var data={ - sharetype:sharetype, - url:url - }; - bridge.callHandler('sharephotourl',data,function(resp){ - - } - ); - }catch(e){ - //alert(e); - } - } - //获取网络类型 1 未连接网络 2 连接wifi 3 连接2G/3G/4G - Func.getnetwork=function(){ - - return app_getnetwork; - - } - //获取wifi信号ssidname wifi名称 signalLevel wifi信号强度 0-4 弱到强 - Func.getwifisignalLevel=function(){ - return Number(app_getwifisignalLevel); - } - //调用手机默认浏览器打开链接 - Func.browser=function(url){ - try{ - if(url){ - url = fixUrl(url); - //window.settings.browser(url); - bridge.callHandler('browser',url,function(resp){ - - } - ); + } + ); + } catch (e) { + //alert(e); } - }catch(e){ - console.log(url); } - - } - //主动获取手机电量 - Func.getbattery=function(){ - - return app_getbattery; - } - Func.mediaTypeAudio=function(audiourl,type,user){ - //因为游戏打包之前调用会报错,所以要使用try{}catch{} try 里面 使用打包调用的函数 catch() 里面使用你自己的函数 - try{ - //window.settings.mediaTypeAudio(audiourl,type,v); - var data = { - audiourl:audiourl, - type:type, - user:user - }; - bridge.callHandler('mediaTypeAudio',data,function(resp){ - - } - ); - }catch(e){ - - // gameui_play_voice(v); - //Net.submit_error("mediaAudio:audiourl="+audiourl+",type="+type+",user="+v,e.stack); - } - } - - Func.prepareAudio=function(){ - //因为游戏打包之前调用会报错,所以要使用try{}catch{} try 里面 使用打包调用的函数 catch() 里面使用你自己的函数 - try{ - Utl.stopMusic(); - GameData.isRecord = true; - //window.settings.prepareaudio(); - bridge.callHandler('prepareaudio',"",function(resp){ + //获取网络类型 1 未连接网络 2 连接wifi 3 连接2G/3G/4G + Func.getnetwork = function () { - } - ); - }catch(e){ - //alert(e); - - } - } - //设置普通震动 - Func.vibrator=function(time){ - try{ - if(GameData.appstate){ - //window.settings.vibrator(time); - bridge.callHandler('vibrator',time,function(resp){ + return app_getnetwork; - } - ); + } + //获取wifi信号ssidname wifi名称 signalLevel wifi信号强度 0-4 弱到强 + Func.getwifisignalLevel = function () { + return Number(app_getwifisignalLevel); + } + //调用手机默认浏览器打开链接 + Func.browser = function (url) { + try { + if (url) { + url = fixUrl(url); + //window.settings.browser(url); + bridge.callHandler('browser', url, function (resp) { + + } + ); + } + } catch (e) { + console.log(url); } - }catch(e){ - - } - } - //是否重复震动 - Func.repeatvibrator=function(repeat){ - try{ - if(GameData.appstate){ - //window.settings.repeatvibrator(repeat); - bridge.callHandler('repeatvibrator',repeat,function(resp){ - } - ); + } + //主动获取手机电量 + Func.getbattery = function () { + + return app_getbattery; + } + Func.mediaTypeAudio = function (audiourl, type, user) { + //因为游戏打包之前调用会报错,所以要使用try{}catch{} try 里面 使用打包调用的函数 catch() 里面使用你自己的函数 + try { + //window.settings.mediaTypeAudio(audiourl,type,v); + var data = { + audiourl: audiourl, + type: type, + user: user + }; + bridge.callHandler('mediaTypeAudio', data, function (resp) { + + } + ); + } catch (e) { + + // gameui_play_voice(v); + //Net.submit_error("mediaAudio:audiourl="+audiourl+",type="+type+",user="+v,e.stack); } - }catch(e){ - } - } - //取消震动 - Func.canclevibrator=function(){ - try{ - //window.settings.canclevibrator(); - bridge.callHandler('canclevibrator',"",function(resp){ - } - ); - }catch(e){ - + Func.prepareAudio = function () { + //因为游戏打包之前调用会报错,所以要使用try{}catch{} try 里面 使用打包调用的函数 catch() 里面使用你自己的函数 + try { + Utl.stopMusic(); + GameData.isRecord = true; + //window.settings.prepareaudio(); + bridge.callHandler('prepareaudio', "", function (resp) { + + } + ); + } catch (e) { + //alert(e); + + } } - } - //横竖屏 orientation 1 为横屏 2 为竖屏 - Func.orientation=function(Orientation){ - try{ - //window.settings.orientation(Orientation); - bridge.callHandler('orientation',Orientation,function(resp){ + //设置普通震动 + Func.vibrator = function (time) { + try { + if (GameData.appstate) { + //window.settings.vibrator(time); + bridge.callHandler('vibrator', time, function (resp) { - } - ); - }catch(e){ - + } + ); + } + } catch (e) { + + } } - } - //通知 - Func.notification=function(Ticker,title,content){ - //因为游戏打包之前调用会报错,所以要使用try{}catch{} try 里面 使用打包调用的函数 - //var Ticker//手机状态栏通知 - //var title//标题 - //var content//内容 - try{ - //window.settings.notification(Ticker,title,content); - var data={ - Ticker:Ticker, - title:title, - content:content - }; - bridge.callHandler('notification',data,function(resp){ + //是否重复震动 + Func.repeatvibrator = function (repeat) { + try { + if (GameData.appstate) { + //window.settings.repeatvibrator(repeat); + bridge.callHandler('repeatvibrator', repeat, function (resp) { - } - ); - }catch(e){ - + } + ); + } + } catch (e) { + + } } - } - - + //取消震动 + Func.canclevibrator = function () { + try { + //window.settings.canclevibrator(); + bridge.callHandler('canclevibrator', "", function (resp) { - Func.sharefriend=function(data){//1普通分享2截图分享3图片链接分享 - //因为游戏打包之前调用会报错,所以要使用try{}catch{} try 里面 使用打包调用的函数 catch() 里面使用你自己的函数 + } + ); + } catch (e) { + + } + } + //横竖屏 orientation 1 为横屏 2 为竖屏 + Func.orientation = function (Orientation) { + try { + //window.settings.orientation(Orientation); + bridge.callHandler('orientation', Orientation, function (resp) { + + } + ); + } catch (e) { + + } + } + //通知 + Func.notification = function (Ticker, title, content) { + //因为游戏打包之前调用会报错,所以要使用try{}catch{} try 里面 使用打包调用的函数 + //var Ticker//手机状态栏通知 + //var title//标题 + //var content//内容 + try { + //window.settings.notification(Ticker,title,content); + var data = { + Ticker: Ticker, + title: title, + content: content + }; + bridge.callHandler('notification', data, function (resp) { + + } + ); + } catch (e) { + + } + } + + + + Func.sharefriend = function (data) {//1普通分享2截图分享3图片链接分享 + //因为游戏打包之前调用会报错,所以要使用try{}catch{} try 里面 使用打包调用的函数 catch() 里面使用你自己的函数 var sharefriend = data.sharefriend; var type = data.type; var webpageUrl = data.webpageUrl; var title = data.title; var description = data.description; var sharetype = data.sharetype; - if(!sharetype){ + if (!sharetype) { sharetype = 0; } - if(!webpageUrl){webpageUrl = Game_Config.Share.appdownload;} - if(GameData.gameData){ - webpageUrl = webpageUrl + "&gameData="+GameData.gameData; + if (!webpageUrl) { webpageUrl = Game_Config.Share.appdownload; } + if (GameData.gameData) { + webpageUrl = webpageUrl + "&gameData=" + GameData.gameData; webpageUrl = fixUrl(webpageUrl); } - if(!title){title = Game_Config.Share.title+Game_Config.Share.description;} + if (!title) { title = Game_Config.Share.title + Game_Config.Share.description; } //if(!description){description = } type == 2 ? GameData.shareFrom = 1 : GameData.shareFrom = 0; - - try{ + + try { //window.settings.friendsSharetypeUrlToptitleDescript(sharefriend,type,webpageUrl,title,description); - var data={ - sharefriend:sharefriend, - type:type, - webpageUrl:webpageUrl, - title:title, - description:description, - sharetype:sharetype + var data = { + sharefriend: sharefriend, + type: type, + webpageUrl: webpageUrl, + title: title, + description: description, + sharetype: sharetype }; - bridge.callHandler('friendsSharetypeUrlToptitleDescript',data,function(resp){ + bridge.callHandler('friendsSharetypeUrlToptitleDescript', data, function (resp) { }); - }catch(e){ + } catch (e) { //console.log("分享:sharefrind:"+sharefriend+"\ntype:"+type+"\nwebpageUrl:"+webpageUrl+"\ntitle:"+title+"\ndescription:"+description); } - - + + } -}); + }); } -var shareLink=function shareLink(shareTimeline,shareAppMessage) { -var fenxiang = shareParam; - var sid1= getQueryString('sid'); - var scode1= getQueryString('scode'); +var shareLink = function shareLink(shareTimeline, shareAppMessage) { + var fenxiang = shareParam; + var sid1 = getQueryString('sid'); + var scode1 = getQueryString('scode'); - var sidScode ={sid: sid1, scode: scode1}; - if(!sidScode) { - - return; - } + var sidScode = { sid: sid1, scode: scode1 }; + if (!sidScode) { - $.ajax({ - type: "post", - url: "https://api.tscce.cn/api/weixin/wx_share_info", - dataType: 'json', - data: $.extend({}, sidScode, fenxiang), - timeout: 1000 * 8, - success: function (data, textStatus) { - //console.log('success', data); - if (data.error == 0) { - var js = - { - debug: false, - appId: data.data.appId, // ???????? - timestamp: data.data.timestamp, // ???????? - nonceStr: data.data.nonceStr, // ???????? - signature: data.data.signature,// ?? - jsApiList: [ - 'onMenuShareTimeline', - 'onMenuShareAppMessage' - ] - } - wx.config(js); - wx.ready(function(){ - - - wx.onMenuShareTimeline({ // - title: shareTimeline.title, - link: shareTimeline.link, // - imgUrl: shareTimeline.imgUrl, // - success: function () { // - sharesuccess(2,2); - GameUI.closeShareImg(); - //dialog.alert('分享朋友圈成功'); - }, - cancel: function () { // - GameUI.closeShareImg(); - } - }); - - wx.onMenuShareAppMessage({ //????? - title: shareAppMessage.title, // - desc: shareAppMessage.desc, // - link: shareAppMessage.link, // - imgUrl: shareAppMessage.imgUrl, // - type: 'link', - success: function () { // - sharesuccess(2,1); - GameUI.closeShareImg(); - //dialog.alert('分享好友成功'); - }, - cancel: function () { // - GameUI.closeShareImg(); - } - }); - }); - wx.error(function(res){ - - }); - return; - } else { - //alert(data.error_code + ': ' + data.msg); - sessionStorage.clear(); - var code = parseInt(data.error_code); - if(data.error_code === 10001 || data.error_code === 10008 || data.error_code === 10011) { - //getSidScode(wxLogin); - } - } - }, - complete: function (res) { - //console.log('complete',res); - }, - error: function (XMLHttpRequest, textStatus, errorThrown) { - //console.log('error', XMLHttpRequest, textStatus, errorThrown); - //alert("错误"); - } - }); -} -Func.appDownload = function(url) { - if(url){ - top.location=url; + return; } - + + $.ajax({ + type: "post", + url: "https://api.tscce.cn/api/weixin/wx_share_info", + dataType: 'json', + data: $.extend({}, sidScode, fenxiang), + timeout: 1000 * 8, + success: function (data, textStatus) { + //console.log('success', data); + if (data.error == 0) { + var js = + { + debug: false, + appId: data.data.appId, // ???????? + timestamp: data.data.timestamp, // ???????? + nonceStr: data.data.nonceStr, // ???????? + signature: data.data.signature,// ?? + jsApiList: [ + 'onMenuShareTimeline', + 'onMenuShareAppMessage' + ] + } + wx.config(js); + wx.ready(function () { + + + wx.onMenuShareTimeline({ // + title: shareTimeline.title, + link: shareTimeline.link, // + imgUrl: shareTimeline.imgUrl, // + success: function () { // + sharesuccess(2, 2); + GameUI.closeShareImg(); + //dialog.alert('分享朋友圈成功'); + }, + cancel: function () { // + GameUI.closeShareImg(); + } + }); + + wx.onMenuShareAppMessage({ //????? + title: shareAppMessage.title, // + desc: shareAppMessage.desc, // + link: shareAppMessage.link, // + imgUrl: shareAppMessage.imgUrl, // + type: 'link', + success: function () { // + sharesuccess(2, 1); + GameUI.closeShareImg(); + //dialog.alert('分享好友成功'); + }, + cancel: function () { // + GameUI.closeShareImg(); + } + }); + }); + wx.error(function (res) { + + }); + return; + } else { + //alert(data.error_code + ': ' + data.msg); + sessionStorage.clear(); + var code = parseInt(data.error_code); + if (data.error_code === 10001 || data.error_code === 10008 || data.error_code === 10011) { + //getSidScode(wxLogin); + } + } + }, + complete: function (res) { + //console.log('complete',res); + }, + error: function (XMLHttpRequest, textStatus, errorThrown) { + //console.log('error', XMLHttpRequest, textStatus, errorThrown); + //alert("错误"); + } + }); +} +Func.appDownload = function (url) { + if (url) { + top.location = url; + } + } diff --git a/projects/Game_Surface_3/js/00_Surface/06_Player.js b/projects/Game_Surface_3/js/00_Surface/06_Player.js index df12185..d046528 100644 --- a/projects/Game_Surface_3/js/00_Surface/06_Player.js +++ b/projects/Game_Surface_3/js/00_Surface/06_Player.js @@ -17,6 +17,12 @@ function Player(seat){ //this.offline = 0;//玩家是否离线0->否 1->离线 this.canexit=1;//是否可以直接离开 this.onstate=0;//0:在线1:离线2:通话中 + /* + {"address":"江西省南昌市青云谱区施尧路靠近上海浦东发展银行(长天支行)","city":"南昌市", + "cityCode":"0791","country":"中国","district":"青云谱区","latitude":28.623546,"longitude":115.900333, + "province":"江西省","street":"施尧路"} + */ + //定位信息 牌桌外 this.addr = null; this.invitecode = "";//邀请码 this.isStart = false;//能否点击按钮开始游戏 @@ -31,6 +37,14 @@ function Player(seat){ this.charm = undefined; this.sign = "";//签名 this.tel = "";//绑定手机号 + /* + {"address":"江西省南昌市青云谱区施尧路靠近上海浦东发展银行(长天支行)","city":"南昌市", + "cityCode":"0791","country":"中国","district":"青云谱区","latitude":28.623546,"longitude":115.900333, + "province":"江西省","street":"施尧路"} + */ + //定位信息 牌桌内 + this.location = null; + } //玩家信息初始化 if(typeof(Player.prototype.Init) == "undefined"){ @@ -67,6 +81,7 @@ if(typeof(Player.prototype.Init) == "undefined"){ this.charm = undefined; this.sign = "";//签名 this.tel = "";//绑定手机号 + }; } //玩家微信信息初始化 @@ -107,6 +122,7 @@ if(typeof(Player.prototype.SetMyInfo) == "undefined"){ this.charm = object.charm; this.sign = object.sign; this.tel = object.tel; + //this.setTel(); //this.bankpwd = object.bank;//是否设置仓库密码 this.bankpwd = 0;//是否设置仓库密码 //this.paycode = _paycode; @@ -121,7 +137,7 @@ if(typeof(Player.prototype.SetLocationInfo) == "undefined"){ }else{ set_self(200, 7, "获取定位失败!", 0, 0); } - + this.location = _locationinfo; }; } @@ -279,6 +295,7 @@ if(typeof(Player.prototype.SetDeskInfo) == "undefined"){ }else{ this.paycode = ""; } + this.location = _data.location; this.charm = _data.charm; this.sign = _data.sign; }; diff --git a/projects/Game_Surface_3/js/00_Surface/07_Desk.js b/projects/Game_Surface_3/js/00_Surface/07_Desk.js index 670ce82..42350a0 100644 --- a/projects/Game_Surface_3/js/00_Surface/07_Desk.js +++ b/projects/Game_Surface_3/js/00_Surface/07_Desk.js @@ -421,6 +421,8 @@ Desk.login=function(_msg){//登录 Func.createRoom(); } Game_Modify.Reconnect(_msg.data.deskinfo); + }else{ + Game_Modify.ReconnectNoMakewar(); } //} }else{ @@ -911,7 +913,7 @@ Desk.send_text=function(_msg){//发送消息 if(!_msg.data.type){ var pobj = Desk.GetPlayerBySeat(_msg.data.seat); GameUI.playTextVoice(_msg.data.text,pobj.sex); - GameUI.ShowChat(Logic.ChangeToStatus(C_Player.seat,_msg.data.seat),_msg.data.text); + GameUI.ShowChat(_msg.data.seat,_msg.data.text); GameUI.addCommunion(Logic.ChangeToStatus(C_Player.seat,_msg.data.seat),1,_msg.data.text,0,null,pobj.sex); }else if(_msg.data.type == 1){//全服公告 GameUI.CloseChat(); @@ -929,7 +931,7 @@ Desk.send_text=function(_msg){//发送消息 var idx = Number(_msg.data.text); _msg.data.text = Game_Config.Info.TextContent[(idx - 1)%Game_Config.Info.TextContent.length]; GameUI.playTextVoice(_msg.data.text); - GameUI.ShowChat(Logic.ChangeToStatus(C_Player.seat,_msg.data.seat),_msg.data.text); + GameUI.ShowChat(_msg.data.seat,_msg.data.text); GameUI.addCommunion(Logic.ChangeToStatus(C_Player.seat,_msg.data.seat),1,_msg.data.text,0); } } diff --git a/projects/Game_Surface_3/js/00_Surface/08_Utl_Output.js b/projects/Game_Surface_3/js/00_Surface/08_Utl_Output.js index fa0b494..932ce65 100644 --- a/projects/Game_Surface_3/js/00_Surface/08_Utl_Output.js +++ b/projects/Game_Surface_3/js/00_Surface/08_Utl_Output.js @@ -11,6 +11,7 @@ Utl.Config.sound = ""; Utl.Config.pre_wxinfo = "tsgame_wxinfo_"; Utl.Config.wxinfo = "tsgame_wxinfo"; +Utl.Config.visitorinfo = "tsgame_visitorinfo"; Utl.Config.maxtime = 48;//小时 Utl.Config.pre_validtime = "tsgame_validtime_";//有效时间(时间戳) Utl.Config.validtime = "tsgame_validtime";//有效时间(时间戳) @@ -545,43 +546,49 @@ Utl.openVideo = function (_playerList, _seat, _roomcode, roomtype) { set_self(152, 37, 0, 0, 0); set_self(153, 37, 0, 0, 0); set_self(107, 37, 0, 0, 0); - for (var i = 0; i < Desk.PlayerList.length; i++) { - if (Desk.PlayerList[i].nickname != "") { - var ind = Logic.ChangeToStatus(C_Player.seat, i); - var text = Func.subString(Desk.PlayerList[i].nickname, Game_Config.Info.Mainnickname, true); - set_self(406 + ind, 7, text, 0, 0); - if (ind == 0) { - if (Game_Config.Info.myPositionDefault) { - set_self(406 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0); + // if (Game_Modify.updatePlayerInfoUI) { + // for (var i = 0; i < Desk.PlayerList.length; i++) { + // Game_Modify.updatePlayerInfoUI(i); + // } + // } else { + for (var i = 0; i < Desk.PlayerList.length; i++) { + if (Desk.PlayerList[i].nickname != "") { + var ind = Logic.ChangeToStatus(C_Player.seat, i); + var text = Func.subString(Desk.PlayerList[i].nickname, Game_Config.Info.Mainnickname, true); + set_self(406 + ind, 7, text, 0, 0); + if (ind == 0) { + if (Game_Config.Info.myPositionDefault) { + set_self(406 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0); + } else { + set_self(406 + ind, 18, Game_Config.Info.myPosition - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0); + } } else { - set_self(406 + ind, 18, Game_Config.Info.myPosition - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0); + if (Game_Config.Info.otherPositionDefault) { + set_self(406 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0); + } else { + set_self(406 + ind, 18, Game_Config.Info.position[ind - 1] - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0); + } } - } else { - if (Game_Config.Info.otherPositionDefault) { - set_self(406 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0); - } else { - set_self(406 + ind, 18, Game_Config.Info.position[ind - 1] - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0); - } - } - set_self(436 + ind, 7, 0, 0, 0); - if (ind == 0) { - if (Game_Config.Info.myPositionDefault) { - set_self(436 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - Game_Config.Info.textwidth_2 / 2, 0, 0); + set_self(436 + ind, 7, 0, 0, 0); + if (ind == 0) { + if (Game_Config.Info.myPositionDefault) { + set_self(436 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - Game_Config.Info.textwidth_2 / 2, 0, 0); + } else { + set_self(436 + ind, 18, Game_Config.Info.myPosition - Game_Config.Info.textwidth_2 / 2, 0, 0); + } } else { - set_self(436 + ind, 18, Game_Config.Info.myPosition - Game_Config.Info.textwidth_2 / 2, 0, 0); - } - } else { - if (Game_Config.Info.otherPositionDefault) { - set_self(436 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - Game_Config.Info.textwidth_2 / 2, 0, 0); - } else { - set_self(436 + ind, 18, Game_Config.Info.position[ind - 1] - Game_Config.Info.textwidth_2 / 2, 0, 0); + if (Game_Config.Info.otherPositionDefault) { + set_self(436 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - Game_Config.Info.textwidth_2 / 2, 0, 0); + } else { + set_self(436 + ind, 18, Game_Config.Info.position[ind - 1] - Game_Config.Info.textwidth_2 / 2, 0, 0); + } } + Func.up_imgurl(116 + ind, Desk.PlayerList[i].avatar); + set_group(43 + ind, 37, 1, 0, 0); } - Func.up_imgurl(116 + ind, Desk.PlayerList[i].avatar); - set_group(43 + ind, 37, 1, 0, 0); } - } + // } play_ani123(1, 156, 35, 255, 100, 1000, 0, 0, 1); Utl.playMusic(); set_self(3141, 37, 0, 0, 0); diff --git a/projects/Game_Surface_3/js/00_Surface/09_Net.js b/projects/Game_Surface_3/js/00_Surface/09_Net.js index a8f668e..1918757 100644 --- a/projects/Game_Surface_3/js/00_Surface/09_Net.js +++ b/projects/Game_Surface_3/js/00_Surface/09_Net.js @@ -364,8 +364,7 @@ Net.Send_get_player_grade1 = function(_data){ Net.get_player_grade1 = function(_msg){ gameCombat.get_player_grade1(_msg); GameUI.EndLoad(); - //Logic.SetCombatInfo(_msg.data); - //GameUI.OpenCombat(); + } //发送获取战绩2 diff --git a/projects/Game_Surface_3/js/00_Surface/11_GameUI.js b/projects/Game_Surface_3/js/00_Surface/11_GameUI.js index cab2169..82f72cf 100644 --- a/projects/Game_Surface_3/js/00_Surface/11_GameUI.js +++ b/projects/Game_Surface_3/js/00_Surface/11_GameUI.js @@ -25,11 +25,11 @@ GameUI.Mem.snrOption = { videoConfig: null, tea: 0, rebateType: 0, - sysRebate:0, - rebateLimit:0, - forbidSelect:0 + sysRebate: 0, + rebateLimit: 0, + forbidSelect: 0 }; -GameUI.utlani_doend = function(id, sx, count, allend) { +GameUI.utlani_doend = function (id, sx, count, allend) { //logmessage(id+"/"+sx+"/"+count+"/"+allend); if (id >= 274 && id <= 278 && sx == 43 && allend == 1) { set_self(id, 37, 0, 0, 0); @@ -66,10 +66,10 @@ GameUI.utlani_doend = function(id, sx, count, allend) { }; -GameUI.utlgamebegindraw = function(gameid, spid, times, timelong) { +GameUI.utlgamebegindraw = function (gameid, spid, times, timelong) { }; -GameUI.onloadurl = function(recid, rectype, url, error, count, len) { +GameUI.onloadurl = function (recid, rectype, url, error, count, len) { GameData.LoadCount = count; if (rectype == 0) { ifast_loadsprite([1, 254, 3104, 3103]); @@ -115,7 +115,7 @@ GameUI.onloadurl = function(recid, rectype, url, error, count, len) { } } -GameUI.utlmousedown = function(gameid, spid, downx, downy, no1, no2, no3, no4, no5, no6) { +GameUI.utlmousedown = function (gameid, spid, downx, downy, no1, no2, no3, no4, no5, no6) { //点击代码 for (var i = 0; i < ClickBtn.length; i++) { if (spid == ClickBtn[i]) { @@ -132,60 +132,60 @@ GameUI.utlmousedown = function(gameid, spid, downx, downy, no1, no2, no3, no4, n //getaudiourl("aaaaa",2); } switch (spid) { - case 52: + case 52: - break; - case ConstVal.Emotion.f_spid: - GameData.slidEmotion = false; - break; - case ConstVal.Com_History.f_spid: - GameData.slideHistory = false; - break; - case ConstVal.Task.f_spid: - GameData.slideTask = false; - break; - case ConstVal.worldRoom.f_sp_1: - GameData.worldRoomSysSlide = false; - break; - case ConstVal.worldRoom.f_sp_2: - GameData.worldRoomPlySlide = false; - break; - case ConstVal.snrRoomList.f_spid: - GameData.snrRoomListSlide = false; - break; - case ConstVal.rankList.f_spid: - GameData.rankListSlide = false; - break; - case 3102: - case 3105: - case 3106: - GameData.imgAdIsSlide = false; - break; - case ConstVal.vipRoomList1.f_spid: - GameData.vipRoomPageOne.slide = false; - break; - case ConstVal.vipRoomList2.f_spid: - GameData.vipRoomPageTwo.slide = false; - case ConstVal.blackList.f_spid: - GameData.blackList.slide = false; - break; - case ConstVal.vipRank.f_spid: - GameData.vipRank.slide = false; - break; - case ConstVal.whiteList.f_spid: - GameData.whiteList.slide = false; - break; + break; + case ConstVal.Emotion.f_spid: + GameData.slidEmotion = false; + break; + case ConstVal.Com_History.f_spid: + GameData.slideHistory = false; + break; + case ConstVal.Task.f_spid: + GameData.slideTask = false; + break; + case ConstVal.worldRoom.f_sp_1: + GameData.worldRoomSysSlide = false; + break; + case ConstVal.worldRoom.f_sp_2: + GameData.worldRoomPlySlide = false; + break; + case ConstVal.snrRoomList.f_spid: + GameData.snrRoomListSlide = false; + break; + case ConstVal.rankList.f_spid: + GameData.rankListSlide = false; + break; + case 3102: + case 3105: + case 3106: + GameData.imgAdIsSlide = false; + break; + case ConstVal.vipRoomList1.f_spid: + GameData.vipRoomPageOne.slide = false; + break; + case ConstVal.vipRoomList2.f_spid: + GameData.vipRoomPageTwo.slide = false; + case ConstVal.blackList.f_spid: + GameData.blackList.slide = false; + break; + case ConstVal.vipRank.f_spid: + GameData.vipRank.slide = false; + break; + case ConstVal.whiteList.f_spid: + GameData.whiteList.slide = false; + break; } }; -GameUI.utlmousedown_nomove = function(gameid, spid, downx, downy, timelong, no1, no2, no3, no4, no5) { +GameUI.utlmousedown_nomove = function (gameid, spid, downx, downy, timelong, no1, no2, no3, no4, no5) { //点击代没移动代码 }; -GameUI.utlmouseup = function(gameid, spid_down, downx, downy, spid_up, upx, upy, timelong, no1, no2) { +GameUI.utlmouseup = function (gameid, spid_down, downx, downy, spid_up, upx, upy, timelong, no1, no2) { //点击弹起代码 //可以通过spid_down和spid_up 的比较 来判断是 点击还是 移动 for (var i = 0; i < ClickBtn.length; i++) { @@ -576,473 +576,438 @@ GameUI.utlmouseup = function(gameid, spid_down, downx, downy, spid_up, upx, upy, GameUI.seniorOptionsSlideEnd(gameid, spid_down, downx, downy, spid_up, upx, upy, timelong, no1, no2); } if (spid_down == spid_up) { - if(GameData.sysConfig.behaviorList){ - for(var k=0;k= ConstVal.Task.get_reward_btn_tag && up_id < ConstVal.Task.isreward_tag) { - //console.log(TaskInfo[up_id - ConstVal.Task.get_reward_btn_tag]); + if (GameData.LaunchMode == ConstVal.Launch_mode.from_hall) { + + backgameData(); + + } else { + Func.browser(Game_Config.Share.appdownload); + } + break; + + case 548: + GameUI.CloseFeedback(); + break; + case 550: + var text = GameUI.getFeedbackText(); + var bTemp = Func.strisNull(text); + if (!bTemp) { + GameUI.CloseFeedback(); var data = {}; data.agentid = GameData.AgentId; + data.gameid = GameData.GameId; data.playerid = C_Player.playerid; - data.taskid = TaskInfo[up_id - ConstVal.Task.get_reward_btn_tag].taskid; - Net.Send_get_task_award(data); + data.content = text; + Net.Send_submit_opinion(data); + } - if (up_id == ConstVal.Task.tofinish_btn_tag) { - this.CloseTask(); - this.OpenShare(); - } - } - - - break; - case 17: - //打开任务 - var data = {}; - data.agentid = GameData.AgentId; - data.gameid = GameData.GameId; - data.playerid = C_Player.playerid; - Net.Send_get_player_task(data); - break; - case 115: - //关闭任务 - case 112: - this.CloseTask(); - break; - case 18: - //关闭创建房间 - case 60: - Game_Modify.CloseCreateRoom(); - break; - case 27: - //关闭加入房间 - case 59: - this.CloseJoinRoom(); - break; - case 43: - this.ClickBgm(); - break; - //点击音效按钮 - case 44: - this.ClickSound(); - break; - case 7: - //打开设置 - { - - this.OpenSetting(0); - } - break; - case 42: - //关闭设置 - case 47: - { - this.CloseSetting(); - } - break; - case 177: - { - - Func.visitorLogin(); - - } - break; - - - case ConstVal.Emotion.f_spid: - //点击表情 - var obj = gameabc_face.getdiv("div204"); - obj.blur(); - obj = null; - if (upx >= ConstVal.Emotion.clip_x && upx <= ConstVal.Emotion.clip_x + ConstVal.Emotion.clip_w && upy >= ConstVal.Emotion.clip_y && upy <= ConstVal.Emotion.clip_h + ConstVal.Emotion.clip_y) { - if (!GameData.slidEmotion) { - var up_id = ifast_check_add(spid_up, upx, upy); - if (up_id >= 1 && up_id <= ConstVal.Emotion.count) { + break; + case 77: + case 80: + //关闭消息 + { + if (GameData.hallConfig.worldRoomList && GameData.isShowWorldRoomList && GameData.hallConfig.autoWorldRoomList) { //显示星星争霸场 var data = {}; data.agentid = GameData.AgentId; - data.gameid = GameData.GameId; data.playerid = C_Player.playerid; - data.roomcode = Desk.roomcode; - data.text = up_id; - if (GameData.chatInfo) { - data.info = GameData.chatInfo; - data.type = 2; - } - Net.Send_send_phiz(data); - } - } - } - case ConstVal.Com_History.f_spid: - //点击历史记录 - var obj = gameabc_face.getdiv("div204"); - obj.blur(); - obj = null; - if (upx >= ConstVal.Com_History.clip_x && upx <= ConstVal.Com_History.clip_x + ConstVal.Com_History.clip_w && upy >= ConstVal.Com_History.clip_y && upy <= ConstVal.Com_History.clip_h + ConstVal.Com_History.clip_y) { - if (!GameData.slideHistory) { - var up_id = ifast_check_add(spid_up, upx, upy); - if (up_id >= ConstVal.Com_History.bubble_tag && up_id <= ConstVal.Com_History.content_tag) { - console.log(GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag]); - if (GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][1] == 1) { //文字 - - if (GameData.isService) { - var sp = ConstVal.Com_History.f_spid + "add" + up_id; - if (GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][4]) { - //GameData.chatLine =[0,10,50,10]; - GameData.chatLine = [get_self(sp, 18, 0, 0, 0), get_self(sp, 19, 0, 0, 0) - 10, get_self(sp, 20, 0, 0, 0), get_self(sp, 21, 0, 0, 0), sp, 1]; - GameData.chatInfo = GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][4]; - } else { - GameUI.OpenTips("此消息为本桌消息", ConstVal.Tips.time); - } - - } else { - set_self(204, 7, GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][2]); - } - } else { - if (!GameData.isService) { - var iid = ConstVal.Com_History.content_tag - ConstVal.Com_History.bubble_tag + up_id; - GameUI.play_voice(GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][2], 2, iid); - } else { - var sp = ConstVal.Com_History.f_spid + "add" + up_id; - if (GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][4]) { - GameData.chatLine = [get_self(sp, 18, 0, 0, 0), get_self(sp, 19, 0, 0, 0) - 10, get_self(sp, 20, 0, 0, 0), get_self(sp, 21, 0, 0, 0), sp, 2]; - GameData.chatInfo = GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][4]; - } else { - GameUI.OpenTips("此消息为本桌消息", ConstVal.Tips.time); - } - //console.log("GameUI.play_voice:"+GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][2]+" 2 "+iid); - } - // var p_spid = ConstVal.Com_History.f_spid+"add"+iid; - - - } + data.gameid = GameData.GameId; + Net.Send_get_share_room(data); } else { - GameData.chatInfo = null; - GameData.chatLine = null; - } - } - } - - break; - - case 14: - //打开分享 - { - this.OpenShare(); - } - break; - case 72: - //关闭分享 - { - this.CloseShare(); - } - break; - case 74: - //分享微信好友 - { - - Func.sharefinend(1, 1, Game_Config.Share.appdownload, Game_Config.Share.title, Game_Config.Share.description); - - this.CloseShare(); - } - break; - case 75: - //分享微信朋友圈 - { - if (!GameData.hallConfig.shareType) { - - } else { - console.log(GameData.hallConfig.shareImgUrl); - Func.sharefinend(2, 3, GameData.hallConfig.shareImgUrl); - } - this.CloseShare(); - } - break; - case 125: - //做任务一按钮 - - this.CloseTask(); - this.OpenShare(); - break; - case 128: - //做任务二按钮 - - break; - case 10: - //打开充值提示 - case 286: - case 508: - case 509: - case 287: - case 3161: - case 3162: - case 496: - var type = 1; - if (spid_up == 508 || spid_up == 509 || spid_up == 3162 || spid_up == 496) { - type = 2; - } - if (!GameData.h5Version) { - Utl.playSound(Game_Config.ClickButton.src_1); - if (GameData.agentmode == 2 || GameData.agentmode == 3) { - //console.log(GameData.AgentId+"、"+GameData.ChannelId+"、"+GameData.marketID+"、"+C_Player.playerid);agentid、channelid、marketid、playerid - if (GameData.versionState == 0) { - if (!GameData.h5Version) { - if (!GameData.hallConfig.androidPay) { - switch (GameData.agentmode) { - case 2: - if (GameData.TopUpUrl) { - Func.browser(GameData.TopUpUrl + "?agentid=" + GameData.AgentId + "&channelid=" + GameData.ChannelId + "&marketid=" + GameData.marketID + "&playerid=" + C_Player.playerid); - } else { - if (GameData.hallConfig.enablePay) { - var data = {}; - data.agentid = GameData.AgentId; - Net.Send_get_paylist(data); - } - } - break; - case 3: - if (GameData.hallConfig.channelKey) { - try { - //var type = 1; - //if(spid_up==509||spid_up==508){ - //type=2; - //} - pop_intZhifuMadal(GameData.AgentId, GameData.ChannelId, C_Player.playerid, type, GameData.hallConfig.channelKey, 2, 0, C_Player.openid, C_Player.unionid); - //pop_zhifuMadal(); - } catch (e) {} - } else { - - } - break; - } - - - } else { - if (GameData.OS == ConstVal.OS.android) { - //var type = 1; - //if(spid_up==509||spid_up==508){ - //type=2; - //} - Func.ypayType(type); - } - } - } else { - var data = {}; - data.agentid = GameData.AgentId; - Net.Send_get_paylist(data); - } - } - } else { - if (GameData.sysConfig.h5PayUrl) { - var url = GameData.sysConfig.h5PayUrl + "?agentid" + GameData.AgentId + "&channelid" + GameData.ChannelId; - window.location.href = fixUrl(url); + GameUI.CloseBoard(); } } - } - break; - case 146: - //关闭充值提示 - this.CloseCharge(); - break; - case 233: - //退出房间 - case 3145: - GameUI.closeMainSceneBtnPanel(); - if (Desk.infinite == 0) { - if (C_Player.status == 1) { - GameData.checkType = 2; - GameUI.openCheck("房间仍存在,是否退出?"); - } else { - var data = {}; - data.agentid = GameData.AgentId; - data.gameid = GameData.GameId; - data.playerid = C_Player.playerid; - data.roomcode = Desk.roomcode; - Net.Send_self_exit_room(data); + break; + case 9: + //打开个人信息 + { + + this.OpenInfo_hall(); } - } else { + break; + case 116: + //关闭个人信息 + { + this.CloseInfo_hall(); + } + break; + case 215: + //关闭个人信息 + { + this.CloseInfo(); + } + break; + case 357: + GameUI.ClickShake(); + break; + case 388: + GameUI.ClickVoice(); + break; + case 141: + //关闭帮助 + case 47: + this.CloseHelp(); + break; + case 11: + //打开创建房间 + Game_Modify.OpenCreateRoom(); + break; + case 3184: + //if(!Game_Config.sysConfig.vipInfinite){ + GameUI.closeVipRoomList(); + Game_Modify.OpenCreateRoom(); + //}else{ + //GameUI.closeVipRoomList(); + //} + break; + case 12: + //打开加入房间 + this.OpenJoinRoom(); + break; + case ConstVal.Task.f_spid: + //点击任务 + var up_id = ifast_check_add(spid_up, upx, upy); + if (!GameData.slideTask) { + if (up_id >= ConstVal.Task.get_reward_btn_tag && up_id < ConstVal.Task.isreward_tag) { + //console.log(TaskInfo[up_id - ConstVal.Task.get_reward_btn_tag]); + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.taskid = TaskInfo[up_id - ConstVal.Task.get_reward_btn_tag].taskid; + Net.Send_get_task_award(data); + } + if (up_id == ConstVal.Task.tofinish_btn_tag) { + this.CloseTask(); + this.OpenShare(); + } + } + + + break; + case 17: + //打开任务 var data = {}; data.agentid = GameData.AgentId; data.gameid = GameData.GameId; data.playerid = C_Player.playerid; - data.roomcode = Desk.roomcode; - Net.Send_self_exit_room(data); - } - break; + Net.Send_get_player_task(data); + break; + case 115: + //关闭任务 + case 112: + this.CloseTask(); + break; + case 18: + //关闭创建房间 + case 60: + Game_Modify.CloseCreateRoom(); + break; + case 27: + //关闭加入房间 + case 59: + this.CloseJoinRoom(); + break; + case 43: + this.ClickBgm(); + break; + //点击音效按钮 + case 44: + this.ClickSound(); + break; + case 7: + //打开设置 + { - case 181: - //申请解散房间/退出房间 - if (C_Player.canexit == 1) { //未开局 + this.OpenSetting(0); + } + break; + case 42: + //关闭设置 + case 47: + { + this.CloseSetting(); + } + break; + case 177: + { + + Func.visitorLogin(); + + } + break; + + + case ConstVal.Emotion.f_spid: + //点击表情 + var obj = gameabc_face.getdiv("div204"); + obj.blur(); + obj = null; + if (upx >= ConstVal.Emotion.clip_x && upx <= ConstVal.Emotion.clip_x + ConstVal.Emotion.clip_w && upy >= ConstVal.Emotion.clip_y && upy <= ConstVal.Emotion.clip_h + ConstVal.Emotion.clip_y) { + if (!GameData.slidEmotion) { + var up_id = ifast_check_add(spid_up, upx, upy); + if (up_id >= 1 && up_id <= ConstVal.Emotion.count) { + var data = {}; + data.agentid = GameData.AgentId; + data.gameid = GameData.GameId; + data.playerid = C_Player.playerid; + data.roomcode = Desk.roomcode; + data.text = up_id; + if (GameData.chatInfo) { + data.info = GameData.chatInfo; + data.type = 2; + } + Net.Send_send_phiz(data); + } + } + } + case ConstVal.Com_History.f_spid: + //点击历史记录 + var obj = gameabc_face.getdiv("div204"); + obj.blur(); + obj = null; + if (upx >= ConstVal.Com_History.clip_x && upx <= ConstVal.Com_History.clip_x + ConstVal.Com_History.clip_w && upy >= ConstVal.Com_History.clip_y && upy <= ConstVal.Com_History.clip_h + ConstVal.Com_History.clip_y) { + if (!GameData.slideHistory) { + var up_id = ifast_check_add(spid_up, upx, upy); + if (up_id >= ConstVal.Com_History.bubble_tag && up_id <= ConstVal.Com_History.content_tag) { + console.log(GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag]); + if (GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][1] == 1) { //文字 + + if (GameData.isService) { + var sp = ConstVal.Com_History.f_spid + "add" + up_id; + if (GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][4]) { + //GameData.chatLine =[0,10,50,10]; + GameData.chatLine = [get_self(sp, 18, 0, 0, 0), get_self(sp, 19, 0, 0, 0) - 10, get_self(sp, 20, 0, 0, 0), get_self(sp, 21, 0, 0, 0), sp, 1]; + GameData.chatInfo = GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][4]; + } else { + GameUI.OpenTips("此消息为本桌消息", ConstVal.Tips.time); + } + + } else { + set_self(204, 7, GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][2]); + } + } else { + if (!GameData.isService) { + var iid = ConstVal.Com_History.content_tag - ConstVal.Com_History.bubble_tag + up_id; + GameUI.play_voice(GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][2], 2, iid); + } else { + var sp = ConstVal.Com_History.f_spid + "add" + up_id; + if (GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][4]) { + GameData.chatLine = [get_self(sp, 18, 0, 0, 0), get_self(sp, 19, 0, 0, 0) - 10, get_self(sp, 20, 0, 0, 0), get_self(sp, 21, 0, 0, 0), sp, 2]; + GameData.chatInfo = GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][4]; + } else { + GameUI.OpenTips("此消息为本桌消息", ConstVal.Tips.time); + } + //console.log("GameUI.play_voice:"+GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][2]+" 2 "+iid); + } + // var p_spid = ConstVal.Com_History.f_spid+"add"+iid; + + + } + } else { + GameData.chatInfo = null; + GameData.chatLine = null; + } + } + } + + break; + + case 14: + //打开分享 + { + this.OpenShare(); + } + break; + case 72: + //关闭分享 + { + this.CloseShare(); + } + break; + case 74: + //分享微信好友 + { + + Func.sharefinend(1, 1, Game_Config.Share.appdownload, Game_Config.Share.title, Game_Config.Share.description); + + this.CloseShare(); + } + break; + case 75: + //分享微信朋友圈 + { + if (!GameData.hallConfig.shareType) { + + } else { + console.log(GameData.hallConfig.shareImgUrl); + Func.sharefinend(2, 3, GameData.hallConfig.shareImgUrl); + } + this.CloseShare(); + } + break; + case 125: + //做任务一按钮 + + this.CloseTask(); + this.OpenShare(); + break; + case 128: + //做任务二按钮 + + break; + case 10: + //打开充值提示 + case 286: + case 508: + case 509: + case 287: + case 3161: + case 3162: + case 496: + var type = 1; + if (spid_up == 508 || spid_up == 509 || spid_up == 3162 || spid_up == 496) { + type = 2; + } + if (!GameData.h5Version) { + Utl.playSound(Game_Config.ClickButton.src_1); + if (GameData.agentmode == 2 || GameData.agentmode == 3) { + //console.log(GameData.AgentId+"、"+GameData.ChannelId+"、"+GameData.marketID+"、"+C_Player.playerid);agentid、channelid、marketid、playerid + if (GameData.versionState == 0) { + if (!GameData.h5Version) { + if (!GameData.hallConfig.androidPay) { + switch (GameData.agentmode) { + case 2: + if (GameData.TopUpUrl) { + Func.browser(GameData.TopUpUrl + "?agentid=" + GameData.AgentId + "&channelid=" + GameData.ChannelId + "&marketid=" + GameData.marketID + "&playerid=" + C_Player.playerid); + } else { + if (GameData.hallConfig.enablePay) { + var data = {}; + data.agentid = GameData.AgentId; + Net.Send_get_paylist(data); + } + } + break; + case 3: + if (GameData.hallConfig.channelKey) { + try { + //var type = 1; + //if(spid_up==509||spid_up==508){ + //type=2; + //} + pop_intZhifuMadal(GameData.AgentId, GameData.ChannelId, C_Player.playerid, type, GameData.hallConfig.channelKey, 2, 0, C_Player.openid, C_Player.unionid); + //pop_zhifuMadal(); + } catch (e) { } + } else { + + } + break; + } + + + } else { + if (GameData.OS == ConstVal.OS.android) { + //var type = 1; + //if(spid_up==509||spid_up==508){ + //type=2; + //} + Func.ypayType(type); + } + } + } else { + var data = {}; + data.agentid = GameData.AgentId; + Net.Send_get_paylist(data); + } + } + } else { + if (GameData.sysConfig.h5PayUrl) { + var url = GameData.sysConfig.h5PayUrl + "?agentid" + GameData.AgentId + "&channelid" + GameData.ChannelId; + window.location.href = fixUrl(url); + } + + } + } + break; + case 146: + //关闭充值提示 + this.CloseCharge(); + break; + case 233: + //退出房间 + case 3145: + GameUI.closeMainSceneBtnPanel(); if (Desk.infinite == 0) { - - if (C_Player.status == 2) { + if (C_Player.status == 1) { + GameData.checkType = 2; + GameUI.openCheck("房间仍存在,是否退出?"); + } else { var data = {}; data.agentid = GameData.AgentId; data.gameid = GameData.GameId; data.playerid = C_Player.playerid; data.roomcode = Desk.roomcode; Net.Send_self_exit_room(data); - } else { - GameUI.CloseSetting(); - var c_msg = ""; - if (GameData.versionState == 1) { - - c_msg = " 是否解散房间??"; - } else { - c_msg = "解散房间不扣" + GameData.roomCardName + ",是否解散?"; - } - GameData.checkType = 1; - GameUI.openCheck(c_msg); - } } else { var data = {}; @@ -1052,420 +1017,455 @@ GameUI.utlmouseup = function(gameid, spid_down, downx, downy, spid_up, upx, upy, data.roomcode = Desk.roomcode; Net.Send_self_exit_room(data); } + break; - } else { - var data = {}; - data.agentid = GameData.AgentId; - data.gameid = GameData.GameId; - data.playerid = C_Player.playerid; - data.roomcode = Desk.roomcode; - Net.Send_self_apply_free_room(data); - } - break; - case 182: - //邀请好友 - case 183: - - if(!GameData.sysConfig.appShareH5){ - Func.sharefinend(1, 1, Game_Config.Share.appdownload, Game_Config.Share.title + Desk.videoDes + Game_Config.Share.gameTitle + GameData.shareMsg, Game_Config.Share.gameDescription); - }else{ - Func.sharefinend(1, 1, GameData.sysConfig.appShareH5, Game_Config.Share.title + Desk.videoDes + Game_Config.Share.gameTitle + GameData.shareMsg, Game_Config.Share.gameDescription); - } - + case 181: + //申请解散房间/退出房间 + if (C_Player.canexit == 1) { //未开局 + if (Desk.infinite == 0) { - break; - case 151: - //打开游戏主界面设置 - GameUI.OpenSetting(1); - break; - case 184: - //开始按钮 - //this.StartLoad(); - var data = {}; - data.agentid = GameData.AgentId; - data.gameid = GameData.GameId; - data.playerid = C_Player.playerid; - data.roomcode = Desk.roomcode; - Net.Send_self_makewar(data); - break; - case 185: - //解散 - case 3144: - if (Desk.stage == 0) { - var c_msg = ""; - if (GameData.versionState == 1) { + if (C_Player.status == 2) { + var data = {}; + data.agentid = GameData.AgentId; + data.gameid = GameData.GameId; + data.playerid = C_Player.playerid; + data.roomcode = Desk.roomcode; + Net.Send_self_exit_room(data); + } else { + GameUI.CloseSetting(); + var c_msg = ""; + if (GameData.versionState == 1) { + + c_msg = " 是否解散房间??"; + } else { + c_msg = "解散房间不扣" + GameData.roomCardName + ",是否解散?"; + } + GameData.checkType = 1; + GameUI.openCheck(c_msg); + + } + } else { + var data = {}; + data.agentid = GameData.AgentId; + data.gameid = GameData.GameId; + data.playerid = C_Player.playerid; + data.roomcode = Desk.roomcode; + Net.Send_self_exit_room(data); + } - c_msg = " 是否解散房间?"; } else { - c_msg = "解散房间不扣" + GameData.roomCardName + ",是否解散?"; - } - GameData.checkType = 1; - GameUI.closeMainSceneBtnPanel(); - GameUI.openCheck(c_msg); - } else { - var data = {}; - data.agentid = GameData.AgentId; - data.gameid = GameData.GameId; - data.playerid = C_Player.playerid; - data.roomcode = Desk.roomcode; - Net.Send_self_apply_free_room(data); - } - break; - case 201: - //同意解散 - //this.StartLoad(); - var data = {}; - data.agentid = GameData.AgentId; - data.gameid = GameData.GameId; - data.playerid = C_Player.playerid; - data.roomcode = Desk.roomcode; - Net.Send_self_agree_free_room(data); - break; - case 202: - //拒绝解散 - //this.StartLoad(); - var data = {}; - data.agentid = GameData.AgentId; - data.gameid = GameData.GameId; - data.playerid = C_Player.playerid; - data.roomcode = Desk.roomcode; - Net.Send_self_refuse_free_room(data); - break; - case 153: - //打开聊天按钮 - GameUI.OpenChat(); - break; - case 186: - //关闭聊天 - var obj = gameabc_face.getdiv("div204"); - obj.blur(); - obj = null; - this.CloseChat(); - break; - case 205: - //发送聊天 - var text = get_self(204, 7, 0, 0, 0); - var text_bool = Func.strisNull(text); - if (!text_bool) { - var obj = gameabc_face.getdiv("div204"); - obj.blur(); - obj = null; - if (!Func.filter(text)) { var data = {}; data.agentid = GameData.AgentId; data.gameid = GameData.GameId; data.playerid = C_Player.playerid; data.roomcode = Desk.roomcode; - GameData.selectSysNotice == true ? data.type = 1 : data.type = 0; - data.text = text; - //if(Game_Config.sysConfig.vipInfinite){ - // data.brType = 1; - //}else{ - // data.brType = 0; - //} - if (GameData.chatInfo) { - data.info = GameData.chatInfo; - data.type = 2; - } - Net.Send_send_text(data); - } else { - this.OpenTips("内容含有敏感词汇请重新输入!", ConstVal.Tips.time); + Net.Send_self_apply_free_room(data); } - } - break; - case 188: - //点击常用语 - //set_self(188,43,2,0,0); - var obj = gameabc_face.getdiv("div204"); - obj.blur(); - obj = null; - this.SelectMsg(); - break; - case 203: - //点击表情 - var obj = gameabc_face.getdiv("div204"); - obj.blur(); - obj = null; - this.SelectEmotion(); - break; - case 698: - //点击表情 - var obj = gameabc_face.getdiv("div204"); - obj.blur(); - obj = null; - this.SelectHistory(); - break; - case 223: - //投票结果 - this.CloseApplyResult(); - break; - case 224: - //退出程序 - Func.exit(); - break; - case 226: - //关闭房卡提示 - GameUI.Closeupdataroomcard(); - break; + break; + case 182: + //邀请好友 + case 183: - case 217: - case 218: + if (!GameData.sysConfig.appShareH5) { + Func.sharefinend(1, 1, Game_Config.Share.appdownload, Game_Config.Share.title + Desk.videoDes + Game_Config.Share.gameTitle + GameData.shareMsg, Game_Config.Share.gameDescription); + } else { + Func.sharefinend(1, 1, GameData.sysConfig.appShareH5, Game_Config.Share.title + Desk.videoDes + Game_Config.Share.gameTitle + GameData.shareMsg, Game_Config.Share.gameDescription); + } + + + break; + case 151: + //打开游戏主界面设置 + GameUI.OpenSetting(1); + break; + case 184: + //开始按钮 + //this.StartLoad(); + var data = {}; + data.agentid = GameData.AgentId; + data.gameid = GameData.GameId; + data.playerid = C_Player.playerid; + data.roomcode = Desk.roomcode; + Net.Send_self_makewar(data); + break; + case 185: + //解散 + case 3144: + if (Desk.stage == 0) { + var c_msg = ""; + if (GameData.versionState == 1) { + + c_msg = " 是否解散房间?"; + } else { + c_msg = "解散房间不扣" + GameData.roomCardName + ",是否解散?"; + } + GameData.checkType = 1; + GameUI.closeMainSceneBtnPanel(); + GameUI.openCheck(c_msg); + } else { + var data = {}; + data.agentid = GameData.AgentId; + data.gameid = GameData.GameId; + data.playerid = C_Player.playerid; + data.roomcode = Desk.roomcode; + Net.Send_self_apply_free_room(data); + } + break; + case 201: + //同意解散 + //this.StartLoad(); + var data = {}; + data.agentid = GameData.AgentId; + data.gameid = GameData.GameId; + data.playerid = C_Player.playerid; + data.roomcode = Desk.roomcode; + Net.Send_self_agree_free_room(data); + break; + case 202: + //拒绝解散 + //this.StartLoad(); + var data = {}; + data.agentid = GameData.AgentId; + data.gameid = GameData.GameId; + data.playerid = C_Player.playerid; + data.roomcode = Desk.roomcode; + Net.Send_self_refuse_free_room(data); + break; + case 153: + //打开聊天按钮 + GameUI.OpenChat(); + break; + case 186: + //关闭聊天 + var obj = gameabc_face.getdiv("div204"); + obj.blur(); + obj = null; + this.CloseChat(); + break; + case 205: + //发送聊天 + var text = get_self(204, 7, 0, 0, 0); + var text_bool = Func.strisNull(text); + if (!text_bool) { + var obj = gameabc_face.getdiv("div204"); + obj.blur(); + obj = null; + if (!Func.filter(text)) { + var data = {}; + data.agentid = GameData.AgentId; + data.gameid = GameData.GameId; + data.playerid = C_Player.playerid; + data.roomcode = Desk.roomcode; + GameData.selectSysNotice == true ? data.type = 1 : data.type = 0; + data.text = text; + //if(Game_Config.sysConfig.vipInfinite){ + // data.brType = 1; + //}else{ + // data.brType = 0; + //} + if (GameData.chatInfo) { + data.info = GameData.chatInfo; + data.type = 2; + } + Net.Send_send_text(data); + } else { + this.OpenTips("内容含有敏感词汇请重新输入!", ConstVal.Tips.time); + } + } + break; + case 188: + //点击常用语 + //set_self(188,43,2,0,0); + var obj = gameabc_face.getdiv("div204"); + obj.blur(); + obj = null; + this.SelectMsg(); + break; + case 203: + //点击表情 + var obj = gameabc_face.getdiv("div204"); + obj.blur(); + obj = null; + this.SelectEmotion(); + break; + case 698: + //点击表情 + var obj = gameabc_face.getdiv("div204"); + obj.blur(); + obj = null; + this.SelectHistory(); + break; + case 223: + //投票结果 + this.CloseApplyResult(); + break; + case 224: + //退出程序 + Func.exit(); + break; + case 226: + //关闭房卡提示 + GameUI.Closeupdataroomcard(); + break; + + case 217: + case 218: //关闭提示 - case 3193: - GameUI.CloseTips(); - break; - case 245: - //确认解散 - switch (GameData.checkType) { - case 1: - //解散房间 - var data = {}; - data.agentid = GameData.AgentId; - data.gameid = GameData.GameId; - data.playerid = C_Player.playerid; - data.roomcode = Desk.roomcode; - Net.Send_self_break_room(data); + case 3193: + GameUI.CloseTips(); break; - case 2: - //退出房间 - var data = {}; - data.agentid = GameData.AgentId; - data.gameid = GameData.GameId; - data.playerid = C_Player.playerid; - data.roomcode = Desk.roomcode; - Net.Send_self_exit_room(data); - break; - case 3: - //投降 - var data = {}; - data.agentid = GameData.AgentId; - data.gameid = GameData.GameId; - data.playerid = C_Player.playerid; - data.roomcode = Desk.roomcode; - data.count = GameData.surrendCount; - Net.Send_beanroom_surrender(data); - break; - case 4: - //删除房间 - console.log(GameData.snrRoomList.roomlist[GameData.snrOptionRoomTag]); + case 245: + //确认解散 + switch (GameData.checkType) { + case 1: + //解散房间 + var data = {}; + data.agentid = GameData.AgentId; + data.gameid = GameData.GameId; + data.playerid = C_Player.playerid; + data.roomcode = Desk.roomcode; + Net.Send_self_break_room(data); + break; + case 2: + //退出房间 + var data = {}; + data.agentid = GameData.AgentId; + data.gameid = GameData.GameId; + data.playerid = C_Player.playerid; + data.roomcode = Desk.roomcode; + Net.Send_self_exit_room(data); + break; + case 3: + //投降 + var data = {}; + data.agentid = GameData.AgentId; + data.gameid = GameData.GameId; + data.playerid = C_Player.playerid; + data.roomcode = Desk.roomcode; + data.count = GameData.surrendCount; + Net.Send_beanroom_surrender(data); + break; + case 4: + //删除房间 + console.log(GameData.snrRoomList.roomlist[GameData.snrOptionRoomTag]); + + break; + case 5: + //h5跳转直接进入房间的确定 + var data = {}; + data.agentid = GameData.AgentId; + data.gameid = GameData.GameId; + data.playerid = C_Player.playerid; + data.roomcode = GameData.fromH5GameData.data.roomcode; + Net.Send_self_join_room(data); + break; + case 6://全部添加黑名单 + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.type = 6; + Net.Send_optBanList(data); + break; + case 7://设置全部魅力 + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.gameid = GameData.GameId; + data.value = GameData.allCharm; + Net.Send_setAllCharm(data); + break; + //删除白名单玩家 + case 8: + this.closeCheck(); + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.gameid = GameData.GameId; + data.shortcode = C_Player.shortcode; + data.mode = 2; + data.userid = GameData.whiteList.delPid; + Net.Send_optWhiteList(data); + break; + case 9: + this.closeCheck(); + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.shortcode = C_Player.shortcode; + data.gameid = GameData.GameId; + data.mode = 1; + data.userid = GameData.whiteList.delPid; + data.value = GameData.whiteList.inputCharm; + Net.Send_optWhiteList(data); + break; + } break; - case 5: - //h5跳转直接进入房间的确定 - var data = {}; - data.agentid = GameData.AgentId; - data.gameid = GameData.GameId; - data.playerid = C_Player.playerid; - data.roomcode = GameData.fromH5GameData.data.roomcode; - Net.Send_self_join_room(data); - break; - case 6://全部添加黑名单 - var data={}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.type = 6; - Net.Send_optBanList(data); - break; - case 7://设置全部魅力 - var data={}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.gameid = GameData.GameId; - data.value = GameData.allCharm; - Net.Send_setAllCharm(data); - break; - //删除白名单玩家 - case 8: + case 247: + case 242: + case 246: this.closeCheck(); - var data={}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.gameid = GameData.GameId; - data.shortcode = C_Player.shortcode; - data.mode = 2; - data.userid = GameData.whiteList.delPid; - Net.Send_optWhiteList(data); break; - case 9: - this.closeCheck(); - var data={}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.shortcode = C_Player.shortcode; - data.gameid = GameData.GameId; - data.mode = 1; - data.userid = GameData.whiteList.delPid; - data.value = GameData.whiteList.inputCharm; - Net.Send_optWhiteList(data); + case 248: + //协议确认按钮 + GameData.ProtocolIndex = !GameData.ProtocolIndex; break; - } - - break; - case 247: - case 242: - case 246: - this.closeCheck(); - break; - case 248: - //协议确认按钮 - GameData.ProtocolIndex = !GameData.ProtocolIndex; - break; - case 249: - //打开协议 - this.OpenProtocol(); - break; - case 250: - case 253: - this.CloseProtocol(); - break; - case 332: + case 249: + //打开协议 + this.OpenProtocol(); + break; + case 250: + case 253: + this.CloseProtocol(); + break; + case 332: //关闭即时信息 - case 333: - case 335: - GameUI.HideiMessage(); - break; + case 333: + case 335: + GameUI.HideiMessage(); + break; //case 339://微信公众 //case 680: - case 76: - GameUI.Open_ewm(); - break; - case 345: - //Func.sharephotourl(1,GameData.wechat_ewm); - Func.sharefinend(1, 3, GameData.wechat_ewm); - break; - case 341: - GameUI.Close_ewm(); - break; - case GameData.telSpid: - Func.callphone(GameData.tel); - break; - case 366: - //粘贴 - GameData.gamepastetext = "mouseup_366"; - var text = Func.gamepastetext(); - if (GameData.userAgent != ConstVal.userAgent.uAgent_3) { - var reg = /[^0-9]/g; - if (text) { - text = text.replace(reg, ""); - //if(reg.test(text)){ - set_self(365, 7, text, 0, 0); - //}else{ - //GameUI.OpenTips("粘贴内容格式不符!",ConstVal.Tips.time); - //} + case 76: + GameUI.Open_ewm(); + break; + case 345: + //Func.sharephotourl(1,GameData.wechat_ewm); + Func.sharefinend(1, 3, GameData.wechat_ewm); + break; + case 341: + GameUI.Close_ewm(); + break; + case GameData.telSpid: + Func.callphone(GameData.tel); + break; + case 366: + //粘贴 + GameData.gamepastetext = "mouseup_366"; + var text = Func.gamepastetext(); + if (GameData.userAgent != ConstVal.userAgent.uAgent_3) { + var reg = /[^0-9]/g; + if (text) { + text = text.replace(reg, ""); + //if(reg.test(text)){ + set_self(365, 7, text, 0, 0); + //}else{ + //GameUI.OpenTips("粘贴内容格式不符!",ConstVal.Tips.time); + //} + } } - } - break; - - case 367: - var text = get_self(365, 7, 0, 0, 0); - var obj = gameabc_face.getdiv("div365"); - obj.blur(); - obj = null; - //if(text.length == 6){ - GameUI.CloseBind(); - var data = {}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.invitecode = text; - Net.Send_binding_invitecode(data); - //}else{ - //GameUI.OpenTips("邀请码长度为6位!",ConstVal.Tips.time); - //} - break; - case 235: + break; - //GameUI.OpenBind(); - var data = {}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.unionid = C_Player.unionid; - data.openid = C_Player.openid; - Net.Send_get_player_invitecode(data); - break; - case 362: - GameUI.CloseBind(); - break; - case 371: - case 375: - GameUI.hideCal(); - break; - case 46: - case 386: - //关闭支付金额选择界面 - GameUI.ClosePay(); - break; - case 456: - //关闭支付确认界面 - GameUI.CloseCheckPay(); - break; - case 464: - //确认支付 - GameUI.StartLoad(); - var data = {}; - data.body = GameData.payList[GameData.payData[0]].memo; - data.price = GameData.payList[GameData.payData[0]].money; - data.amount = GameData.payList[GameData.payData[0]].amount; - data.productid = GameData.payList[GameData.payData[0]].productid; - data.user = Utl.getMyPlayerid(); - data.type = GameData.payList[GameData.payData[0]].payid; - data.typeplay = GameData.payData[1] + 1; - Func.getGamepay(JSON.stringify(data)); - break; - case 465: - backgameData(); + case 367: + var text = get_self(365, 7, 0, 0, 0); + var obj = gameabc_face.getdiv("div365"); + obj.blur(); + obj = null; + //if(text.length == 6){ + GameUI.CloseBind(); + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.invitecode = text; + Net.Send_binding_invitecode(data); + //}else{ + //GameUI.OpenTips("邀请码长度为6位!",ConstVal.Tips.time); + //} + break; + case 235: - break; - case 481: - GameData.visitorClick++; - break; - case 482: - if (GameData.visitorClick >= 5 && Game_Config.Debugger.visitorLogin) { - GameData.visitorClick = 0; - Func.visitorLogin(); - } - break; - case 389: - case 390: - GameUI.closeBroadcastfromplayer(); - break; - case 483: - Logic.openMatchUrl(); - //else{ - //GameUI.OpenTips("暂未开放,敬请期待",ConstVal.Tips.time); - //} - break; - case 484: - GameUI.CloseInfo_hall(); - GameUI.openAuth(); - break; - case 485: - GameUI.closeAuth(); - break; - case 493: - var name_text = get_self(489, 7, 0, 0, 0); - var id_text = get_self(490, 7, 0, 0, 0); - if (name_text.length > 1) { - if (GameData.Validator.isValid(id_text)) { - GameUI.closeAuth(); - GameUI.OpenTips("认证成功!", ConstVal.Tips.time); + //GameUI.OpenBind(); + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.unionid = C_Player.unionid; + data.openid = C_Player.openid; + Net.Send_get_player_invitecode(data); + break; + case 362: + GameUI.CloseBind(); + break; + case 371: + case 375: + GameUI.hideCal(); + break; + case 46: + case 386: + //关闭支付金额选择界面 + GameUI.ClosePay(); + break; + case 456: + //关闭支付确认界面 + GameUI.CloseCheckPay(); + break; + case 464: + //确认支付 + GameUI.StartLoad(); + var data = {}; + data.body = GameData.payList[GameData.payData[0]].memo; + data.price = GameData.payList[GameData.payData[0]].money; + data.amount = GameData.payList[GameData.payData[0]].amount; + data.productid = GameData.payList[GameData.payData[0]].productid; + data.user = Utl.getMyPlayerid(); + data.type = GameData.payList[GameData.payData[0]].payid; + data.typeplay = GameData.payData[1] + 1; + Func.getGamepay(JSON.stringify(data)); + break; + case 465: + backgameData(); + + break; + case 481: + GameData.visitorClick++; + break; + case 482: + if (GameData.visitorClick >= 5 && Game_Config.Debugger.visitorLogin) { + GameData.visitorClick = 0; + Func.visitorLogin(); + } + break; + case 389: + case 390: + GameUI.closeBroadcastfromplayer(); + break; + case 483: + Logic.openMatchUrl(); + //else{ + //GameUI.OpenTips("暂未开放,敬请期待",ConstVal.Tips.time); + //} + break; + case 484: + GameUI.CloseInfo_hall(); + GameUI.openAuth(); + break; + case 485: + GameUI.closeAuth(); + break; + case 493: + var name_text = get_self(489, 7, 0, 0, 0); + var id_text = get_self(490, 7, 0, 0, 0); + if (name_text.length > 1) { + if (GameData.Validator.isValid(id_text)) { + GameUI.closeAuth(); + GameUI.OpenTips("认证成功!", ConstVal.Tips.time); + } else { + GameUI.OpenTips("身份证信息不正确!", ConstVal.Tips.time); + } } else { - GameUI.OpenTips("身份证信息不正确!", ConstVal.Tips.time); + GameUI.OpenTips("姓名不正确!", ConstVal.Tips.time); } - } else { - GameUI.OpenTips("姓名不正确!", ConstVal.Tips.time); - } - break; - case 494: - //点击设置为无限局 - GameData.infClickCount++; - if (GameData.infClickCount >= 5) { - GameData.infMode = 1; - } - break; - case 495: - //设置为正常 - GameData.infMode = 0; - break; + break; + case 494: + //点击设置为无限局 + GameData.infClickCount++; + if (GameData.infClickCount >= 5) { + GameData.infMode = 1; + } + break; + case 495: + //设置为正常 + GameData.infMode = 0; + break; //case 682: //if(GameData.roomList.length>=1){ //var data={}; @@ -1502,610 +1502,610 @@ GameUI.utlmouseup = function(gameid, spid_down, downx, downy, spid_up, upx, upy, //} //break; - case 512: - case 3143: - Func.gameCopytext(Desk.roomcode); - GameUI.OpenTips("复制成功!", ConstVal.Tips.time); - break; - case 513: - //GameData.checkType = 3; - //GameUI.openCheck("将扣除"+Desk.starCount+"个"+GameData.starName+",确定逃跑?"); - //Utl.openInputPanel("请输入投降扣除数量(底翻)",function(_data){ - //if(_data <= Desk.starCount){ - //GameData.surrendCount = _data; - //Utl.closeInputPanel(); - //GameData.checkType = 3; - //GameUI.openCheck("将扣除"+_data+GameData.starName+",确定逃跑?"); - //}else{ - //GameUI.OpenTips("输入数量大于最大值"+Desk.starCount+"!",ConstVal.Tips.time); - //} - //}); - GameUI.closeMainSceneBtnPanel(); - Utl.openInputPanel("请输入投降扣除数量(底翻)", function(_data) { - if (_data <= C_Player.bean) { - GameData.surrendCount = _data; - Utl.closeInputPanel(); - GameData.checkType = 3; - GameUI.openCheck("将扣除" + _data + GameData.starName + ",确定逃跑?"); - } else { - GameUI.OpenTips("输入大于您拥有的" + _data + GameData.starName + "数:" + C_Player.bean + "!", ConstVal.Tips.time); - } - }); - break; - case 514: - Logic.pasteRoomCode(); - break; - case 515: - var data = {}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.gameid = GameData.GameId; - data.roomcode = Desk.roomcode; - Net.Send_player_prepare(data); - break; - case ConstVal.worldRoom.f_sp_1: - //点击系统房间 - var up_id = ifast_check_add(spid_up, upx, upy); - if (!GameData.worldRoomSysSlide) { - if (up_id >= ConstVal.worldRoom.bg_sp_tag_1 && up_id < ConstVal.worldRoom.top_sp_tag_1) { - //console.log(GameData.worldRoomSys[up_id - ConstVal.worldRoom.bg_sp_tag_1]); - var data = {}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.gameid = GameData.GameId; - data.type = GameData.worldRoomSys[up_id - ConstVal.worldRoom.bg_sp_tag_1].type; - data.roomtype = GameData.worldRoomSys[up_id - ConstVal.worldRoom.bg_sp_tag_1].roomtype; - Net.Send_quick_enter_share_room(data); - } - - } - break; - case ConstVal.worldRoom.f_sp_2: - //点击玩家房间 - var up_id = ifast_check_add(spid_up, upx, upy); - if (!GameData.worldRoomPlySlide) { - if (up_id >= ConstVal.worldRoom.bg_sp_tag_2 && up_id < ConstVal.worldRoom.top_sp_tag_2) { - console.log(GameData.worldRoomPly[up_id - ConstVal.worldRoom.bg_sp_tag_2]); - var data = {}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.gameid = GameData.GameId; - data.roomcode = GameData.worldRoomPly[up_id - ConstVal.worldRoom.bg_sp_tag_2].roomcode; - data.joinmode = 0; - Net.Send_self_join_room(data); - } - - } - break; - case ConstVal.rankList.f_spid: - //点击玩家房间 - var up_id = ifast_check_add(spid_up, upx, upy); - if (!GameData.rankListSlide) { - if (up_id >= ConstVal.rankList.bg_tag && up_id < ConstVal.rankList.badge_tag) { - //console.log(GameData.rankList[up_id - ConstVal.rankList.bg_tag]); - GameUI.clickRankList(up_id - ConstVal.rankList.bg_tag); - } - - } - break; - case ConstVal.vipRoomList1.f_spid: - // - var up_id = ifast_check_add(spid_up, upx, upy); - if (!GameData.vipRoomPageOne.slide) { - if (up_id >= ConstVal.vipRoomList1.bg_tag && up_id < ConstVal.vipRoomList1.title_tag) { - var indx = up_id - ConstVal.vipRoomList1.bg_tag; - GameData.vipRoomCode = GameData.vipRoomData[indx].shortCode; - console.log("进入", indx, GameData.vipRoomCode); - GameUI.goVipPageTwo(); - } -/* - if(up_id>=ConstVal.vipRoomList1.title_tag&&up_id=ConstVal.vipRoomList1.code_tag&&up_id=ConstVal.vipRoomList1.owner_tag&&up_id=ConstVal.vipRoomList1.count_tag&&up_id= ConstVal.vipRoomList1.del_tag && up_id < ConstVal.vipRoomList1.enter_tag) { - var indx = up_id - ConstVal.vipRoomList1.del_tag; - //GameData.vipRoomCode = GameData.vipRoomShortList[indx]; - GameData.vipRoomCode = GameData.vipRoomData[indx].shortCode; - console.log("删除", indx, GameData.vipRoomCode); - Logic.delVipRoom(GameData.vipRoomShortList[indx]); - GameUI.setVipRoomListData(GameData.vipRoomData); - GameUI.updateVipRoomList(); + case 512: + case 3143: + Func.gameCopytext(Desk.roomcode); + GameUI.OpenTips("复制成功!", ConstVal.Tips.time); + break; + case 513: + //GameData.checkType = 3; + //GameUI.openCheck("将扣除"+Desk.starCount+"个"+GameData.starName+",确定逃跑?"); + //Utl.openInputPanel("请输入投降扣除数量(底翻)",function(_data){ + //if(_data <= Desk.starCount){ + //GameData.surrendCount = _data; + //Utl.closeInputPanel(); + //GameData.checkType = 3; + //GameUI.openCheck("将扣除"+_data+GameData.starName+",确定逃跑?"); + //}else{ + //GameUI.OpenTips("输入数量大于最大值"+Desk.starCount+"!",ConstVal.Tips.time); + //} + //}); + GameUI.closeMainSceneBtnPanel(); + Utl.openInputPanel("请输入投降扣除数量(底翻)", function (_data) { + if (_data <= C_Player.bean) { + GameData.surrendCount = _data; + Utl.closeInputPanel(); + GameData.checkType = 3; + GameUI.openCheck("将扣除" + _data + GameData.starName + ",确定逃跑?"); + } else { + GameUI.OpenTips("输入大于您拥有的" + _data + GameData.starName + "数:" + C_Player.bean + "!", ConstVal.Tips.time); + } + }); + break; + case 514: + Logic.pasteRoomCode(); + break; + case 515: + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.gameid = GameData.GameId; + data.roomcode = Desk.roomcode; + Net.Send_player_prepare(data); + break; + case ConstVal.worldRoom.f_sp_1: + //点击系统房间 + var up_id = ifast_check_add(spid_up, upx, upy); + if (!GameData.worldRoomSysSlide) { + if (up_id >= ConstVal.worldRoom.bg_sp_tag_1 && up_id < ConstVal.worldRoom.top_sp_tag_1) { + //console.log(GameData.worldRoomSys[up_id - ConstVal.worldRoom.bg_sp_tag_1]); + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.gameid = GameData.GameId; + data.type = GameData.worldRoomSys[up_id - ConstVal.worldRoom.bg_sp_tag_1].type; + data.roomtype = GameData.worldRoomSys[up_id - ConstVal.worldRoom.bg_sp_tag_1].roomtype; + Net.Send_quick_enter_share_room(data); + } } - if (up_id >= ConstVal.vipRoomList1.enter_tag) { - var indx = up_id - ConstVal.vipRoomList1.enter_tag; - var data = {}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.gameid = GameData.GameId; - data.roomcode = GameData.vipRoomData[indx].shortCode; - data.joinmode = 0; - Net.Send_self_join_room(data); + break; + case ConstVal.worldRoom.f_sp_2: + //点击玩家房间 + var up_id = ifast_check_add(spid_up, upx, upy); + if (!GameData.worldRoomPlySlide) { + if (up_id >= ConstVal.worldRoom.bg_sp_tag_2 && up_id < ConstVal.worldRoom.top_sp_tag_2) { + console.log(GameData.worldRoomPly[up_id - ConstVal.worldRoom.bg_sp_tag_2]); + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.gameid = GameData.GameId; + data.roomcode = GameData.worldRoomPly[up_id - ConstVal.worldRoom.bg_sp_tag_2].roomcode; + data.joinmode = 0; + Net.Send_self_join_room(data); + } } + break; + case ConstVal.rankList.f_spid: + //点击玩家房间 + var up_id = ifast_check_add(spid_up, upx, upy); + if (!GameData.rankListSlide) { + if (up_id >= ConstVal.rankList.bg_tag && up_id < ConstVal.rankList.badge_tag) { + //console.log(GameData.rankList[up_id - ConstVal.rankList.bg_tag]); + GameUI.clickRankList(up_id - ConstVal.rankList.bg_tag); + } - } - break; - case ConstVal.vipRoomList2.f_spid: - // - var up_id = ifast_check_add(spid_up, upx, upy); - if (!GameData.vipRoomPageTwo.slide) { - if (up_id >= ConstVal.vipRoomList2.bg_tag && up_id < ConstVal.vipRoomList2.code_tag) { - var indx = up_id - ConstVal.vipRoomList2.bg_tag; - console.log("进入", GameData.vipRoomPageTwo.data.roomcodes.roomlist[indx]); - GameData.vipRoomJump = true; - var data = {}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.gameid = GameData.GameId; - data.roomcode = GameData.vipRoomPageTwo.data.roomcodes.roomlist[indx]; - data.joinmode = 0; - Net.Send_self_join_room(data); - //GameUI.goVipPageTwo(); } - if (up_id >= ConstVal.vipRoomList2.code_tag && up_id < ConstVal.vipRoomList2.count_tag) { - var indx = up_id - ConstVal.vipRoomList2.code_tag; - console.log("进入", GameData.vipRoomPageTwo.data.roomcodes.roomlist[indx]); - //GameUI.goVipPageTwo(); - GameData.vipRoomJump = true; - var data = {}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.gameid = GameData.GameId; - data.roomcode = GameData.vipRoomPageTwo.data.roomcodes.roomlist[indx]; - data.joinmode = 0; - Net.Send_self_join_room(data); - } - if (up_id >= ConstVal.vipRoomList2.count_tag) { - var indx = up_id - ConstVal.vipRoomList2.count_tag; - console.log("进入", GameData.vipRoomPageTwo.data.roomcodes.roomlist[indx]); - GameData.vipRoomJump = true; - var data = {}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.gameid = GameData.GameId; - data.roomcode = GameData.vipRoomPageTwo.data.roomcodes.roomlist[indx]; - data.joinmode = 0; - Net.Send_self_join_room(data); - //GameUI.goVipPageTwo(); + break; + case ConstVal.vipRoomList1.f_spid: + // + var up_id = ifast_check_add(spid_up, upx, upy); + if (!GameData.vipRoomPageOne.slide) { + if (up_id >= ConstVal.vipRoomList1.bg_tag && up_id < ConstVal.vipRoomList1.title_tag) { + var indx = up_id - ConstVal.vipRoomList1.bg_tag; + GameData.vipRoomCode = GameData.vipRoomData[indx].shortCode; + console.log("进入", indx, GameData.vipRoomCode); + GameUI.goVipPageTwo(); + } + /* + if(up_id>=ConstVal.vipRoomList1.title_tag&&up_id=ConstVal.vipRoomList1.code_tag&&up_id=ConstVal.vipRoomList1.owner_tag&&up_id=ConstVal.vipRoomList1.count_tag&&up_id= ConstVal.vipRoomList1.del_tag && up_id < ConstVal.vipRoomList1.enter_tag) { + var indx = up_id - ConstVal.vipRoomList1.del_tag; + //GameData.vipRoomCode = GameData.vipRoomShortList[indx]; + GameData.vipRoomCode = GameData.vipRoomData[indx].shortCode; + console.log("删除", indx, GameData.vipRoomCode); + Logic.delVipRoom(GameData.vipRoomShortList[indx]); + GameUI.setVipRoomListData(GameData.vipRoomData); + GameUI.updateVipRoomList(); + + } + if (up_id >= ConstVal.vipRoomList1.enter_tag) { + var indx = up_id - ConstVal.vipRoomList1.enter_tag; + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.gameid = GameData.GameId; + data.roomcode = GameData.vipRoomData[indx].shortCode; + data.joinmode = 0; + Net.Send_self_join_room(data); + + } + } + break; + case ConstVal.vipRoomList2.f_spid: + // + var up_id = ifast_check_add(spid_up, upx, upy); + if (!GameData.vipRoomPageTwo.slide) { + if (up_id >= ConstVal.vipRoomList2.bg_tag && up_id < ConstVal.vipRoomList2.code_tag) { + var indx = up_id - ConstVal.vipRoomList2.bg_tag; + console.log("进入", GameData.vipRoomPageTwo.data.roomcodes.roomlist[indx]); + GameData.vipRoomJump = true; + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.gameid = GameData.GameId; + data.roomcode = GameData.vipRoomPageTwo.data.roomcodes.roomlist[indx]; + data.joinmode = 0; + Net.Send_self_join_room(data); + //GameUI.goVipPageTwo(); + } + if (up_id >= ConstVal.vipRoomList2.code_tag && up_id < ConstVal.vipRoomList2.count_tag) { + var indx = up_id - ConstVal.vipRoomList2.code_tag; + console.log("进入", GameData.vipRoomPageTwo.data.roomcodes.roomlist[indx]); + //GameUI.goVipPageTwo(); + GameData.vipRoomJump = true; + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.gameid = GameData.GameId; + data.roomcode = GameData.vipRoomPageTwo.data.roomcodes.roomlist[indx]; + data.joinmode = 0; + Net.Send_self_join_room(data); + } + if (up_id >= ConstVal.vipRoomList2.count_tag) { + var indx = up_id - ConstVal.vipRoomList2.count_tag; + console.log("进入", GameData.vipRoomPageTwo.data.roomcodes.roomlist[indx]); + GameData.vipRoomJump = true; + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.gameid = GameData.GameId; + data.roomcode = GameData.vipRoomPageTwo.data.roomcodes.roomlist[indx]; + data.joinmode = 0; + Net.Send_self_join_room(data); + //GameUI.goVipPageTwo(); + } - } - break; - - case 519: - //关闭 - GameUI.closeWorldRoom(); - break; - case 520: - //刷新 - var data = {}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.gameid = GameData.GameId; - Net.Send_get_share_room(data); - break; - case 521: - //快速加入 - var data = {}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.gameid = GameData.GameId; - data.type = 1; - data.roomtype = null; - Net.Send_quick_enter_share_room(data); - break; - case 568: - //获取星星争霸场 - if (GameData.hallConfig.worldRoomList) { + } + break; + + case 519: + //关闭 + GameUI.closeWorldRoom(); + break; + case 520: + //刷新 var data = {}; data.agentid = GameData.AgentId; data.playerid = C_Player.playerid; data.gameid = GameData.GameId; Net.Send_get_share_room(data); - } else { - GameUI.OpenTips("暂未开放,敬请期待", ConstVal.Tips.time); - } - break; - case 569: - var data = {}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.gameid = GameData.GameId; - data.roomcode = Desk.roomcode; - Net.Send_share_room(data); - break; - case 570: - GameUI.goBoardPageOne(); - break; - case 571: - GameUI.goBoardPageTwo(); - break; - case 572: - GameUI.goBoardPageThree(); - break; - case 576: - var url = ""; - switch (GameData.noticePage) { - case 0: - url = GameData.advertInfo_0.url; break; - case 1: - url = GameData.advertInfo_1.url; - break; - case 2: - url = GameData.advertInfo_2.url; - break; - } - Func.browser(url); - break; - case 579: - //case 577: - GameUI.closeSeniorOptions(); - break; - case ConstVal.snrRoomList.f_spid: - // - var up_id = ifast_check_add(spid_up, upx, upy); - if (!GameData.snrRoomListSlide) { - //进入 - if (up_id >= ConstVal.snrRoomList.bg_tag && up_id < ConstVal.snrRoomList.rcode_bg_tag) { - GameData.snrOptionRoomTag = up_id - ConstVal.snrRoomList.bg_tag; - var data = {}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.gameid = GameData.GameId; - data.roomcode = GameData.snrRoomList.roomlist[GameData.snrOptionRoomTag]; - data.joinmode = 0; - Net.Send_self_join_room(data); - } - if (up_id >= ConstVal.snrRoomList.rcode_tag && up_id < ConstVal.snrRoomList.close_tag) { - GameData.snrOptionRoomTag = up_id - ConstVal.snrRoomList.rcode_tag; - var data = {}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.gameid = GameData.GameId; - data.roomcode = GameData.snrRoomList.roomlist[GameData.snrOptionRoomTag]; - data.joinmode = 0; - Net.Send_self_join_room(data); - } - if (up_id >= ConstVal.snrRoomList.video_tag) { - GameData.snrOptionRoomTag = up_id - ConstVal.snrRoomList.video_tag; - var data = {}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.gameid = GameData.GameId; - data.roomcode = GameData.snrRoomList.roomlist[GameData.snrOptionRoomTag]; - data.joinmode = 0; - Net.Send_self_join_room(data); - } - //修改 - //if(up_id>=ConstVal.snrRoomList.update_tag&&up_id=ConstVal.snrRoomList.switch_tag&&up_id 0) { - + case 521: + //快速加入 var data = {}; data.agentid = GameData.AgentId; data.playerid = C_Player.playerid; data.gameid = GameData.GameId; - data.roomcode = RoomNum; - Net.Send_self_join_room(data); - } - break; - case 626: - GameData.snrOption.profit = GameUI.Mem.snrOption.number; - var data = {}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.gameid = GameData.GameId; - //if(GameData.snrOptionMode == 0){ - data.tea = GameUI.Mem.snrOption.number + GameUI.Mem.snrOption.sysRebate; - //}else{ - //data.tea = 0; - //} - data.infinite = GameUI.Mem.snrOption.infinite; - if (Game_Config.sysConfig.vipInfinite) { - data.infinite = 1; - } - data.roomtype = GameData.snrOptionRoomtype; - data.videoConfig = GameUI.Mem.snrOption.videoConfig; - if (Game_Config.sysConfig.vipInfinite) { - data.videoConfig = null; - } - - //data.forbidSelect = GameUI.Mem.snrOption.forbidSelect; - - data.rebateLimit = GameUI.Mem.snrOption.rebateLimit; - data.rebateType = GameUI.Mem.snrOption.rebateType; - Net.Send_advanced_createroom(data); - break; - case 604: - case 3233: - if (GameData.hallConfig.rankList == 1) { - GameUI.openRankList(); - } else if (GameData.hallConfig.rankList == 2) { + data.type = 1; + data.roomtype = null; + Net.Send_quick_enter_share_room(data); + break; + case 568: + //获取星星争霸场 + if (GameData.hallConfig.worldRoomList) { + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.gameid = GameData.GameId; + Net.Send_get_share_room(data); + } else { + GameUI.OpenTips("暂未开放,敬请期待", ConstVal.Tips.time); + } + break; + case 569: var data = {}; data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; data.gameid = GameData.GameId; - Net.Send_get_treasurelist(data); - } - break; - case 605: - GameUI.closeRankList(); - break; - case 652: - //分享微信好友 - { - var vText = ""; - if (GameUI.Mem.snrOption.videoConfig) { - vText = "*【视频房】"; + data.roomcode = Desk.roomcode; + Net.Send_share_room(data); + break; + case 570: + GameUI.goBoardPageOne(); + break; + case 571: + GameUI.goBoardPageTwo(); + break; + case 572: + GameUI.goBoardPageThree(); + break; + case 576: + var url = ""; + switch (GameData.noticePage) { + case 0: + url = GameData.advertInfo_0.url; + break; + case 1: + url = GameData.advertInfo_1.url; + break; + case 2: + url = GameData.advertInfo_2.url; + break; } - - Func.sharefinend(1, 1, Game_Config.Share.appdownload, Game_Config.Share.title + vText + "微房号:" + GameData.snrRoomList.shortcode, Game_Config.Share.description); - - } - break; - case 653: - //分享微信朋友圈 - { - - - var isBean = 0; - if (Game_Modify.getRoomMode) { - isBean = Game_Modify.getRoomMode(GameData.snrRoomList.roomtype); - } - switch (isBean) { - case 1: - if (GameData.snrRoomList.roomlist.length > 0) { + Func.browser(url); + break; + case 579: + //case 577: + GameUI.closeSeniorOptions(); + break; + case ConstVal.snrRoomList.f_spid: + // + var up_id = ifast_check_add(spid_up, upx, upy); + if (!GameData.snrRoomListSlide) { + //进入 + if (up_id >= ConstVal.snrRoomList.bg_tag && up_id < ConstVal.snrRoomList.rcode_bg_tag) { + GameData.snrOptionRoomTag = up_id - ConstVal.snrRoomList.bg_tag; var data = {}; data.agentid = GameData.AgentId; data.playerid = C_Player.playerid; data.gameid = GameData.GameId; - data.roomlist = GameData.snrRoomList.roomlist; - data.roomtype = GameData.snrRoomList.roomtype; - data.shareType = 1; - Net.Send_share_room(data); - } else { - GameUI.OpenTips("没有已创建房间,无法分享!", ConstVal.Tips.time); + data.roomcode = GameData.snrRoomList.roomlist[GameData.snrOptionRoomTag]; + data.joinmode = 0; + Net.Send_self_join_room(data); } - break; - default: - GameUI.OpenTips("仅金币房间支持分享到金币场!", ConstVal.Tips.time); - break; + if (up_id >= ConstVal.snrRoomList.rcode_tag && up_id < ConstVal.snrRoomList.close_tag) { + GameData.snrOptionRoomTag = up_id - ConstVal.snrRoomList.rcode_tag; + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.gameid = GameData.GameId; + data.roomcode = GameData.snrRoomList.roomlist[GameData.snrOptionRoomTag]; + data.joinmode = 0; + Net.Send_self_join_room(data); + } + if (up_id >= ConstVal.snrRoomList.video_tag) { + GameData.snrOptionRoomTag = up_id - ConstVal.snrRoomList.video_tag; + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.gameid = GameData.GameId; + data.roomcode = GameData.snrRoomList.roomlist[GameData.snrOptionRoomTag]; + data.joinmode = 0; + Net.Send_self_join_room(data); + } + //修改 + //if(up_id>=ConstVal.snrRoomList.update_tag&&up_id=ConstVal.snrRoomList.switch_tag&&up_id 0) { + + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.gameid = GameData.GameId; + data.roomcode = RoomNum; + Net.Send_self_join_room(data); + } + break; + case 626: + GameData.snrOption.profit = GameUI.Mem.snrOption.number; + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.gameid = GameData.GameId; + //if(GameData.snrOptionMode == 0){ + data.tea = GameUI.Mem.snrOption.number + GameUI.Mem.snrOption.sysRebate; + //}else{ + //data.tea = 0; + //} + data.infinite = GameUI.Mem.snrOption.infinite; + if (Game_Config.sysConfig.vipInfinite) { + data.infinite = 1; + } + data.roomtype = GameData.snrOptionRoomtype; + data.videoConfig = GameUI.Mem.snrOption.videoConfig; + if (Game_Config.sysConfig.vipInfinite) { + data.videoConfig = null; } - } - break; - case 654: - GameUI.closeShareImg(); - break; - case 655: - GameUI.HideImg(); - break; - case 656: - GameUI.closeMainSceneBtnPanel(); - Func.appDownload(Game_Config.Share.appdownload); - break; - case 3004: - case 659: - GameUI.closeInputPanel(); - break; - case 3005: - case 3011: - GameUI.hideNeighbor(); - break; - case 3007: - case 3008: - case 3009: - case 3010: - GameUI.OpenTips("邀请成功!", ConstVal.Tips.time); - break; - case 3012: - case 3013: - GameUI.closeTips2(); - break; - case 3014: - GameUI.closeMainSceneBtnPanel(); - var data = {}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.gameid = GameData.GameId; - data.roomcode = Desk.roomcode; - Net.Send_change_room(data); - break; - case 3016: - //商城 - Logic.jumpToStore(); - break; - case 3017: - //背包 - Logic.jumpToBag(); - break; - case 3018: - //活动 - Logic.jumpToAct(); - break; - case 3019: - // - GameUI.closeWorldRoom(); - Game_Modify.OpenCreateRoom(); - break; - case 3034: - case 3035: - GameData.wareHouse.safeInputType = spid_up - 3033; - GameUI.updateWareHouseCheckBox(); - break; - case 3059: - case 3060: - GameUI.switchWareHousePage(spid_up - 3058, true); - break; - case 3029: - case 97: - GameUI.closeWareHouse(); - break; - case 3067: - //初始化密码 - GameUI.selectWareHouseInputType(1); - break; - case 3068: - //初始化密码二次输入 - GameUI.selectWareHouseInputType(2); - break; - case 3038: - //存入取出数量 - GameUI.selectWareHouseInputType(3); - break; - case 3039: - //存入取出密码 - GameUI.selectWareHouseInputType(4); - break; - case 3087: - //赠送id - GameUI.selectWareHouseInputType(5); - break; - case 3088: - //赠送数量 - GameUI.selectWareHouseInputType(6); - break; - case 3089: - //赠送密码 - GameUI.selectWareHouseInputType(7); - break; - case 3057: - GameUI.openWareHouse(true); - break; - case 3075: - case 3076: - GameData.wareHouse.pInputType = spid_up - 3074; - GameUI.updateWareHouseCheckBox(); - break; - case 3096: - if(String(GameData.wareHouse.pInputId).length==6){ - var data={}; - set_self(3081,1,170,0,0); - set_self(3082,7,'',0,0); + //data.forbidSelect = GameUI.Mem.snrOption.forbidSelect; + + data.rebateLimit = GameUI.Mem.snrOption.rebateLimit; + data.rebateType = GameUI.Mem.snrOption.rebateType; + Net.Send_advanced_createroom(data); + break; + case 604: + case 3233: + if (GameData.hallConfig.rankList == 1) { + GameUI.openRankList(); + } else if (GameData.hallConfig.rankList == 2) { + var data = {}; + data.agentid = GameData.AgentId; + data.gameid = GameData.GameId; + Net.Send_get_treasurelist(data); + } + break; + case 605: + GameUI.closeRankList(); + break; + case 652: + //分享微信好友 + { + var vText = ""; + if (GameUI.Mem.snrOption.videoConfig) { + vText = "*【视频房】"; + } + + Func.sharefinend(1, 1, Game_Config.Share.appdownload, Game_Config.Share.title + vText + "微房号:" + GameData.snrRoomList.shortcode, Game_Config.Share.description); + + } + break; + case 653: + //分享微信朋友圈 + { + + + var isBean = 0; + if (Game_Modify.getRoomMode) { + isBean = Game_Modify.getRoomMode(GameData.snrRoomList.roomtype); + } + switch (isBean) { + case 1: + if (GameData.snrRoomList.roomlist.length > 0) { + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.gameid = GameData.GameId; + data.roomlist = GameData.snrRoomList.roomlist; + data.roomtype = GameData.snrRoomList.roomtype; + data.shareType = 1; + Net.Send_share_room(data); + } else { + GameUI.OpenTips("没有已创建房间,无法分享!", ConstVal.Tips.time); + } + break; + default: + GameUI.OpenTips("仅金币房间支持分享到金币场!", ConstVal.Tips.time); + break; + } + + } + break; + case 654: + GameUI.closeShareImg(); + break; + case 655: + GameUI.HideImg(); + break; + case 656: + GameUI.closeMainSceneBtnPanel(); + Func.appDownload(Game_Config.Share.appdownload); + break; + case 3004: + case 659: + GameUI.closeInputPanel(); + break; + case 3005: + case 3011: + GameUI.hideNeighbor(); + break; + case 3007: + case 3008: + case 3009: + case 3010: + GameUI.OpenTips("邀请成功!", ConstVal.Tips.time); + break; + case 3012: + case 3013: + GameUI.closeTips2(); + break; + case 3014: + GameUI.closeMainSceneBtnPanel(); + var data = {}; data.agentid = GameData.AgentId; - data.playerid = GameData.wareHouse.pInputId; - Net.Send_query_player2(data); - }else{ - GameUI.OpenTips("玩家ID输入不正确",ConstVal.Tips.time); - } + data.playerid = C_Player.playerid; + data.gameid = GameData.GameId; + data.roomcode = Desk.roomcode; + Net.Send_change_room(data); + break; + case 3016: + //商城 + Logic.jumpToStore(); + break; + case 3017: + //背包 + Logic.jumpToBag(); + break; + case 3018: + //活动 + Logic.jumpToAct(); + break; + case 3019: + // + GameUI.closeWorldRoom(); + Game_Modify.OpenCreateRoom(); + break; + case 3034: + case 3035: + GameData.wareHouse.safeInputType = spid_up - 3033; + GameUI.updateWareHouseCheckBox(); + break; + case 3059: + case 3060: + GameUI.switchWareHousePage(spid_up - 3058, true); + break; + case 3029: + case 97: + GameUI.closeWareHouse(); + break; + case 3067: + //初始化密码 + GameUI.selectWareHouseInputType(1); + break; + case 3068: + //初始化密码二次输入 + GameUI.selectWareHouseInputType(2); + break; + case 3038: + //存入取出数量 + GameUI.selectWareHouseInputType(3); + break; + case 3039: + //存入取出密码 + GameUI.selectWareHouseInputType(4); + break; + case 3087: + //赠送id + GameUI.selectWareHouseInputType(5); + break; + case 3088: + //赠送数量 + GameUI.selectWareHouseInputType(6); + break; + case 3089: + //赠送密码 + GameUI.selectWareHouseInputType(7); + break; + case 3057: + GameUI.openWareHouse(true); + break; + case 3075: + case 3076: + GameData.wareHouse.pInputType = spid_up - 3074; + GameUI.updateWareHouseCheckBox(); + break; + case 3096: + if (String(GameData.wareHouse.pInputId).length == 6) { + var data = {}; + set_self(3081, 1, 170, 0, 0); + set_self(3082, 7, '', 0, 0); + data.agentid = GameData.AgentId; + data.playerid = GameData.wareHouse.pInputId; + Net.Send_query_player2(data); + } else { + GameUI.OpenTips("玩家ID输入不正确", ConstVal.Tips.time); + } //GameData.wareHouse.pId = 123456; //GameData.wareHouse.pImg = C_Player.avatar; //GameData.wareHouse.pNickName = "afeafefa"; //GameUI.updateWareHousePlayerInfo(); - break; - case 3043: - console.log(GameData.wareHouse); - if(GameData.wareHouse.page == 1){ - console.log(GameData.wareHouse.selectType); - switch (GameData.wareHouse.selectType) { - case 1: - case 2: - //设置初始密码 - console.log("设置初始密码"); - if (GameData.wareHouse.initPassWord1 == GameData.wareHouse.initPassWord2) { - if (GameData.wareHouse.initPassWord1 != -1 && String(GameData.wareHouse.initPassWord1).length != 0) { - - var data = {}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.unionid = C_Player.unionid; - data.password = String(GameData.wareHouse.initPassWord1); - console.log("输入合法"); - console.log(data); - Net.Send_set_bankpwd(data); - } - } - break; - case 3: - case 4: - //保险箱存取 - console.log("存取" + GameData.wareHouse.safeInputType); - console.log("数量" + GameData.wareHouse.safeInputCount); - console.log("密码" + GameData.wareHouse.safePassWord); - if (GameData.wareHouse.safeInputCount == -1 || String(GameData.wareHouse.safeInputCount).length == 0) { - GameUI.OpenTips("输入数量为空!", ConstVal.Tips.time); - break; - } else { - if (GameData.wareHouse.safePassWord == -1 || String(GameData.wareHouse.safePassWord).length == 0) { - GameUI.OpenTips("密码不能为空!", ConstVal.Tips.time); - } else { - var data = {}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.mode = GameData.wareHouse.safeInputType - 1; - data.password = String(GameData.wareHouse.safePassWord); - - data.count = Number(GameData.wareHouse.safeInputCount); - - if (GameData.wareHouse.safeInputType == 1) { //存入需要扣除默认赠送的金币 - if (C_Player.bean < 0) { - data.count = 0; - GameData.wareHouse.safeInputCount = 0; - GameUI.updateWareHouseInput(); - } else { - - if (C_Player.bean < GameData.initBean) { - GameUI.OpenTips("您身上必须保留"+GameData.initBean+GameData.starName+"!",ConstVal.Tips.time); - data.count = 0; - GameData.wareHouse.safeInputCount = 0; - GameUI.updateWareHouseInput(); - } else { - if (C_Player.bean - GameData.wareHouse.safeInputCount <= GameData.initBean) { - GameUI.OpenTips("您身上必须保留"+GameData.initBean+GameData.starName+"!",ConstVal.Tips.time); - data.count = C_Player.bean - GameData.initBean; - GameData.wareHouse.safeInputCount = C_Player.bean - GameData.initBean; - GameUI.updateWareHouseInput(); - } - } + break; + case 3043: + console.log(GameData.wareHouse); + if (GameData.wareHouse.page == 1) { + console.log(GameData.wareHouse.selectType); + switch (GameData.wareHouse.selectType) { + case 1: + case 2: + //设置初始密码 + console.log("设置初始密码"); + if (GameData.wareHouse.initPassWord1 == GameData.wareHouse.initPassWord2) { + if (GameData.wareHouse.initPassWord1 != -1 && String(GameData.wareHouse.initPassWord1).length != 0) { + + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.unionid = C_Player.unionid; + data.password = String(GameData.wareHouse.initPassWord1); + console.log("输入合法"); + console.log(data); + Net.Send_set_bankpwd(data); } - - } - //console.log(data); - Net.Send_change_star(data); - } - + break; + case 3: + case 4: + //保险箱存取 + console.log("存取" + GameData.wareHouse.safeInputType); + console.log("数量" + GameData.wareHouse.safeInputCount); + console.log("密码" + GameData.wareHouse.safePassWord); + if (GameData.wareHouse.safeInputCount == -1 || String(GameData.wareHouse.safeInputCount).length == 0) { + GameUI.OpenTips("输入数量为空!", ConstVal.Tips.time); + break; + } else { + if (GameData.wareHouse.safePassWord == -1 || String(GameData.wareHouse.safePassWord).length == 0) { + GameUI.OpenTips("密码不能为空!", ConstVal.Tips.time); + } else { + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.mode = GameData.wareHouse.safeInputType - 1; + data.password = String(GameData.wareHouse.safePassWord); + + data.count = Number(GameData.wareHouse.safeInputCount); + + if (GameData.wareHouse.safeInputType == 1) { //存入需要扣除默认赠送的金币 + if (C_Player.bean < 0) { + data.count = 0; + GameData.wareHouse.safeInputCount = 0; + GameUI.updateWareHouseInput(); + } else { + + if (C_Player.bean < GameData.initBean) { + GameUI.OpenTips("您身上必须保留" + GameData.initBean + GameData.starName + "!", ConstVal.Tips.time); + data.count = 0; + GameData.wareHouse.safeInputCount = 0; + GameUI.updateWareHouseInput(); + } else { + if (C_Player.bean - GameData.wareHouse.safeInputCount <= GameData.initBean) { + GameUI.OpenTips("您身上必须保留" + GameData.initBean + GameData.starName + "!", ConstVal.Tips.time); + data.count = C_Player.bean - GameData.initBean; + GameData.wareHouse.safeInputCount = C_Player.bean - GameData.initBean; + GameUI.updateWareHouseInput(); + } + } + } + + + } + //console.log(data); + Net.Send_change_star(data); + } + + } + + + + break; } - - - - break; - } - }else{ - + } else { + switch (GameData.wareHouse.selectType) { case 1: case 2: @@ -2113,7 +2113,7 @@ GameUI.utlmouseup = function(gameid, spid_down, downx, downy, spid_up, upx, upy, console.log("设置初始密码"); if (GameData.wareHouse.initPassWord1 == GameData.wareHouse.initPassWord2) { if (GameData.wareHouse.initPassWord1 != -1 && String(GameData.wareHouse.initPassWord1).length != 0) { - + var data = {}; data.agentid = GameData.AgentId; data.playerid = C_Player.playerid; @@ -2126,10 +2126,10 @@ GameUI.utlmouseup = function(gameid, spid_down, downx, downy, spid_up, upx, upy, } break; default: - if(String(GameData.wareHouse.pInputId).length != 6){ - GameUI.OpenTips("玩家ID为6位!",ConstVal.Tips.time); - }else{ - var data={}; + if (String(GameData.wareHouse.pInputId).length != 6) { + GameUI.OpenTips("玩家ID为6位!", ConstVal.Tips.time); + } else { + var data = {}; data.agentid = GameData.AgentId; data.count = GameData.wareHouse.pInputCount; data.playerid = C_Player.playerid; @@ -2141,544 +2141,544 @@ GameUI.utlmouseup = function(gameid, spid_down, downx, downy, spid_up, upx, upy, break; } } - - - break; - case 3097: - Utl.openInputPanel("输入范围为 " + GameUI.Mem.snrOption.min + "~" + GameUI.Mem.snrOption.max, snrInputCallback); - break; - case 3100: - GameUI.Mem.snrOption.infinite == 1 ? GameUI.Mem.snrOption.infinite = 0 : GameUI.Mem.snrOption.infinite = 1; - break; - case 3166: - GameUI.Mem.snrOption.rebateType = 1; - break; - case 3167: - GameUI.Mem.snrOption.rebateType = 0; - break; - case 3102: - case 3105: - case 3106: - if (!GameData.imgAdIsSlide) { - //console.log(GameData.menuNotice["advert"+GameData.noticePage]) - //switch(GameData.noticePage){ - //case 0: - //console.log(GameData.menuNotice.advert0); - //break; - //case 1: - //console.log(GameData.menuNotice.advert1); - //break; - //case 2: - //console.log(GameData.menuNotice.advert2); - //break; - //} - if (GameData.menuNotice["advert" + GameData.noticePage].imgAdUrl) { - Func.browser(GameData.menuNotice["advert" + GameData.noticePage].imgAdUrl); - //Func.OpenurlTitleData(GameData.menuNotice["advert"+GameData.noticePage].imgAdUrl,"",""); + + + break; + case 3097: + Utl.openInputPanel("输入范围为 " + GameUI.Mem.snrOption.min + "~" + GameUI.Mem.snrOption.max, snrInputCallback); + break; + case 3100: + GameUI.Mem.snrOption.infinite == 1 ? GameUI.Mem.snrOption.infinite = 0 : GameUI.Mem.snrOption.infinite = 1; + break; + case 3166: + GameUI.Mem.snrOption.rebateType = 1; + break; + case 3167: + GameUI.Mem.snrOption.rebateType = 0; + break; + case 3102: + case 3105: + case 3106: + if (!GameData.imgAdIsSlide) { + //console.log(GameData.menuNotice["advert"+GameData.noticePage]) + //switch(GameData.noticePage){ + //case 0: + //console.log(GameData.menuNotice.advert0); + //break; + //case 1: + //console.log(GameData.menuNotice.advert1); + //break; + //case 2: + //console.log(GameData.menuNotice.advert2); + //break; + //} + if (GameData.menuNotice["advert" + GameData.noticePage].imgAdUrl) { + Func.browser(GameData.menuNotice["advert" + GameData.noticePage].imgAdUrl); + //Func.OpenurlTitleData(GameData.menuNotice["advert"+GameData.noticePage].imgAdUrl,"",""); + } + + } + break; + case 3103: + if (GameData.firstConnect_Succ && GameData.getJSONState && GameData.LoadCount == 100) { + if (GameData.adTimer) { + window.clearInterval(GameData.adTimer); + GameData.adTimer = null; + } + set_self(1, 57, 0, 0, 0); + GameUI.JumpWxAuth(); + + } + break; + case 3107: + GameUI.SelectSysNotice(); + break; + case 3111: + if (!Game_Config.sysConfig.vipInfinite) { + GameData.selectSysNotice = !GameData.selectSysNotice; + } else { + GameData.selectSysNotice = true; + } + if (!GameData.selectSysNotice) { + Func.setInput(204, Game_Config.Chat.LimitLength); + } else { + Func.setInput(204, ConstVal.sysNotice.limit); } - } - break; - case 3103: - if (GameData.firstConnect_Succ && GameData.getJSONState && GameData.LoadCount == 100) { - if (GameData.adTimer) { - window.clearInterval(GameData.adTimer); - GameData.adTimer = null; - } - set_self(1, 57, 0, 0, 0); - GameUI.JumpWxAuth(); - - } - break; - case 3107: - GameUI.SelectSysNotice(); - break; - case 3111: - if (!Game_Config.sysConfig.vipInfinite) { - GameData.selectSysNotice = !GameData.selectSysNotice; - } else { - GameData.selectSysNotice = true; - } - if (!GameData.selectSysNotice) { - Func.setInput(204, Game_Config.Chat.LimitLength); - } else { - Func.setInput(204, ConstVal.sysNotice.limit); - } - - break; - case 3120: - //更多 - GameUI.openPallet(); - break; - case 3122: - GameUI.closePallet(); - break; - case 92: - GameUI.goWorldRoom1(); - break; - case 93: - GameUI.goWorldRoom2(); - break; - case 99: - GameUI.showMyRoomList(); - break; - case 103: - GameUI.hideMyRoomList(); - break; - case 98: - var up_id = ifast_check_add(spid_up, upx, upy); - if (up_id >= ConstVal.myRoomList.bgTag && up_id < ConstVal.myRoomList.roomCodeTag) { - console.log(GameData.roomList[up_id - ConstVal.myRoomList.bgTag]); - var data = {}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.gameid = GameData.GameId; - data.roomcode = GameData.roomList[up_id - ConstVal.myRoomList.bgTag]; - data.joinmode = 1; - Net.Send_self_join_room(data); - } - break; - case 106: - Func.accreditlogin(1); - break; - case 107: - if (get_self(108, 37, 0, 0, 0)) { - GameUI.closeMainSceneBtnPanel(); - } else { - GameUI.openMainSceneBtnPanel(); - } - - break; - case 3123: - GameUI.closeMainSceneBtnPanel(); - break; - case 284: - if (get_self(109, 37, 0, 0, 0)) { - GameUI.closeRoomInfo(); - } else { - GameUI.openRoomInfo(); - } - break; - case 109: - case 3124: - GameUI.closeRoomInfo(); - break; - case 3141: - if (get_self(109, 37, 0, 0, 0)) { - GameUI.closeRoomInfo(); - } else { - GameUI.openRoomInfo(); - } - break; - case 187: - GameData.clickChat++; - if (GameData.clickChat % 3 == 0 && GameData.isService) { - GameData.clickChat = 0; - GameData.communionHistory = []; - GameUI.clearCommunion(); - GameUI.CloseChat(); - GameUI.OpenChat(); - - - } - break; - case 3126: - GameUI.stopRecord(); - break; - case 3133: - GameUI.clickSnrVideo(3133); - break; - case 3164: - GameUI.clickSnrRoomState(); - break; - case 3139: - //官方试玩 - if (GameData.sysConfig.ofcShortCode) { - var data = {}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.gameid = GameData.GameId; - data.roomcode = GameData.sysConfig.ofcShortCode; - Net.Send_self_join_room(data); - } else { - GameUI.OpenTips("暂未开放,敬请期待", ConstVal.Tips.time); - } - break; - case 3140: - case 3235: - //改成游戏内管理好友 - if (GameData.sysConfig.whiteListManager == 1) { - var data = {}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.gameid = GameData.GameId; - Net.Send_getPlayerWhiteList(data); - }else{ - if (GameData.sysConfig.managerUrl) { - Func.OpenurlTitleData(GameData.sysConfig.managerUrl+"?agentid="+GameData.AgentId+"&channelid=" - +GameData.ChannelId+"&__HTML_VERSION__=3", - "管理后台",""); - Func.browser(GameData.sysConfig.managerUrl + "?agentid=" + GameData.AgentId + "&channelid=" + GameData.ChannelId + "&playerid=" + C_Player.playerid + "&openid=" + C_Player.openid + "&unionid=" + C_Player.unionid); - } - } - - break; - case 3149: - if (get_self(3148, 37)) { - GameUI.hideOwnerNotice(); - } else { - //if(Logic.getVisibleNote()){ - GameUI.showOwnerNotice(Desk.ownerNotice); - //} - - } - - break; - case 3155: - var text = get_self(3154, 7); - - if (GameData.textCallback) { - GameData.textCallback(text); - GameData.textCallback = null; - } - GameUI.closeTextInput(); - break; - case 3159: - - GameUI.closeTextInput(); - break; - case 3156: - GameUI.openTextInput(C_Player.sign, setSignCallBack, 20); - break; - case 3150: - case 3148: - GameUI.hideOwnerNotice(); - break; - case 3158: - GameUI.closeSeniorOptions(); - break; - case 679: - GameUI.openVipRoomList(true); - break; - case 3182: - GameUI.closeVipRoomList(); - break; - case 3175: - GameUI.goVipPageOne(); - break; - case 3196: - case 3197: - Utl.openInputPanel("请输入您要设置的值",playeridInputCallBack); - break; - case 3194: - var txt = get_self(3197,7,0,0,0); - if(txt.length == 6){ - var data={}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.optId = txt; - data.type = 3; - Net.Send_optBanList(data); - }else{ - GameUI.OpenTips("请输入正确的玩家ID!",ConstVal.Tips.time); - } - break; - case 3195: - var txt = get_self(3197,7,0,0,0); - if(txt.length == 6){ - var data={}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.optId = txt; - data.type = 4; - Net.Send_optBanList(data); - }else{ - GameUI.OpenTips("请输入正确的玩家ID!",ConstVal.Tips.time); - } - break; - case 3214: - //GameUI.openBlackList(); - var data={}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.type = 1; - Net.Send_optBanList(data); - break; - case 3205: - Utl.openInputPanel("请输入玩家ID(长度六位)",blackInputCallBack); - break; - case 3203: - case 3200: - GameUI.closeBlackList(); - break; - case 3206://添加 - var txt = get_self(3212,7,0,0,0); - if(txt.length == 6){ - var data={}; - data.agentid = GameData.AgentId; - data.gameid = GameData.GameId; - data.playerid = C_Player.playerid; - data.optId = txt; - if(GameData.blackList.breakRoom){ - data.breakRoom = 1; - }else{ - data.breakRoom = 0; - } - data.type = 3; - Net.Send_optBanList(data); - }else{ - GameUI.OpenTips("请输入正确的玩家ID!",ConstVal.Tips.time); - } - break; - case 3216://删除 - var txt = get_self(3212,7,0,0,0); - if(txt.length == 6){ - var data={}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.optId = txt; - data.type = 4; - Net.Send_optBanList(data); - }else{ - GameUI.OpenTips("请输入正确的玩家ID!",ConstVal.Tips.time); - } - break; - case ConstVal.blackList.f_spid: - // - var up_id = ifast_check_add(spid_up, upx, upy); - if (!GameData.blackList.slide) { - if (up_id >= ConstVal.blackList.del_tag) { - GameData.blackList.selectTag = up_id - ConstVal.blackList.del_tag; - //console.log(GameData.blackList.data[GameData.blackList.selectTag]); - var data={}; + break; + case 3120: + //更多 + GameUI.openPallet(); + break; + case 3122: + GameUI.closePallet(); + break; + case 92: + GameUI.goWorldRoom1(); + break; + case 93: + GameUI.goWorldRoom2(); + break; + case 99: + GameUI.showMyRoomList(); + break; + case 103: + GameUI.hideMyRoomList(); + break; + case 98: + var up_id = ifast_check_add(spid_up, upx, upy); + if (up_id >= ConstVal.myRoomList.bgTag && up_id < ConstVal.myRoomList.roomCodeTag) { + console.log(GameData.roomList[up_id - ConstVal.myRoomList.bgTag]); + var data = {}; data.agentid = GameData.AgentId; data.playerid = C_Player.playerid; - data.optId = GameData.blackList.data[GameData.blackList.selectTag]; + data.gameid = GameData.GameId; + data.roomcode = GameData.roomList[up_id - ConstVal.myRoomList.bgTag]; + data.joinmode = 1; + Net.Send_self_join_room(data); + } + break; + case 106: + Func.accreditlogin(1); + break; + case 107: + if (get_self(108, 37, 0, 0, 0)) { + GameUI.closeMainSceneBtnPanel(); + } else { + GameUI.openMainSceneBtnPanel(); + } + + break; + case 3123: + GameUI.closeMainSceneBtnPanel(); + break; + case 284: + if (get_self(109, 37, 0, 0, 0)) { + GameUI.closeRoomInfo(); + } else { + GameUI.openRoomInfo(); + } + break; + case 109: + case 3124: + GameUI.closeRoomInfo(); + break; + case 3141: + if (get_self(109, 37, 0, 0, 0)) { + GameUI.closeRoomInfo(); + } else { + GameUI.openRoomInfo(); + } + break; + case 187: + GameData.clickChat++; + if (GameData.clickChat % 3 == 0 && GameData.isService) { + GameData.clickChat = 0; + GameData.communionHistory = []; + GameUI.clearCommunion(); + GameUI.CloseChat(); + GameUI.OpenChat(); + + + } + break; + case 3126: + GameUI.stopRecord(); + break; + case 3133: + GameUI.clickSnrVideo(3133); + break; + case 3164: + GameUI.clickSnrRoomState(); + break; + case 3139: + //官方试玩 + if (GameData.sysConfig.ofcShortCode) { + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.gameid = GameData.GameId; + data.roomcode = GameData.sysConfig.ofcShortCode; + Net.Send_self_join_room(data); + } else { + GameUI.OpenTips("暂未开放,敬请期待", ConstVal.Tips.time); + } + break; + case 3140: + case 3235: + //改成游戏内管理好友 + if (GameData.sysConfig.whiteListManager == 1) { + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.gameid = GameData.GameId; + Net.Send_getPlayerWhiteList(data); + } else { + if (GameData.sysConfig.managerUrl) { + Func.OpenurlTitleData(GameData.sysConfig.managerUrl + "?agentid=" + GameData.AgentId + "&channelid=" + + GameData.ChannelId + "&__HTML_VERSION__=3", + "管理后台", ""); + Func.browser(GameData.sysConfig.managerUrl + "?agentid=" + GameData.AgentId + "&channelid=" + GameData.ChannelId + "&playerid=" + C_Player.playerid + "&openid=" + C_Player.openid + "&unionid=" + C_Player.unionid); + } + } + + break; + case 3149: + if (get_self(3148, 37)) { + GameUI.hideOwnerNotice(); + } else { + //if(Logic.getVisibleNote()){ + GameUI.showOwnerNotice(Desk.ownerNotice); + //} + + } + + break; + case 3155: + var text = get_self(3154, 7); + + if (GameData.textCallback) { + GameData.textCallback(text); + GameData.textCallback = null; + } + GameUI.closeTextInput(); + break; + case 3159: + + GameUI.closeTextInput(); + break; + case 3156: + GameUI.openTextInput(C_Player.sign, setSignCallBack, 20); + break; + case 3150: + case 3148: + GameUI.hideOwnerNotice(); + break; + case 3158: + GameUI.closeSeniorOptions(); + break; + case 679: + GameUI.openVipRoomList(true); + break; + case 3182: + GameUI.closeVipRoomList(); + break; + case 3175: + GameUI.goVipPageOne(); + break; + case 3196: + case 3197: + Utl.openInputPanel("请输入您要设置的值", playeridInputCallBack); + break; + case 3194: + var txt = get_self(3197, 7, 0, 0, 0); + if (txt.length == 6) { + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.optId = txt; + data.type = 3; + Net.Send_optBanList(data); + } else { + GameUI.OpenTips("请输入正确的玩家ID!", ConstVal.Tips.time); + } + break; + case 3195: + var txt = get_self(3197, 7, 0, 0, 0); + if (txt.length == 6) { + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.optId = txt; data.type = 4; Net.Send_optBanList(data); + } else { + GameUI.OpenTips("请输入正确的玩家ID!", ConstVal.Tips.time); } - } - break; - case ConstVal.whiteList.f_spid: - // - var up_id = ifast_check_add(spid_up, upx, upy); - if (!GameData.whiteList.slide) { - if (up_id >= ConstVal.whiteList.del_tag) { - GameData.whiteList.selectTag = up_id - ConstVal.whiteList.del_tag; - //console.log(GameData.whiteList.data[GameData.whiteList.selectTag]); - var pinfo = GameData.whiteList.data[GameData.whiteList.selectTag]; - GameData.whiteList.delPid = pinfo[0]; - GameData.checkType = 8; - GameUI.openCheck("是否删除"+pinfo[0]+",当前魅力值:"+pinfo[2]); - } - if (up_id >= ConstVal.whiteList.bg_tag && up_id < ConstVal.whiteList.id_tag) { - GameData.whiteList.selectTag = up_id - ConstVal.whiteList.bg_tag; - //console.log(GameData.whiteList.data[GameData.whiteList.selectTag]); - GameUI.searchWhiteList(GameData.whiteList.data[GameData.whiteList.selectTag][0]); - } - } - break; - case 3281: - if(GameData.whiteList.inputId){ - GameData.checkType = 8; - GameData.whiteList.delPid = GameData.whiteList.inputId; - GameUI.openCheck("是否删除"+GameData.whiteList.inputId+",当前魅力值:"+GameData.whiteList.inputCharm); - }else{ - GameUI.OpenTips("请输入正确的玩家ID!",ConstVal.Tips.time); - } - break; - case 3276: - if(GameData.whiteList.inputId){ - GameData.checkType = 9; - GameData.whiteList.delPid = GameData.whiteList.inputId; - GameUI.openCheck("是否添加/修改"+GameData.whiteList.inputId+",魅力值:"+GameData.whiteList.inputCharm); - }else{ - GameUI.OpenTips("请输入正确的玩家ID!",ConstVal.Tips.time); - } - break; - case 3270: - case 3274: - GameUI.closeWhiteList(); - break; - case 3287: - Utl.openInputPanel("请输入玩家ID(长度六位)",whiteInputCallBack3); - break; - case 3275: - Utl.openInputPanel("请输入玩家ID(长度六位)",whiteInputCallBack1); - break; - case 3282: - Utl.openInputPanel("请输入魅力值",whiteInputCallBack2); - break; - case 3289: - GameUI.searchWhiteList(GameData.whiteList.searchId); - break; - case 3217: - //粘贴 - GameData.gamepastetext = "mouseup_3217"; - var text = Func.gamepastetext(); - if (GameData.userAgent != ConstVal.userAgent.uAgent_3) { - var reg = /[^0-9]/g; - if (text) { - text = text.replace(reg, ""); - GameData.inputPanelData = text; - GameUI.setNumberImage(3003, GameData.inputPanelData, 51); - GameUI.adaptPositionSpid(3003, 3002); - } - } - break; - case 3210: - GameData.checkType = 6; - GameUI.openCheck("将所有白名单玩家添加至黑名单?"); - break; - case 3215: - GameData.checkType = 7; - GameUI.openCheck("将所有白名单玩家"+GameData.sysConfig.charmName+"设为"+GameData.allCharm+"?"); - break; - case 3199: - //GameUI.openVipRank(); - var data={}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.shortcode = GameData.vipRoomCode; - Net.Send_getShortCodeRankList(data); - break; - case 3222: - case 3218: - GameUI.closeVipRank(); - break; - case 3231: - case 3232: - var data={}; - data.agentid = GameData.AgentId; - data.limit = GameData.sysConfig.vipRankLimit; - Net.Send_getVipRankList(data); - break; - case 3236: - Utl.openInputPanel("请输入免收值",rebateLimitCallback); - break; - case 3240: - //打开加入房间 - GameUI.closeVipRoomList(); - GameUI.OpenJoinRoom(); - break; - case 3243: - //Utl.openTextInput(get_self(3247,7),phoneNumberCallback); - Utl.openInputPanel("请输入手机号",phoneNumberCallback,true); - break; - case 3244: - //Utl.openTextInput(get_self(3248,7),phoneCodeCallback); - Utl.openInputPanel("请输入验证码",phoneCodeCallback,true); - break; - case 3251: - case 3241: - GameUI.closePhoneBind(); - break; - case 3255: - Func.deviceLogin(); - break; - case 3253: - switch(GameData.phoneType){ - case 1://手机号登录 - if(GameData.phoneNumber && GameData.phoneCode){ - // Func.deviceLogin(GameData.phoneNumber,GameData.phoneCode); - Func.phoneLogin(GameData.phoneNumber,GameData.phoneCode); - GameUI.closePhoneBind(); - }else{ - GameUI.OpenTips("手机号与验证码均不能为空!"); - } - break; - case 2://手机号绑定 - if(GameData.phoneNumber && GameData.phoneCode){ - var data={}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.phonenum = GameData.phoneNumber; - data.smmcode = GameData.phoneCode; - Net.Send_binding_phone(data); - }else{ - GameUI.OpenTips("手机号与验证码均不能为空!"); - } - break; - } - - break; - case 3254: - GameData.phoneType = 1; - GameUI.openPhoneBind(); - break; - case 3256: - if(C_Player.tel){ - GameUI.OpenTips("您已绑定手机号:"+C_Player.tel,ConstVal.Tips.time); - }else{ - GameData.phoneType = 2; - GameUI.openPhoneBind(); - } - break; - case 3245: - if(GameData.phoneCodeTime <= 0 && GameData.phoneNumber){ - GameUI.OpenTips("请通过相关渠道获取"); - // var data = {}; - // data.agentid = GameData.AgentId; - // data.phonenum = GameData.phoneNumber; - // Net.Send_send_phone_code_wechat(data); - // Logic.savePhoneCode(GameData.phoneNumber,""); - // GameUI.closePhoneBind(); - // GameUI.openPhoneBind(); - } - break; - case 3258: - //GameUI.clickSnrFobid(); - var data={}; - data.agentid = GameData.AgentId; - data.playerid = C_Player.playerid; - data.gameid = GameData.GameId; - var fData = 1; - if(GameData.snrRoomList.forbidSelect){ - fData = 0; - } - data.forbidSelect = fData; - Net.Send_setVipForbidSelect(data); - break; - case 3260: - GameData.blackList.breakRoom = !GameData.blackList.breakRoom; - break; - case 3264: - GameData.feedMode = 2; - GameUI.OpenFeedback(true); - break; - case 3265: - GameData.gamepastetext = "mouseup_3265"; - var c_text = Func.gamepastetext(); - if(c_text){ - set_self(551,7,c_text,0,0); - } - break; - case 3266: - var text = GameUI.getFeedbackText(); - var bTemp = Func.strisNull(text); - if (!bTemp) { - GameUI.CloseFeedback(); - //发送cdkey - var data= {}; + break; + case 3214: + //GameUI.openBlackList(); + var data = {}; data.agentid = GameData.AgentId; data.playerid = C_Player.playerid; - data.cardno = text; - Net.Send_topup_card(data); - } - break; - case 3268: - GameData.shareFriendInfo.sharetype = 3; - GameUI.closeSharePannel(); - Func.sharefriend(GameData.shareFriendInfo); - break; - case 3269: - GameData.shareFriendInfo.sharetype = 0; - GameUI.closeSharePannel(); - Func.sharefriend(GameData.shareFriendInfo); - break; - case 3267: - GameUI.closeSharePannel(); - break; + data.type = 1; + Net.Send_optBanList(data); + break; + case 3205: + Utl.openInputPanel("请输入玩家ID(长度六位)", blackInputCallBack); + break; + case 3203: + case 3200: + GameUI.closeBlackList(); + break; + case 3206://添加 + var txt = get_self(3212, 7, 0, 0, 0); + if (txt.length == 6) { + var data = {}; + data.agentid = GameData.AgentId; + data.gameid = GameData.GameId; + data.playerid = C_Player.playerid; + data.optId = txt; + if (GameData.blackList.breakRoom) { + data.breakRoom = 1; + } else { + data.breakRoom = 0; + } + data.type = 3; + Net.Send_optBanList(data); + } else { + GameUI.OpenTips("请输入正确的玩家ID!", ConstVal.Tips.time); + } + break; + case 3216://删除 + var txt = get_self(3212, 7, 0, 0, 0); + if (txt.length == 6) { + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.optId = txt; + data.type = 4; + Net.Send_optBanList(data); + } else { + GameUI.OpenTips("请输入正确的玩家ID!", ConstVal.Tips.time); + } + break; + case ConstVal.blackList.f_spid: + // + var up_id = ifast_check_add(spid_up, upx, upy); + if (!GameData.blackList.slide) { + if (up_id >= ConstVal.blackList.del_tag) { + GameData.blackList.selectTag = up_id - ConstVal.blackList.del_tag; + //console.log(GameData.blackList.data[GameData.blackList.selectTag]); + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.optId = GameData.blackList.data[GameData.blackList.selectTag]; + data.type = 4; + Net.Send_optBanList(data); + } + } + break; + case ConstVal.whiteList.f_spid: + // + var up_id = ifast_check_add(spid_up, upx, upy); + if (!GameData.whiteList.slide) { + if (up_id >= ConstVal.whiteList.del_tag) { + GameData.whiteList.selectTag = up_id - ConstVal.whiteList.del_tag; + //console.log(GameData.whiteList.data[GameData.whiteList.selectTag]); + var pinfo = GameData.whiteList.data[GameData.whiteList.selectTag]; + GameData.whiteList.delPid = pinfo[0]; + GameData.checkType = 8; + GameUI.openCheck("是否删除" + pinfo[0] + ",当前魅力值:" + pinfo[2]); + } + if (up_id >= ConstVal.whiteList.bg_tag && up_id < ConstVal.whiteList.id_tag) { + GameData.whiteList.selectTag = up_id - ConstVal.whiteList.bg_tag; + //console.log(GameData.whiteList.data[GameData.whiteList.selectTag]); + GameUI.searchWhiteList(GameData.whiteList.data[GameData.whiteList.selectTag][0]); + } + } + break; + case 3281: + if (GameData.whiteList.inputId) { + GameData.checkType = 8; + GameData.whiteList.delPid = GameData.whiteList.inputId; + GameUI.openCheck("是否删除" + GameData.whiteList.inputId + ",当前魅力值:" + GameData.whiteList.inputCharm); + } else { + GameUI.OpenTips("请输入正确的玩家ID!", ConstVal.Tips.time); + } + break; + case 3276: + if (GameData.whiteList.inputId) { + GameData.checkType = 9; + GameData.whiteList.delPid = GameData.whiteList.inputId; + GameUI.openCheck("是否添加/修改" + GameData.whiteList.inputId + ",魅力值:" + GameData.whiteList.inputCharm); + } else { + GameUI.OpenTips("请输入正确的玩家ID!", ConstVal.Tips.time); + } + break; + case 3270: + case 3274: + GameUI.closeWhiteList(); + break; + case 3287: + Utl.openInputPanel("请输入玩家ID(长度六位)", whiteInputCallBack3); + break; + case 3275: + Utl.openInputPanel("请输入玩家ID(长度六位)", whiteInputCallBack1); + break; + case 3282: + Utl.openInputPanel("请输入魅力值", whiteInputCallBack2); + break; + case 3289: + GameUI.searchWhiteList(GameData.whiteList.searchId); + break; + case 3217: + //粘贴 + GameData.gamepastetext = "mouseup_3217"; + var text = Func.gamepastetext(); + if (GameData.userAgent != ConstVal.userAgent.uAgent_3) { + var reg = /[^0-9]/g; + if (text) { + text = text.replace(reg, ""); + GameData.inputPanelData = text; + GameUI.setNumberImage(3003, GameData.inputPanelData, 51); + GameUI.adaptPositionSpid(3003, 3002); + } + } + break; + case 3210: + GameData.checkType = 6; + GameUI.openCheck("将所有白名单玩家添加至黑名单?"); + break; + case 3215: + GameData.checkType = 7; + GameUI.openCheck("将所有白名单玩家" + GameData.sysConfig.charmName + "设为" + GameData.allCharm + "?"); + break; + case 3199: + //GameUI.openVipRank(); + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.shortcode = GameData.vipRoomCode; + Net.Send_getShortCodeRankList(data); + break; + case 3222: + case 3218: + GameUI.closeVipRank(); + break; + case 3231: + case 3232: + var data = {}; + data.agentid = GameData.AgentId; + data.limit = GameData.sysConfig.vipRankLimit; + Net.Send_getVipRankList(data); + break; + case 3236: + Utl.openInputPanel("请输入免收值", rebateLimitCallback); + break; + case 3240: + //打开加入房间 + GameUI.closeVipRoomList(); + GameUI.OpenJoinRoom(); + break; + case 3243: + //Utl.openTextInput(get_self(3247,7),phoneNumberCallback); + Utl.openInputPanel("请输入手机号", phoneNumberCallback, true); + break; + case 3244: + //Utl.openTextInput(get_self(3248,7),phoneCodeCallback); + Utl.openInputPanel("请输入验证码", phoneCodeCallback, true); + break; + case 3251: + case 3241: + GameUI.closePhoneBind(); + break; + case 3255: + Func.deviceLogin(); + break; + case 3253: + switch (GameData.phoneType) { + case 1://手机号登录 + if (GameData.phoneNumber && GameData.phoneCode) { + // Func.deviceLogin(GameData.phoneNumber,GameData.phoneCode); + Func.phoneLogin(GameData.phoneNumber, GameData.phoneCode); + GameUI.closePhoneBind(); + } else { + GameUI.OpenTips("手机号与验证码均不能为空!"); + } + break; + case 2://手机号绑定 + if (GameData.phoneNumber && GameData.phoneCode) { + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.phonenum = GameData.phoneNumber; + data.smmcode = GameData.phoneCode; + Net.Send_binding_phone(data); + } else { + GameUI.OpenTips("手机号与验证码均不能为空!"); + } + break; + } + + break; + case 3254: + GameData.phoneType = 1; + GameUI.openPhoneBind(); + break; + case 3256: + if (C_Player.tel) { + GameUI.OpenTips("您已绑定手机号:" + C_Player.tel, ConstVal.Tips.time); + } else { + GameData.phoneType = 2; + GameUI.openPhoneBind(); + } + break; + case 3245: + if (GameData.phoneCodeTime <= 0 && GameData.phoneNumber) { + GameUI.OpenTips("请通过相关渠道获取"); + // var data = {}; + // data.agentid = GameData.AgentId; + // data.phonenum = GameData.phoneNumber; + // Net.Send_send_phone_code_wechat(data); + // Logic.savePhoneCode(GameData.phoneNumber,""); + // GameUI.closePhoneBind(); + // GameUI.openPhoneBind(); + } + break; + case 3258: + //GameUI.clickSnrFobid(); + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.gameid = GameData.GameId; + var fData = 1; + if (GameData.snrRoomList.forbidSelect) { + fData = 0; + } + data.forbidSelect = fData; + Net.Send_setVipForbidSelect(data); + break; + case 3260: + GameData.blackList.breakRoom = !GameData.blackList.breakRoom; + break; + case 3264: + GameData.feedMode = 2; + GameUI.OpenFeedback(true); + break; + case 3265: + GameData.gamepastetext = "mouseup_3265"; + var c_text = Func.gamepastetext(); + if (c_text) { + set_self(551, 7, c_text, 0, 0); + } + break; + case 3266: + var text = GameUI.getFeedbackText(); + var bTemp = Func.strisNull(text); + if (!bTemp) { + GameUI.CloseFeedback(); + //发送cdkey + var data = {}; + data.agentid = GameData.AgentId; + data.playerid = C_Player.playerid; + data.cardno = text; + Net.Send_topup_card(data); + } + break; + case 3268: + GameData.shareFriendInfo.sharetype = 3; + GameUI.closeSharePannel(); + Func.sharefriend(GameData.shareFriendInfo); + break; + case 3269: + GameData.shareFriendInfo.sharetype = 0; + GameUI.closeSharePannel(); + Func.sharefriend(GameData.shareFriendInfo); + break; + case 3267: + GameUI.closeSharePannel(); + break; } if (spid_up >= 376 && spid_up <= 385) { for (var i = 0; i < Desk.PlayerList.length; i++) { @@ -2744,133 +2744,133 @@ GameUI.utlmouseup = function(gameid, spid_down, downx, downy, spid_up, upx, upy, }; -GameUI.utlmousemove = function(gameid, spid, downx, downy, movex, movey, timelong, offmovex, offmovey, no1) { +GameUI.utlmousemove = function (gameid, spid, downx, downy, movex, movey, timelong, offmovex, offmovey, no1) { //点击后移动代码 switch (spid) { - case 252: - //协议内容 - set_self(spid, 19, offmovey, 1, 0); - break; - case 290: - //帮助内容 - set_self(spid, 19, offmovey, 1, 0); - break; - case ConstVal.Emotion.f_spid: - //表情 - if (ifast_abs(offmovey) > 2) { + case 252: + //协议内容 set_self(spid, 19, offmovey, 1, 0); - GameData.slidEmotion = true; - } + break; + case 290: + //帮助内容 + set_self(spid, 19, offmovey, 1, 0); + break; + case ConstVal.Emotion.f_spid: + //表情 + if (ifast_abs(offmovey) > 2) { + set_self(spid, 19, offmovey, 1, 0); + GameData.slidEmotion = true; + } - break; - case ConstVal.Com_History.f_spid: - //表情 - if (ifast_abs(offmovey) > 2) { - set_self(spid, 19, offmovey, 1, 0); - GameData.slideHistory = true; - } - break; - case ConstVal.Task.f_spid: + break; + case ConstVal.Com_History.f_spid: + //表情 + if (ifast_abs(offmovey) > 2) { + set_self(spid, 19, offmovey, 1, 0); + GameData.slideHistory = true; + } + break; + case ConstVal.Task.f_spid: - if (ifast_abs(offmovex) > 2) { - set_self(spid, 18, offmovex, 1, 0); - GameData.slideTask = true; - } - break; - case 404: - set_self(spid, 19, offmovey, 1, 0); - set_self(81, 19, offmovey, 1, 0); - break; - case 3102: - case 3105: - case 3106: - if (ifast_abs(offmovey) > 2) { + if (ifast_abs(offmovex) > 2) { + set_self(spid, 18, offmovex, 1, 0); + GameData.slideTask = true; + } + break; + case 404: set_self(spid, 19, offmovey, 1, 0); - GameData.imgAdIsSlide = true; - } - break; - case ConstVal.worldRoom.f_sp_1: - //系统房间 - if (ifast_abs(offmovey) > 2) { - set_self(spid, 19, offmovey, 1, 0); - GameData.worldRoomSysSlide = true; - } - break; - case ConstVal.worldRoom.f_sp_2: - //玩家房间 - if (ifast_abs(offmovey) > 2) { - set_self(spid, 19, offmovey, 1, 0); - GameData.worldRoomPlySlide = true; - } - break; - case ConstVal.snrRoomList.f_spid: - //玩家房间 - if (ifast_abs(offmovey) > 2) { - set_self(spid, 19, offmovey, 1, 0); - GameData.snrRoomListSlide = true; - } - break; - case 597: - GameUI.seniorOptionsSlide(gameid, spid, downx, downy, movex, movey, timelong, offmovex, offmovey, no1); - break; - case ConstVal.rankList.f_spid: - //玩家房间 - if (ifast_abs(offmovey) > 2) { - set_self(spid, 19, offmovey, 1, 0); - GameData.rankListSlide = true; - } - break; - case ConstVal.sysNotice.f_spid: - //玩家房间 - if (ifast_abs(offmovey) > 2) { - set_self(spid, 19, offmovey, 1, 0); - } - break; - case ConstVal.vipRoomList1.f_spid: - if (ifast_abs(offmovey) > 2) { - set_self(spid, 19, offmovey, 1, 0); - GameData.vipRoomPageOne.slide = true; - } + set_self(81, 19, offmovey, 1, 0); + break; + case 3102: + case 3105: + case 3106: + if (ifast_abs(offmovey) > 2) { + set_self(spid, 19, offmovey, 1, 0); + GameData.imgAdIsSlide = true; + } + break; + case ConstVal.worldRoom.f_sp_1: + //系统房间 + if (ifast_abs(offmovey) > 2) { + set_self(spid, 19, offmovey, 1, 0); + GameData.worldRoomSysSlide = true; + } + break; + case ConstVal.worldRoom.f_sp_2: + //玩家房间 + if (ifast_abs(offmovey) > 2) { + set_self(spid, 19, offmovey, 1, 0); + GameData.worldRoomPlySlide = true; + } + break; + case ConstVal.snrRoomList.f_spid: + //玩家房间 + if (ifast_abs(offmovey) > 2) { + set_self(spid, 19, offmovey, 1, 0); + GameData.snrRoomListSlide = true; + } + break; + case 597: + GameUI.seniorOptionsSlide(gameid, spid, downx, downy, movex, movey, timelong, offmovex, offmovey, no1); + break; + case ConstVal.rankList.f_spid: + //玩家房间 + if (ifast_abs(offmovey) > 2) { + set_self(spid, 19, offmovey, 1, 0); + GameData.rankListSlide = true; + } + break; + case ConstVal.sysNotice.f_spid: + //玩家房间 + if (ifast_abs(offmovey) > 2) { + set_self(spid, 19, offmovey, 1, 0); + } + break; + case ConstVal.vipRoomList1.f_spid: + if (ifast_abs(offmovey) > 2) { + set_self(spid, 19, offmovey, 1, 0); + GameData.vipRoomPageOne.slide = true; + } - break; - case ConstVal.vipRoomList2.f_spid: - if (ifast_abs(offmovey) > 2) { - set_self(spid, 19, offmovey, 1, 0); - GameData.vipRoomPageTwo.slide = true; - } - break; - case ConstVal.blackList.f_spid: - if (ifast_abs(offmovey) > 2) { - set_self(spid, 19, offmovey, 1, 0); - GameData.blackList.slide = true; - } + break; + case ConstVal.vipRoomList2.f_spid: + if (ifast_abs(offmovey) > 2) { + set_self(spid, 19, offmovey, 1, 0); + GameData.vipRoomPageTwo.slide = true; + } + break; + case ConstVal.blackList.f_spid: + if (ifast_abs(offmovey) > 2) { + set_self(spid, 19, offmovey, 1, 0); + GameData.blackList.slide = true; + } - break; - case ConstVal.vipRank.f_spid: - if (ifast_abs(offmovey) > 2) { - set_self(spid, 19, offmovey, 1, 0); - GameData.vipRank.slide = true; - } + break; + case ConstVal.vipRank.f_spid: + if (ifast_abs(offmovey) > 2) { + set_self(spid, 19, offmovey, 1, 0); + GameData.vipRank.slide = true; + } - break; - case ConstVal.whiteList.f_spid: - if (ifast_abs(offmovey) > 2) { - set_self(spid, 19, offmovey, 1, 0); - GameData.whiteList.slide = true; - } + break; + case ConstVal.whiteList.f_spid: + if (ifast_abs(offmovey) > 2) { + set_self(spid, 19, offmovey, 1, 0); + GameData.whiteList.slide = true; + } - break; + break; } }; -GameUI.utlgamemydraw = function(gameid, spid, times, timelong, no2, no3, no4, no5, no6, no7) { +GameUI.utlgamemydraw = function (gameid, spid, times, timelong, no2, no3, no4, no5, no6, no7) { //每个精灵更新绘画代码 if (spid >= 376 && spid <= 385) { - if (typeof(GameUI.onstate[spid - 376]) != "undefined") { + if (typeof (GameUI.onstate[spid - 376]) != "undefined") { if (GameUI.onstate[spid - 376] == 1) { //离线 ifast_mydrawbmp(spid, 90, 0, 0, get_self(spid, 20, 0, 0, 0), get_self(spid, 21, 0, 0, 0), 0, 0, 100, 100); } else if (GameUI.onstate[spid - 376] == 2) { //通话中 @@ -2888,65 +2888,65 @@ GameUI.utlgamemydraw = function(gameid, spid, times, timelong, no2, no3, no4, no switch (spid) { - case 118: + case 118: //个人信息性别 - case 282: - { - if (InfoSex == "2") { //女 - ifast_mydrawbmp(spid, 47, 80, 80, 44, 44, 44, 0, 44, 44); - } else { //男 - ifast_mydrawbmp(spid, 47, 80, 80, 44, 44, 0, 0, 44, 44); + case 282: + { + if (InfoSex == "2") { //女 + ifast_mydrawbmp(spid, 47, 80, 80, 44, 44, 44, 0, 44, 44); + } else { //男 + ifast_mydrawbmp(spid, 47, 80, 80, 44, 44, 0, 0, 44, 44); + } } - } - break; + break; - case 17: - //任务按钮 - if (C_Player.taskstate != 0) { - ifast_mydrawbmp(spid, 88, 50, -23, 63, 63, 0, 0, 63, 63); - } - break; + case 17: + //任务按钮 + if (C_Player.taskstate != 0) { + ifast_mydrawbmp(spid, 88, 50, -23, 63, 63, 0, 0, 63, 63); + } + break; - case 254: - //进度条 - ifast_mydrawbmp(spid, 96, 0, 0, GameData.LoadCount * get_self(spid, 20, 0, 0, 0) / 100 + 0.1, get_self(spid, 21, 0, 0, 0), 0, get_self(spid, 21, 0, 0, 0), GameData.LoadCount * 416 / 100 + 0.1, get_self(spid, 21, 0, 0, 0)); - break; - case 256: - //互动按钮1 - ifast_mydrawbmp(spid, 99, 0, 5, 80, 80, 20, 30, 90, 90); - break; - case 257: - //互动按钮2 - ifast_mydrawbmp(spid, 102, 0, 0, 80, 80, 1210, 0, 110, 98); - break; - case 258: - //互动按钮3 - ifast_mydrawbmp(spid, 103, 5, 0, 80, 80, 0, 0, 190, 190); - break; - case 259: - //互动按钮4 - ifast_mydrawbmp(spid, 104, 0, 3, 80, 80, 260, 0, 130, 130); - break; - case 339: - //微信公众号下划线 - if (GameData.wechat_gzh) { - drawlines(spid, 0, 38, get_self(spid, 20, 0, 0, 0), 38, 2, GameData.gzhcolor1); - } - break; - case 680: - //微信公众号下划线 - drawlines(spid, 0, 30, get_self(spid, 20, 0, 0, 0), 30, 2, GameData.gzhcolor2); - break; - case GameData.telSpid: - //微信公众号下划线 - //if(GameData.roomList.length==0){ - if (GameData.tel) { - drawlines(spid, 0, 21, get_self(spid, 20, 0, 0, 0), 21, 2, GameData.telcolor); - } - //}else{ - //drawlines(spid,5,30,get_self(spid,20,0,0,0),30,2,GameData.telcolor); - //} - break; + case 254: + //进度条 + ifast_mydrawbmp(spid, 96, 0, 0, GameData.LoadCount * get_self(spid, 20, 0, 0, 0) / 100 + 0.1, get_self(spid, 21, 0, 0, 0), 0, get_self(spid, 21, 0, 0, 0), GameData.LoadCount * 416 / 100 + 0.1, get_self(spid, 21, 0, 0, 0)); + break; + case 256: + //互动按钮1 + ifast_mydrawbmp(spid, 99, 0, 5, 80, 80, 20, 30, 90, 90); + break; + case 257: + //互动按钮2 + ifast_mydrawbmp(spid, 102, 0, 0, 80, 80, 1210, 0, 110, 98); + break; + case 258: + //互动按钮3 + ifast_mydrawbmp(spid, 103, 5, 0, 80, 80, 0, 0, 190, 190); + break; + case 259: + //互动按钮4 + ifast_mydrawbmp(spid, 104, 0, 3, 80, 80, 260, 0, 130, 130); + break; + case 339: + //微信公众号下划线 + if (GameData.wechat_gzh) { + drawlines(spid, 0, 38, get_self(spid, 20, 0, 0, 0), 38, 2, GameData.gzhcolor1); + } + break; + case 680: + //微信公众号下划线 + drawlines(spid, 0, 30, get_self(spid, 20, 0, 0, 0), 30, 2, GameData.gzhcolor2); + break; + case GameData.telSpid: + //微信公众号下划线 + //if(GameData.roomList.length==0){ + if (GameData.tel) { + drawlines(spid, 0, 21, get_self(spid, 20, 0, 0, 0), 21, 2, GameData.telcolor); + } + //}else{ + //drawlines(spid,5,30,get_self(spid,20,0,0,0),30,2,GameData.telcolor); + //} + break; //case 682: //if(GameData.roomList.length>=1){ //drawlines(spid,0,30,get_self(spid,20,0,0,0),30,2,GameData.telcolor); @@ -2962,72 +2962,72 @@ GameUI.utlgamemydraw = function(gameid, spid, times, timelong, no2, no3, no4, no //drawlines(spid,0,30,get_self(spid,20,0,0,0),30,2,GameData.telcolor); //} //break; - case 326: - if (GameData.disType) { - drawlines(spid, 630, 700, 635, 700, 5); - } - for (var i = 0; i < GameData.serverIndex + 1; i++) { - drawlines(spid, 1100 + i * 10, 700, 1105 + i * 10, 700, 2); - } - break; - case 3100: - if (GameUI.Mem.snrOption.infinite == 1) { - ifast_mydrawbmp(spid, 390, 0, 0, 40, 40, 0, 0, 40, 40); - } - break; - case 3166: - if (GameUI.Mem.snrOption.rebateType == 1) { - ifast_mydrawbmp(spid, 390, 0, 0, 40, 40, 0, 0, 40, 40); - } - break; - case 3167: - if (GameUI.Mem.snrOption.rebateType == 0) { - ifast_mydrawbmp(spid, 390, 0, 0, 40, 40, 0, 0, 40, 40); - } - break; - case 3115: - ifast_mydrawtext(spid, 1, 6, 3, String(get_rec(1)).gblen() * 12.5, 20); - ifast_mydrawtext(spid, 2, 6, 26, String(get_rec(2)).gblen() * 12.5, 20); - break; - case 3111: - if (GameData.selectSysNotice) { - ifast_mydrawbmp(spid, 4, 2, 2, 40, 40, 0, 0, 40, 40); - } - break; - case 568: - if (!GameData.hallConfig.worldRoomList) { - //ifast_mydrawbmp(spid,11,0,0,get_self(spid,20,0,0,0),get_self(spid,21,0,0,0),0,0,4,4); - ifast_mydrawbmp(spid, 352, 80, 0, 230, 230, 0, 0, 230, 230); - } - break; - case 483: - //if (!GameData.matchhtml) { + case 326: + if (GameData.disType) { + drawlines(spid, 630, 700, 635, 700, 5); + } + for (var i = 0; i < GameData.serverIndex + 1; i++) { + drawlines(spid, 1100 + i * 10, 700, 1105 + i * 10, 700, 2); + } + break; + case 3100: + if (GameUI.Mem.snrOption.infinite == 1) { + ifast_mydrawbmp(spid, 390, 0, 0, 40, 40, 0, 0, 40, 40); + } + break; + case 3166: + if (GameUI.Mem.snrOption.rebateType == 1) { + ifast_mydrawbmp(spid, 390, 0, 0, 40, 40, 0, 0, 40, 40); + } + break; + case 3167: + if (GameUI.Mem.snrOption.rebateType == 0) { + ifast_mydrawbmp(spid, 390, 0, 0, 40, 40, 0, 0, 40, 40); + } + break; + case 3115: + ifast_mydrawtext(spid, 1, 6, 3, String(get_rec(1)).gblen() * 12.5, 20); + ifast_mydrawtext(spid, 2, 6, 26, String(get_rec(2)).gblen() * 12.5, 20); + break; + case 3111: + if (GameData.selectSysNotice) { + ifast_mydrawbmp(spid, 4, 2, 2, 40, 40, 0, 0, 40, 40); + } + break; + case 568: + if (!GameData.hallConfig.worldRoomList) { + //ifast_mydrawbmp(spid,11,0,0,get_self(spid,20,0,0,0),get_self(spid,21,0,0,0),0,0,4,4); + ifast_mydrawbmp(spid, 352, 80, 0, 230, 230, 0, 0, 230, 230); + } + break; + case 483: + //if (!GameData.matchhtml) { //ifast_mydrawbmp(spid, 352, 80, 0, 230, 230, 0, 0, 230, 230); - //} - if (!GameData.vipConfig) { - ifast_mydrawbmp(spid, 352, 80, 0, 230, 230, 0, 0, 230, 230); - } - break; - case 3139: - if (!GameData.sysConfig.ofcShortCode) { - //ifast_mydrawbmp(spid,11,0,0,get_self(spid,20,0,0,0),get_self(spid,21,0,0,0),0,0,4,4); - ifast_mydrawbmp(spid, 352, 110, 5, 99, 99, 0, 0, 230, 230); - } - break; - case ConstVal.Com_History.f_spid: - if (GameData.chatLine != null && GameData.isService) { - drawlines(spid, GameData.chatLine[0], GameData.chatLine[1] + GameData.chatLine[3], GameData.chatLine[0] + GameData.chatLine[2], GameData.chatLine[1] + GameData.chatLine[3], 4, "white"); - } - break; - case 3260: - if(GameData.blackList.breakRoom){ - ifast_mydrawbmp(spid, 432, 0, 0, 50, 50, 50, 0, 50, 50); - } - break; + //} + if (!GameData.vipConfig) { + ifast_mydrawbmp(spid, 352, 80, 0, 230, 230, 0, 0, 230, 230); + } + break; + case 3139: + if (!GameData.sysConfig.ofcShortCode) { + //ifast_mydrawbmp(spid,11,0,0,get_self(spid,20,0,0,0),get_self(spid,21,0,0,0),0,0,4,4); + ifast_mydrawbmp(spid, 352, 110, 5, 99, 99, 0, 0, 230, 230); + } + break; + case ConstVal.Com_History.f_spid: + if (GameData.chatLine != null && GameData.isService) { + drawlines(spid, GameData.chatLine[0], GameData.chatLine[1] + GameData.chatLine[3], GameData.chatLine[0] + GameData.chatLine[2], GameData.chatLine[1] + GameData.chatLine[3], 4, "white"); + } + break; + case 3260: + if (GameData.blackList.breakRoom) { + ifast_mydrawbmp(spid, 432, 0, 0, 50, 50, 50, 0, 50, 50); + } + break; } }; -GameUI.utlgamemydrawbegin = function(gameid, spid, times, timelong, no2, no3, no4, no5, no6, no7) { +GameUI.utlgamemydrawbegin = function (gameid, spid, times, timelong, no2, no3, no4, no5, no6, no7) { //每个精灵更新前绘画代码 if (spid == 220) { set_clip(0, 0, Game_Config.Notice.x1, Game_Config.Notice.y, Game_Config.Notice.x2 - Game_Config.Notice.x1, Game_Config.Notice.h); @@ -3099,76 +3099,76 @@ GameUI.utlgamemydrawbegin = function(gameid, spid, times, timelong, no2, no3, no } }; -GameUI.utlontimer = function(gameid, spid, /* 本次间隔多少次了 */ times, /* 本次间隔多久 */ timelong, /* 开启后运行多少次了 */ alltimes) { +GameUI.utlontimer = function (gameid, spid, /* 本次间隔多少次了 */ times, /* 本次间隔多久 */ timelong, /* 开启后运行多少次了 */ alltimes) { /*请在下面输入您的代码 */ //set_self(1,18,5,1,0); switch (spid) { - case 1: - if (GameData.LoadCount == 100) { - //if(ConstVal.netType == 0){ - if (GameData.firstConnect_Succ && GameData.getJSONState) { - this.JumpWxAuth(); + case 1: + if (GameData.LoadCount == 100) { + //if(ConstVal.netType == 0){ + if (GameData.firstConnect_Succ && GameData.getJSONState) { + this.JumpWxAuth(); + set_self(1, 57, 0, 0, 0); + } + //}else{ + //if(GameData.getJSONState){ + //this.JumpWxAuth(); + //set_self(1,57,0,0,0); + //} + //} + } else { + GameData.Timesup = true; set_self(1, 57, 0, 0, 0); } - //}else{ - //if(GameData.getJSONState){ - //this.JumpWxAuth(); - //set_self(1,57,0,0,0); - //} - //} - } else { - GameData.Timesup = true; - set_self(1, 57, 0, 0, 0); - } - break; - case 2: - VoteTime--; - if (VoteTime >= 0) { + break; + case 2: + VoteTime--; + if (VoteTime >= 0) { - set_self(222, 20, String(VoteTime).length * 30, 0, 0); - set_self(222, 7, VoteTime, 0, 0); - } - if (VoteTime <= 0) { - set_self(2, 57, 0, 0, 0); - } - break; - case 3: - - if (get_self(149, 37, 0, 0, 0) == 1) { - Func.SetDate(); - if (get_self(156, 35, 0, 0, 0) == 255) { - set_self(156, 35, 100, 0, 0); - } else { - set_self(156, 35, 255, 0, 0); + set_self(222, 20, String(VoteTime).length * 30, 0, 0); + set_self(222, 7, VoteTime, 0, 0); } - } - break; - case 4: - if (GameData.vipRoomShortList.length > 0 && get_self(6, 37, 0, 0, 0)) { - var data = {}; - data.agentid = GameData.AgentId; - data.gameid = GameData.GameId - data.shortcodeList = GameData.vipRoomShortList; - Net.Send_getInfoByShortCode(data); - } - break; - case 5: - GameData.phoneCodeTime--; - if(GameData.phoneCodeTime < 0){//倒计时结束 - set_self(5, 57, 0, 0, 0); - set_self(3245,43,2,0,0); - set_self(3246,37,0,0,0); - }else{ - GameUI.setCodeTime(GameData.phoneCodeTime); - } - break; + if (VoteTime <= 0) { + set_self(2, 57, 0, 0, 0); + } + break; + case 3: + + if (get_self(149, 37, 0, 0, 0) == 1) { + Func.SetDate(); + if (get_self(156, 35, 0, 0, 0) == 255) { + set_self(156, 35, 100, 0, 0); + } else { + set_self(156, 35, 255, 0, 0); + } + } + break; + case 4: + if (GameData.vipRoomShortList.length > 0 && get_self(6, 37, 0, 0, 0)) { + var data = {}; + data.agentid = GameData.AgentId; + data.gameid = GameData.GameId + data.shortcodeList = GameData.vipRoomShortList; + Net.Send_getInfoByShortCode(data); + } + break; + case 5: + GameData.phoneCodeTime--; + if (GameData.phoneCodeTime < 0) {//倒计时结束 + set_self(5, 57, 0, 0, 0); + set_self(3245, 43, 2, 0, 0); + set_self(3246, 37, 0, 0, 0); + } else { + GameUI.setCodeTime(GameData.phoneCodeTime); + } + break; } }; -GameUI.invisible = function(bTemp) { +GameUI.invisible = function (bTemp) { for (var i = 0; i <= Game_Config.Max.group; i++) { if (bTemp) { if (i == 89) { @@ -3183,12 +3183,12 @@ GameUI.invisible = function(bTemp) { set_group(i, 37, 0, 0, 0); } } -GameUI.JumpWxAuth = function() { //跳转微信授权 +GameUI.JumpWxAuth = function () { //跳转微信授权 //preAudio(); //setTimeout(function(){ //Func.getphoneInfo(); //C_Player.Init(); - + Logic.getPhoneInfo(); GameData.submitLocation = false; GameUI.stopMenuSceneAnimation(); @@ -3207,46 +3207,52 @@ GameUI.JumpWxAuth = function() { //跳转微信授权 set_self(285, 7, vText); set_group(2, 37, 1, 0, 0); - if(GameData.sysConfig.deviceLogin){ - set_self(3,37,0,0,0); - set_self(3254,37,1,0,0); - set_self(3255,37,0,0,0); - set_self(3254,18,490,0,0); + if (GameData.sysConfig.deviceLogin) { + set_self(3, 37, 0, 0, 0); + set_self(3254, 37, 1, 0, 0); + set_self(3255, 37, 0, 0, 0); + set_self(3254, 18, 490, 0, 0); // set_self(3255,18,660,0,0); - }else{ - set_self(3,37,1,0,0); - set_self(3254,37,0,0,0); - set_self(3255,37,0,0,0); + } else { + set_self(3, 37, 1, 0, 0); + set_self(3254, 37, 0, 0, 0); + set_self(3255, 37, 0, 0, 0); } var WxInfo = null; //if (!Game_Config.Debugger.isDebugger) { - if (GameData.versionState == 0) { - if (GameData.h5Version == 1) { - WxInfo = Logic.getWxInfo(); - } else { - if(!GameData.sysConfig.deviceLogin){ + if (GameData.versionState == 0) { + if (GameData.h5Version == 1) { + WxInfo = Logic.getWxInfo(); + } else { + if (!GameData.hallConfig.showVisitor) { + + + if (!GameData.sysConfig.deviceLogin) { WxInfo = Utl.getCookie(Utl.Config.wxinfo); - }else{ + } else { WxInfo = Utl.getCookie(Utl.Config.devicePlayer); - if(Utl.ReadData(Utl.Config.dLogin)){ - set_self(3254,37,1,0,0); + if (Utl.ReadData(Utl.Config.dLogin)) { + set_self(3254, 37, 1, 0, 0); // set_self(3255,18,490,0,0); } } + } else { + WxInfo = Utl.getCookie(Utl.Config.visitorinfo); } } + } //} else { - //if (Game_Config.Debugger.AutoLogin) { - //if (GameData.h5Version == 1) { - //WxInfo = Logic.getWxInfo(); - //} else { - //if(!GameData.sysConfig.deviceLogin){ - //WxInfo = Utl.getCookie(Utl.Config.wxinfo); - //}else{ - //WxInfo = Utl.ReadData(Utl.Config.devicePlayer); - //} - //} - //} + //if (Game_Config.Debugger.AutoLogin) { + //if (GameData.h5Version == 1) { + //WxInfo = Logic.getWxInfo(); + //} else { + //if(!GameData.sysConfig.deviceLogin){ + //WxInfo = Utl.getCookie(Utl.Config.wxinfo); + //}else{ + //WxInfo = Utl.ReadData(Utl.Config.devicePlayer); + //} + //} + //} //} if (WxInfo) { @@ -3257,8 +3263,8 @@ GameUI.JumpWxAuth = function() { //跳转微信授权 set_self(3, 37, 0, 0, 0); set_self(177, 37, 0, 0, 0); set_self(106, 37, 0, 0, 0); - set_self(3254,37,0,0,0); - set_self(3255,37,0,0,0); + set_self(3254, 37, 0, 0, 0); + set_self(3255, 37, 0, 0, 0); play_ani(1, 325, 43, 1, 4, 0, 1500, 0, 0, 0, 0, 0, 0); //C_Player.SetWxInfo(WxInfo.openid,WxInfo.headimgurl,WxInfo.nickname,WxInfo.sex,WxInfo.city,WxInfo.Province,WxInfo.unionid); //var data={}; @@ -3291,7 +3297,7 @@ GameUI.JumpWxAuth = function() { //跳转微信授权 data.version = GameData.versionCode; data.channelid = GameData.ChannelId; data.marketid = GameData.marketID; - if(GameData.sysConfig.deviceLogin){ + if (GameData.sysConfig.deviceLogin) { C_Player.setTel(WxInfo.telphone); data.telphone = WxInfo.telphone; data.telphoneAuto = true; @@ -3332,19 +3338,22 @@ GameUI.JumpWxAuth = function() { //跳转微信授权 //set_self(3,19,382,0,0); //set_self(3,20,400,0,0); //set_self(3,21,116,0,0); - + if (GameData.hallConfig.showVisitor) { + set_self(3, 37, 0, 0, 0); + set_self(177, 37, 1, 0, 0); + } } if (GameData.hallConfig.qqLogin) { set_self(106, 37, 1, 0, 0); } else { set_self(106, 37, 0, 0, 0); } - + //},2000); GameUI.updateInsertHTML(); } -GameUI.updateNoticeBoard = function() { +GameUI.updateNoticeBoard = function () { if (Game_Config.sysConfig.hideNotice) { set_self(16, 37, 0, 0, 0); @@ -3396,7 +3405,7 @@ GameUI.updateNoticeBoard = function() { set_self(spidTemp[i][0], 18, get_self(16, 18, 0, 0, 0) + 101, 0, 0); //set_self(spidTemp[i][1],37,0,0,0); } - + if (GameData.wechat_kfh) { set_self(spidTemp[spidIndex][1], 7, "客服微信:", 0, 0); set_self(spidTemp[spidIndex][0], 7, GameData.wechat_kfh, 0, 0); @@ -3440,32 +3449,32 @@ GameUI.updateNoticeBoard = function() { } else { } - -/* - }else{//有历史房间号 - GameData.telSpid = -1; - set_self(681,7," 开房列表"); - var _roomdesspList = [180,193,194]; - var _roomcodespList = [682,178,179]; - for(var i=0;i= ConstVal.Com_History.content_tag) { bTemp = true; @@ -6092,6 +6107,10 @@ function gameui_play_voice(v) { if (bTemp) { play_ani(1, ConstVal.Com_History.f_spid + "add" + v, 43, 1, 3, 0, 600, 0, 0, 0, 0, 0, 0); } else { + if (Game_Modify.gameui_play_voice) { + Game_Modify.gameui_play_voice(v); + return; + } var x = Game_Config.Voice.VoiceLoc[v][0]; var y = Game_Config.Voice.VoiceLoc[v][1]; var dis_x = Game_Config.Voice.VoiceDis[0]; @@ -6128,17 +6147,22 @@ function gameui_stop_voice(v) { if (v >= ConstVal.Com_History.content_tag) { bTemp = true; } + if (bTemp) { play_ani(0, ConstVal.Com_History.f_spid + "add" + v, 43, 1, 3, 0, 600, 0, 0, 0, 0, 0, 0); set_self(ConstVal.Com_History.f_spid + "add" + v, 43, 3, 0, 0); } else { + if (Game_Modify.gameui_stop_voice) { + Game_Modify.gameui_stop_voice(v); + return; + } set_self(612 + v, 37, 0, 0, 0); set_self(642 + v, 37, 0, 0, 0); play_ani(0, 642 + v, 43); } } -GameUI.ShowiMessage = function(_msg) { +GameUI.ShowiMessage = function (_msg) { set_self(333, 7, _msg, 0, 0); set_self(333, 41, 0, 0, 0); set_self(334, 41, 0, 0, 0); @@ -6164,7 +6188,7 @@ GameUI.ShowiMessage = function(_msg) { play_ani(1, 333, 18, ConstVal.iMessage.x2, ConstVal.iMessage.x1 - len * 6.75, 0, len * 6.75 / ConstVal.iMessage.speed, 0, 0, 0, 0, 0, 0); } } -GameUI.HideiMessage = function(_msg) { +GameUI.HideiMessage = function (_msg) { play_ani(1, 332, 19, ConstVal.iMessage.bg_y2, ConstVal.iMessage.bg_y1, 0, ConstVal.iMessage.time, 0, 0, 0, 1, 0, 0); play_ani(1, 333, 19, ConstVal.iMessage.text_y2, ConstVal.iMessage.text_y1, 0, ConstVal.iMessage.time, 0, 0, 0, 1, 0, 0); play_ani(1, 334, 19, ConstVal.iMessage.icon_y2, ConstVal.iMessage.icon_y1, 0, ConstVal.iMessage.time, 0, 0, 0, 1, 0, 0); @@ -6172,7 +6196,7 @@ GameUI.HideiMessage = function(_msg) { play_ani(0, 333, 18); } //打开二维码 -GameUI.Open_ewm = function() { +GameUI.Open_ewm = function () { if (GameData.wechat_ewm) { Utl.playSound(Game_Config.ClickButton.src_2); Func.up_imgurl(115, GameData.wechat_ewm); @@ -6181,30 +6205,30 @@ GameUI.Open_ewm = function() { } } //打开二维码 -GameUI.Close_ewm = function() { +GameUI.Close_ewm = function () { set_group(42, 37, 0, 0, 0); } -GameUI.OpenFeedback = function(bTemp) { +GameUI.OpenFeedback = function (bTemp) { Utl.playSound(Game_Config.ClickButton.src_2); set_group(74, 37, 1, 0, 0); - if(bTemp){ - set_self(550,37,0,0,0); - }else{ - set_self(3265,37,0,0,0); - set_self(3266,37,0,0,0); + if (bTemp) { + set_self(550, 37, 0, 0, 0); + } else { + set_self(3265, 37, 0, 0, 0); + set_self(3266, 37, 0, 0, 0); } } -GameUI.CloseFeedback = function() { +GameUI.CloseFeedback = function () { var obj = gameabc_face.getdiv("div551"); obj.blur(); - set_self(551,7,"",0,0); + set_self(551, 7, "", 0, 0); set_group(74, 37, 0, 0, 0); } -GameUI.getFeedbackText = function() { +GameUI.getFeedbackText = function () { return get_self(551, 7, 0, 0, 0); } //创建历史记录 -GameUI.createCommunion = function(c_list) { +GameUI.createCommunion = function (c_list) { if (c_list) { if (c_list.length) { var len = c_list.length; @@ -6258,7 +6282,7 @@ GameUI.createCommunion = function(c_list) { } } //添加一条历史记录 -GameUI.addCommunion = function(status, type, data, tlen, kfData, sex) { +GameUI.addCommunion = function (status, type, data, tlen, kfData, sex) { GameData.communionHistory.push([status, type, data, tlen, kfData, sex]); var c_list = GameData.communionHistory; @@ -6322,7 +6346,7 @@ GameUI.addCommunion = function(status, type, data, tlen, kfData, sex) { } } //删除所有历史记录 -GameUI.clearCommunion = function() { +GameUI.clearCommunion = function () { for (var i = 0; i < GameData.createHistoryLen; i++) { ifast_dllpritefromspritecopy(ConstVal.Com_History.f_spid, ConstVal.Com_History.head_tag + i); ifast_dllpritefromspritecopy(ConstVal.Com_History.f_spid, ConstVal.Com_History.bubble_tag + i); @@ -6335,7 +6359,7 @@ GameUI.clearCommunion = function() { //GameUI.findCommunion =function(ind){ //} -GameUI.OpenPay = function() { +GameUI.OpenPay = function () { Utl.playSound(Game_Config.ClickButton.src_2); GameData.payData[0] = 0; GameData.payData[1] = 0; @@ -6364,7 +6388,7 @@ GameUI.OpenPay = function() { } -GameUI.OpenCheckPay = function() { +GameUI.OpenCheckPay = function () { set_self(458, 43, GameData.nameImgFrame_1, 0, 0); set_group(54, 37, 1, 0, 0); GameData.payData[1] = 0; @@ -6392,31 +6416,31 @@ GameUI.OpenCheckPay = function() { } } -GameUI.ClosePay = function() { +GameUI.ClosePay = function () { set_group(53, 37, 0, 0, 0); } -GameUI.CloseCheckPay = function() { +GameUI.CloseCheckPay = function () { set_group(54, 37, 0, 0, 0); } -GameUI.switchPayType = function(type) { +GameUI.switchPayType = function (type) { GameData.payData[1] = type; set_self(461, 43, 1, 0, 0); set_self(462, 43, 3, 0, 0); set_self(463, 43, 5, 0, 0) switch (type) { - case 0: - set_self(461, 43, 2, 0, 0); - break; - case 1: - set_self(462, 43, 4, 0, 0); - break; - case 2: - set_self(463, 43, 6, 0, 0); - break; + case 0: + set_self(461, 43, 2, 0, 0); + break; + case 1: + set_self(462, 43, 4, 0, 0); + break; + case 2: + set_self(463, 43, 6, 0, 0); + break; }; } //显示计算器按钮 -GameUI.showCalBtn = function(input_arr, w) { +GameUI.showCalBtn = function (input_arr, w) { var width = 28; if (w) { width = w; @@ -6447,21 +6471,21 @@ GameUI.showCalBtn = function(input_arr, w) { set_group(78, 37, 1, 0, 0); } //隐藏计算器按钮 -GameUI.hideCalBtn = function() { +GameUI.hideCalBtn = function () { set_group(78, 37, 0, 0, 0); } -GameUI.showCal = function() { +GameUI.showCal = function () { Utl.playSound(Game_Config.ClickButton.src_2); set_self(373, 7, GameData.Multiple, 0, 0); set_self(373, 20, GameData.Multiple.length * 36, 0, 0); set_self(373, 18, get_self(372, 18, 0, 0, 0) + get_self(372, 20, 0, 0, 0) / 2 - GameData.Multiple.length * 18, 0, 0); set_group(79, 37, 1, 0, 0); } -GameUI.hideCal = function() { +GameUI.hideCal = function () { set_group(79, 37, 0, 0, 0); } //得到计算的倍数 -GameUI.getMultiple = function() { +GameUI.getMultiple = function () { var result = min_replaceAll(String(GameData.Multiple), "b", ".", false); if (GameUI.checkNumber(result)) { var rt = Number(result); @@ -6475,7 +6499,7 @@ GameUI.getMultiple = function() { } } //输入是否合法 -GameUI.checkNumber = function(input_data) { // +GameUI.checkNumber = function (input_data) { // var reg = /^[0-9]+.?[0-9]*$/; if (reg.test(input_data)) { return true; @@ -6483,7 +6507,7 @@ GameUI.checkNumber = function(input_data) { // return false; } //获得计算结果 -GameUI.getResult = function(input_arr) { +GameUI.getResult = function (input_arr) { if (GameUI.checkNumber(rd)) { var rt = Number(rd); if (rt > 0) { @@ -6496,7 +6520,7 @@ GameUI.getResult = function(input_arr) { } } //输入 -GameUI.CalInput = function(spid) { +GameUI.CalInput = function (spid) { var multiple_temp = GameData.Multiple; if (spid >= 392 && spid <= 402) { var input; @@ -6564,7 +6588,7 @@ GameUI.CalInput = function(spid) { } } } -GameUI.OpenBind = function() { +GameUI.OpenBind = function () { GameUI.closePallet(); Utl.playSound(Game_Config.ClickButton.src_2); set_group(80, 37, 1, 0, 0); @@ -6579,11 +6603,11 @@ GameUI.OpenBind = function() { set_self(368, 7, "您已绑定邀请码,所绑定邀请码为:" + C_Player.invitecode, 0, 0); } } -GameUI.CloseBind = function() { +GameUI.CloseBind = function () { set_group(80, 37, 0, 0, 0); } -GameUI.addBroadcast = function(text) { +GameUI.addBroadcast = function (text) { if (Utl.isMainScene()) { GameData.BroadcastArray.push(text); if (!GameData.isBoardcast) { @@ -6591,7 +6615,7 @@ GameUI.addBroadcast = function(text) { } } } -GameUI.playBroadcast = function() { +GameUI.playBroadcast = function () { if (GameData.BroadcastArray.length > 0) { if (Utl.isMainScene()) { set_group(56, 37, 1, 0, 0); @@ -6607,52 +6631,52 @@ GameUI.playBroadcast = function() { } } -GameUI.clearBroadcast = function() { +GameUI.clearBroadcast = function () { GameData.BroadcastArray = []; play_ani(0, 390, 18); GameData.isBoardcast = false; set_group(56, 37, 0, 0, 0); } -GameUI.closeBroadcast = function() { +GameUI.closeBroadcast = function () { play_ani(0, 390, 18); GameData.isBoardcast = false; set_group(56, 37, 0, 0, 0); } -GameUI.closeBroadcastfromplayer = function() { +GameUI.closeBroadcastfromplayer = function () { //GameUI.closeBroadcast(); //GameUI.playBroadcast(); } -GameUI.showBackBtn = function() { +GameUI.showBackBtn = function () { if (GameData.LaunchMode == ConstVal.Launch_mode.from_hall) { set_self(465, 37, 1, 0, 0); } else { set_self(465, 37, 0, 0, 0); } } -GameUI.openAuth = function() { +GameUI.openAuth = function () { set_group(57, 37, 1, 0, 0); set_self(491, 37, 0, 0, 0); set_self(492, 37, 0, 0, 0); set_self(489, 7, "", 0, 0); set_self(490, 7, "", 0, 0); } -GameUI.closeAuth = function() { +GameUI.closeAuth = function () { set_group(57, 37, 0, 0, 0); } -GameUI.setLoginButton = function() { +GameUI.setLoginButton = function () { switch (GameData.loginBtnType) { - case ConstVal.loginButton.type1[0]: - set_self(3, 1, ConstVal.loginButton.type1[1], 0, 0, 0); - break; - case ConstVal.loginButton.type2[0]: - set_self(3, 1, ConstVal.loginButton.type2[1], 0, 0, 0); - break; + case ConstVal.loginButton.type1[0]: + set_self(3, 1, ConstVal.loginButton.type1[1], 0, 0, 0); + break; + case ConstVal.loginButton.type2[0]: + set_self(3, 1, ConstVal.loginButton.type2[1], 0, 0, 0); + break; } } -GameUI.playTextVoice = function(_text) { +GameUI.playTextVoice = function (_text) { for (var i = 0; i < Game_Config.Info.TextContent.length; i++) { if (Game_Config.Info.TextContent[i] == _text) { Func.play_wav(Game_Config.Info.TextContentMp3[i], 0); @@ -6660,7 +6684,7 @@ GameUI.playTextVoice = function(_text) { } } //打开星星争霸场 -GameUI.openWorldRoom = function() { +GameUI.openWorldRoom = function () { set_group(82, 37, 1, 0, 0); set_self(518, 43, GameData.nameImgFrame_2, 0, 0); if (GameData.worldRoomPage == 0) { @@ -6671,7 +6695,7 @@ GameUI.openWorldRoom = function() { } //前往系统房 -GameUI.goWorldRoom1 = function() { +GameUI.goWorldRoom1 = function () { GameData.worldRoomPage = 0; set_self(92, 43, 1, 0, 0); set_self(93, 43, 4, 0, 0); @@ -6681,7 +6705,7 @@ GameUI.goWorldRoom1 = function() { GameUI.createWorldRoom1(); } //前往自建房 -GameUI.goWorldRoom2 = function() { +GameUI.goWorldRoom2 = function () { GameData.worldRoomPage = 1; set_self(92, 43, 2, 0, 0); set_self(93, 43, 3, 0, 0); @@ -6690,7 +6714,7 @@ GameUI.goWorldRoom2 = function() { GameUI.createWorldRoom2(); } //关闭星星争霸场 -GameUI.closeWorldRoom = function() { +GameUI.closeWorldRoom = function () { //GameData.worldRoomPage = 0; set_group(82, 37, 0, 0, 0); set_group(96, 37, 0, 0, 0); @@ -6701,7 +6725,7 @@ GameUI.closeWorldRoom = function() { //GameData.worldRoomPly = []; } //设置星星争霸场数据 -GameUI.setWorldRoom = function(_pack) { +GameUI.setWorldRoom = function (_pack) { if (_pack.roomlist_system) { GameData.worldRoomSys = _pack.roomlist_system; for (var i = 0; i < GameData.worldRoomSys.length; i++) { @@ -6730,7 +6754,7 @@ GameUI.setWorldRoom = function(_pack) { } } //人数显示转换 -GameUI.convertPlayerCount = function(_pCount) { +GameUI.convertPlayerCount = function (_pCount) { //_pCount = 101000; try { _pCount = Number(_pCount); @@ -6744,7 +6768,7 @@ GameUI.convertPlayerCount = function(_pCount) { } } //创建星星争霸场相关精灵 -GameUI.createWorldRoom1 = function() { +GameUI.createWorldRoom1 = function () { //set_self(518,43,GameData.nameImgFrame_2,0,0); //GameData.worldRoomSys.push(GameData.worldRoomSys[0]); GameUI.removeWorldRoom1(); @@ -6787,20 +6811,20 @@ GameUI.createWorldRoom1 = function() { //console.log("x:"+get_self(bg_id,18,0,0,0));GameData.worldRoomSys[i].image //console.log("y:"+get_self(bg_id,19,0,0,0)); if (GameData.worldRoomSys[i].image) { - var topImg = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_1, ConstVal.worldRoom.topImg_sp, 0, - ConstVal.worldRoom.topImg_y + Math.floor(i / 2) * ConstVal.worldRoom.bgSpaceY, i + ConstVal.worldRoom.topImg_tag); + var topImg = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_1, ConstVal.worldRoom.topImg_sp, 0, + ConstVal.worldRoom.topImg_y + Math.floor(i / 2) * ConstVal.worldRoom.bgSpaceY, i + ConstVal.worldRoom.topImg_tag); set_self(topImg, 1, ConstVal.worldRoom.imgList[i], 0, 0); set_self(topImg, 18, get_self(bg_id, 18, 0, 0, 0) + get_self(bg_id, 20, 0, 0, 0) / 2 - get_self(topImg, 20, 0, 0, 0) / 2, 0, 0); - set_self(topImg,41,0,0,0); + set_self(topImg, 41, 0, 0, 0); } else { - var top_id = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_1, ConstVal.worldRoom.top_sp_1, 0, - ConstVal.worldRoom.top_sp_y_1 + Math.floor(i / 2) * ConstVal.worldRoom.bgSpaceY, i + ConstVal.worldRoom.top_sp_tag_1); + var top_id = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_1, ConstVal.worldRoom.top_sp_1, 0, + ConstVal.worldRoom.top_sp_y_1 + Math.floor(i / 2) * ConstVal.worldRoom.bgSpaceY, i + ConstVal.worldRoom.top_sp_tag_1); var top_info = GameData.worldRoomSys[i].title; //var top_info = "初级场"; set_self(top_id, 7, top_info, 0, 0); set_self(top_id, 18, get_self(bg_id, 18, 0, 0, 0) + get_self(bg_id, 20, 0, 0, 0) / 2 - top_info.gblen() * ConstVal.worldRoom.top_sp_width_1 / 2, 0, 0); - set_self(top_id,41,0,0,0); + set_self(top_id, 41, 0, 0, 0); } //if(GameData.worldRoomSys[i].title){ //var top_id = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_1,ConstVal.worldRoom.top_sp_1, @@ -6836,11 +6860,11 @@ GameUI.createWorldRoom1 = function() { //); //set_self(mult_id,7,mult_text,0,0); var mx = get_self(bg_id, 18, 0, 0, 0) + get_self(bg_id, 20, 0, 0, 0) / 2 - (get_self(ConstVal.worldRoom.multIcon_sp, 20, 0, 0, 0) + String(mult_text).length * ConstVal.worldRoom.multImgWidth + ConstVal.worldRoom.multIconImgSpace) / 2; - var multIcon = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_1, ConstVal.worldRoom.multIcon_sp, - get_self(bg_id, 18, 0, 0, 0) + get_self(bg_id, 20, 0, 0, 0) / 2 - get_self(ConstVal.worldRoom.multIcon_sp, 20, 0, 0, 0) / 2, - ConstVal.worldRoom.multIcon_y + Math.floor(i / 2) * ConstVal.worldRoom.bgSpaceY, i + ConstVal.worldRoom.multIcon_tag); - var multImg = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_1, ConstVal.worldRoom.multImg_sp, 0, - ConstVal.worldRoom.multImg_y + Math.floor(i / 2) * ConstVal.worldRoom.bgSpaceY, i + ConstVal.worldRoom.multImg_tag); + var multIcon = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_1, ConstVal.worldRoom.multIcon_sp, + get_self(bg_id, 18, 0, 0, 0) + get_self(bg_id, 20, 0, 0, 0) / 2 - get_self(ConstVal.worldRoom.multIcon_sp, 20, 0, 0, 0) / 2, + ConstVal.worldRoom.multIcon_y + Math.floor(i / 2) * ConstVal.worldRoom.bgSpaceY, i + ConstVal.worldRoom.multIcon_tag); + var multImg = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_1, ConstVal.worldRoom.multImg_sp, 0, + ConstVal.worldRoom.multImg_y + Math.floor(i / 2) * ConstVal.worldRoom.bgSpaceY, i + ConstVal.worldRoom.multImg_tag); set_self(multImg, 7, mult_text, 0, 0); set_self(multImg, 20, String(mult_text).length * ConstVal.worldRoom.multImgWidth, 0, 0); set_self(multImg, 18, 25 + get_self(multIcon, 18, 0, 0, 0) + get_self(multIcon, 20, 0, 0, 0) / 2 - get_self(multImg, 20, 0, 0, 0) / 2, 0, 0); @@ -6889,7 +6913,7 @@ GameUI.createWorldRoom1 = function() { //set_self(521,18,788,0,0); //} } -GameUI.createWorldRoom2 = function() { +GameUI.createWorldRoom2 = function () { GameUI.removeWorldRoom2(); set_group(96, 37, 0, 0, 0); set_group(97, 37, 1, 0, 0); @@ -6986,19 +7010,19 @@ GameUI.createWorldRoom2 = function() { } //删除星星争霸场数据包括创建的精灵 -GameUI.removeWorldRoom1 = function() { +GameUI.removeWorldRoom1 = function () { for (var i = 0; i < GameData.worldRoomSys.length; i++) { //系统房间 //大背景 ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_1, i + ConstVal.worldRoom.bg_sp_tag_1); //顶栏描述 ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_1, i + ConstVal.worldRoom.top_sp_tag_1); //房间信息描述 - ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_1,i+ConstVal.worldRoom.topImg_tag); + ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_1, i + ConstVal.worldRoom.topImg_tag); //星星背景 - ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_1,i+ConstVal.worldRoom.multIcon_tag); + ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_1, i + ConstVal.worldRoom.multIcon_tag); // - ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_1,i+ConstVal.worldRoom.multImg_tag); + ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_1, i + ConstVal.worldRoom.multImg_tag); //倍数 ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_1, i + ConstVal.worldRoom.mult_sp_tag_1); //人数 @@ -7041,7 +7065,7 @@ GameUI.removeWorldRoom1 = function() { } //删除星星争霸场数据包括创建的精灵 -GameUI.removeWorldRoom2 = function() { +GameUI.removeWorldRoom2 = function () { var pCountTag = ConstVal.worldRoom.pCount_sp_tag_2; for (var i = 0; i < GameData.worldRoomPly.length; i++) { //玩家房间 @@ -7075,14 +7099,14 @@ GameUI.removeWorldRoom2 = function() { } //GameData.worldRoomPly=[]; } -GameUI.switchSnrVideo = function(bTemp) { +GameUI.switchSnrVideo = function (bTemp) { if (bTemp) { set_self(3133, 43, 1, 0, 0); } else { set_self(3133, 43, 2, 0, 0); } } -GameUI.updateCloseState = function() { +GameUI.updateCloseState = function () { if (GameData.snrRoomList.isClose == 0) { set_self(3136, 37, 0, 0, 0); set_self(3164, 43, 1, 0, 0); @@ -7094,7 +7118,7 @@ GameUI.updateCloseState = function() { set_self(3164, 37, 0, 0, 0); } } -GameUI.clickSnrRoomState = function() { +GameUI.clickSnrRoomState = function () { if (GameData.snrRoomList.isClose) { GameData.senRoomState = 0; } else { @@ -7108,7 +7132,7 @@ GameUI.clickSnrRoomState = function() { data.isClose = GameData.senRoomState; Net.Send_switchRoomList(data); } -GameUI.clickSnrVideo = function() { +GameUI.clickSnrVideo = function () { if (GameData.sysConfig.videoConfig) { if (GameUI.Mem.snrOption.videoConfig) { GameUI.Mem.snrOption.videoConfig = null; @@ -7119,21 +7143,21 @@ GameUI.clickSnrVideo = function() { } } } -GameUI.clickSnrFobid = function() { +GameUI.clickSnrFobid = function () { //if (GameData.sysConfig.videoConfig) { - if (GameUI.Mem.snrOption.forbidSelect) { - GameUI.Mem.snrOption.forbidSelect = 0; - //GameUI.switchSnrForbid(); - GameUI.updateFobidSelect(); - } else { - GameUI.Mem.snrOption.forbidSelect = 1; - //GameUI.switchSnrForbid(); - GameUI.updateFobidSelect(); - } + if (GameUI.Mem.snrOption.forbidSelect) { + GameUI.Mem.snrOption.forbidSelect = 0; + //GameUI.switchSnrForbid(); + GameUI.updateFobidSelect(); + } else { + GameUI.Mem.snrOption.forbidSelect = 1; + //GameUI.switchSnrForbid(); + GameUI.updateFobidSelect(); + } //} } -GameUI.updateFobidSelect = function() { - if(GameData.snrRoomList.roomlist.length == 0){ +GameUI.updateFobidSelect = function () { + if (GameData.snrRoomList.roomlist.length == 0) { set_self(3257, 37, 0, 0, 0); set_self(3258, 37, 0, 0, 0); return; @@ -7142,21 +7166,21 @@ GameUI.updateFobidSelect = function() { set_self(3257, 37, 1, 0, 0); set_self(3258, 37, 1, 0, 0); set_self(3258, 43, 2, 0, 0); - } else if(GameData.snrRoomList.forbidSelect == 1){ + } else if (GameData.snrRoomList.forbidSelect == 1) { set_self(3257, 37, 1, 0, 0); set_self(3258, 37, 1, 0, 0); set_self(3258, 43, 1, 0, 0); } } -GameUI.switchSnrForbid = function(){ - if(GameUI.Mem.snrOption.forbidSelect){ - set_self(3258,43,1,0,0); - }else{ - set_self(3258,43,2,0,0); +GameUI.switchSnrForbid = function () { + if (GameUI.Mem.snrOption.forbidSelect) { + set_self(3258, 43, 1, 0, 0); + } else { + set_self(3258, 43, 2, 0, 0); } } //打开高级选项 -GameUI.openSeniorOptions = function(mode, roomtype, descrip, _profit) { //是否为星星场 +GameUI.openSeniorOptions = function (mode, roomtype, descrip, _profit) { //是否为星星场 //console.log(Desk); var _mode = 0; //mode = 1; @@ -7172,15 +7196,15 @@ GameUI.openSeniorOptions = function(mode, roomtype, descrip, _profit) { //是否 GameUI.Mem.snrOption.min = 0; GameUI.Mem.snrOption.sysRebate = parseInt(mult * GameData.sysConfig.rebateConfig.value / 100); //if(GameData.snrRoomList.forbidSelect){ - //GameUI.Mem.snrOption.forbidSelect = 1; + //GameUI.Mem.snrOption.forbidSelect = 1; //}else{ - //GameUI.Mem.snrOption.forbidSelect = 0; + //GameUI.Mem.snrOption.forbidSelect = 0; //} - + if (Game_Config.sysConfig.vipInfinite) { GameUI.Mem.snrOption.sysRebate = 0; } - if(!Game_Modify.getRoomMode(roomtype)){ + if (!Game_Modify.getRoomMode(roomtype)) { GameUI.Mem.snrOption.sysRebate = 0; } //GameUI.Mem.snrOption.min = parseInt(mult * GameData.sysConfig.rebateConfig.value / 100); @@ -7245,7 +7269,7 @@ GameUI.openSeniorOptions = function(mode, roomtype, descrip, _profit) { //是否 set_self(3133, 37, 0, 0, 0); set_self(3134, 37, 0, 0, 0); } - + //GameUI.switchSnrForbid(); //if(mode){ set_self(3100, 37, 0, 0, 0); @@ -7283,8 +7307,8 @@ GameUI.openSeniorOptions = function(mode, roomtype, descrip, _profit) { //是否 set_self(3158, 37, 0, 0, 0); set_self(3197, 41, 1, 0, 0); //set_self(3098, 7, "(" + GameUI.Mem.snrOption.min + "~" + GameUI.Mem.snrOption.max + ")"); - - + + //var value = GameUI.Mem.snrOption.tea; var value = 0; if (!value) { @@ -7307,7 +7331,7 @@ GameUI.openSeniorOptions = function(mode, roomtype, descrip, _profit) { //是否 GameUI.setNumberImage(3099, vl, 18); GameUI.adaptPositionX(3099, get_self(3097, 18, 0, 0, 0) + get_self(3097, 20, 0, 0, 0) / 2); var rCount = vl + GameUI.Mem.snrOption.sysRebate; - set_self(3098, 7, "系统收取: "+GameUI.Mem.snrOption.sysRebate+"\n您加收: "+vl+"\n合计: "+rCount); + set_self(3098, 7, "系统收取: " + GameUI.Mem.snrOption.sysRebate + "\n您加收: " + vl + "\n合计: " + rCount); // }else{ // set_self(3099,37,0,0,0); // set_self(3098,37,0,0,0); @@ -7316,16 +7340,16 @@ GameUI.openSeniorOptions = function(mode, roomtype, descrip, _profit) { //是否 //} } var val = Utl.ReadData(Utl.Config.rebateLimit); - set_self(3239,7,"低于免收值将不收取房间费",0,0); + set_self(3239, 7, "低于免收值将不收取房间费", 0, 0); GameUI.setNumberImage(3237, val, 18); - GameUI.adaptPositionSpid(3237,3236); + GameUI.adaptPositionSpid(3237, 3236); console.log(GameData.rebateConfig); - if(GameData.rebateConfig){ - if(GameData.rebateConfig.from == 3 && Game_Modify.getRoomMode(roomtype)){ - set_self(3238,37,0,0,0); - set_self(3236,37,0,0,0); - set_self(3237,37,0,0,0); - set_self(3239,37,0,0,0); + if (GameData.rebateConfig) { + if (GameData.rebateConfig.from == 3 && Game_Modify.getRoomMode(roomtype)) { + set_self(3238, 37, 0, 0, 0); + set_self(3236, 37, 0, 0, 0); + set_self(3237, 37, 0, 0, 0); + set_self(3239, 37, 0, 0, 0); } } //金币场 @@ -7342,20 +7366,20 @@ GameUI.openSeniorOptions = function(mode, roomtype, descrip, _profit) { //是否 set_self(3140, 37, 0, 0, 0); } set_self(3089, 18, 464, 0, 0, 0); - -/* - if(Game_Config.sysConfig.vipInfinite){ - set_self(3130,37,0,0,0); - set_self(3099,37,0,0,0); - set_self(3097,37,0,0,0); - set_self(580,37,0,0,0); - set_self(3158,37,0,0,0); - var txt = Logic.getRebateDes(mult); - set_self(3098,7,"系统每小局对每个玩家收取"+GameData.starName+":"+txt); - set_self(3098,18,186,0,0,0); - set_self(3098,37,1,0,0); - } - */ + + /* + if(Game_Config.sysConfig.vipInfinite){ + set_self(3130,37,0,0,0); + set_self(3099,37,0,0,0); + set_self(3097,37,0,0,0); + set_self(580,37,0,0,0); + set_self(3158,37,0,0,0); + var txt = Logic.getRebateDes(mult); + set_self(3098,7,"系统每小局对每个玩家收取"+GameData.starName+":"+txt); + set_self(3098,18,186,0,0,0); + set_self(3098,37,1,0,0); + } + */ set_self(3166, 37, 0, 0, 0); //set_self(3167,37,0,0,0); //set_self(3168,37,0,0,0); @@ -7387,13 +7411,13 @@ GameUI.openSeniorOptions = function(mode, roomtype, descrip, _profit) { //是否 if (Game_Config.sysConfig.vipInfinite && GameData.brNumber) { set_self(3134, 37, 1, 0, 0); set_self(3134, 18, 190, 0, 0); - if(GameData.brRebateUnit){ - if(GameData.brRebateUnit >= 10000){ - var txt = "每小局将收取您" + GameData.starName + ":" + GameData.brNumber; - }else{ - var txt = "每小局每"+GameData.brRebateUnit+"人收取您" + GameData.starName + ":" + GameData.brNumber; + if (GameData.brRebateUnit) { + if (GameData.brRebateUnit >= 10000) { + var txt = "每小局将收取您" + GameData.starName + ":" + GameData.brNumber; + } else { + var txt = "每小局每" + GameData.brRebateUnit + "人收取您" + GameData.starName + ":" + GameData.brNumber; } - }else{ + } else { var txt = "每小局将收取您" + GameData.starName + ":" + GameData.brNumber; } set_self(3134, 7, txt, 0, 0); @@ -7403,279 +7427,279 @@ GameUI.openSeniorOptions = function(mode, roomtype, descrip, _profit) { //是否 } -var snrInputCallback = function(value) { - Utl.closeInputPanel(); - var vl = Number(value); - if (Number(value) < GameUI.Mem.snrOption.min) { - GameUI.OpenTips("输入低于最小,已变更为最小值", ConstVal.Tips.time); - vl = GameUI.Mem.snrOption.min; - } else { - if (Number(value) > GameUI.Mem.snrOption.max) { - GameUI.OpenTips("输入高于最大,已变更为最大值", ConstVal.Tips.time); - vl = GameUI.Mem.snrOption.max; - } +var snrInputCallback = function (value) { + Utl.closeInputPanel(); + var vl = Number(value); + if (Number(value) < GameUI.Mem.snrOption.min) { + GameUI.OpenTips("输入低于最小,已变更为最小值", ConstVal.Tips.time); + vl = GameUI.Mem.snrOption.min; + } else { + if (Number(value) > GameUI.Mem.snrOption.max) { + GameUI.OpenTips("输入高于最大,已变更为最大值", ConstVal.Tips.time); + vl = GameUI.Mem.snrOption.max; } - GameUI.Mem.snrOption.number = vl; - Logic.saveTea(vl); - GameUI.Mem.snrOption.tea = vl; - GameUI.setNumberImage(3099, vl, 18); - GameUI.adaptPositionX(3099, get_self(3097, 18, 0, 0, 0) + get_self(3097, 20, 0, 0, 0) / 2); - var rCount = vl + GameUI.Mem.snrOption.sysRebate; - set_self(3098, 7, "系统收取: "+GameUI.Mem.snrOption.sysRebate+"\n您加收: "+vl+"\n合计: "+rCount); } - //关闭高级选项 - GameUI.closeSeniorOptions = function() { - //if(GameUI.Mem.snrOption.roomcode_string.length !=6 && GameUI.Mem.snrOption.roomcode_string.length != 0){ - //GameUI.OpenTips("房间号必须为6位或为空!"); - //return; + GameUI.Mem.snrOption.number = vl; + Logic.saveTea(vl); + GameUI.Mem.snrOption.tea = vl; + GameUI.setNumberImage(3099, vl, 18); + GameUI.adaptPositionX(3099, get_self(3097, 18, 0, 0, 0) + get_self(3097, 20, 0, 0, 0) / 2); + var rCount = vl + GameUI.Mem.snrOption.sysRebate; + set_self(3098, 7, "系统收取: " + GameUI.Mem.snrOption.sysRebate + "\n您加收: " + vl + "\n合计: " + rCount); +} +//关闭高级选项 +GameUI.closeSeniorOptions = function () { + //if(GameUI.Mem.snrOption.roomcode_string.length !=6 && GameUI.Mem.snrOption.roomcode_string.length != 0){ + //GameUI.OpenTips("房间号必须为6位或为空!"); + //return; + //} + //GameData.snrOption.profit = GameUI.Mem.snrOption.number; + //GameData.snrOption.roomcode = GameUI.Mem.snrOption.roomcode_string; + set_group(83, 37, 0, 0, 0); + if (Game_Modify.onCloseVip) { + Game_Modify.onCloseVip(); + } + + +} +//高级选项mouseup事件 +GameUI.seniorOptionsSlideEnd = function (gameid, spid_down, downx, downy, spid_up, upx, upy, timelong, no1, no2) { + var position = get_self(597, 18, 0, 0, 0) - GameUI.Mem.snrOption.start_x; + var new_position = GameUI.Mem.snrOption.start_x + Math.round(position / GameUI.Mem.snrOption.unit_px) * GameUI.Mem.snrOption.unit_px; + if (new_position < GameUI.Mem.snrOption.start_x) { + new_position = GameUI.Mem.snrOption.start_x; + } + if (new_position > GameUI.Mem.snrOption.end_x) { + new_position = GameUI.Mem.snrOption.end_x; + } + new_position < GameUI.Mem.snrOption.start_x ? new_position = GameUI.Mem.snrOption.start_x : (new_position > GameUI.Mem.snrOption.end_x ? new_position = GameUI.Mem.snrOption.end_x : true); + + set_self(597, 18, new_position, 0, 0); + set_self(593, 18, get_self(597, 18, 0, 0, 0) + 35 - get_self(593, 20, 0, 0, 0) / 2, 0, 0); + +} +//高级选项滑动 +GameUI.seniorOptionsSlide = function (gameid, spid, downx, downy, movex, movey, timelong, offmovex, offmovey, no1) { + var position = get_self(spid, 18, 0, 0, 0) + offmovex; + if (position >= GameUI.Mem.snrOption.start_x && position <= GameUI.Mem.snrOption.end_x) { + //if(position+offmovex){ + set_self(spid, 18, offmovex, 1, 0); + var count = Math.round((get_self(597, 18, 0, 0, 0) - GameUI.Mem.snrOption.start_x) / GameUI.Mem.snrOption.unit_px); + count < 0 ? count = 0 : (count > GameUI.Mem.snrOption.count ? count = GameUI.Mem.snrOption.count : true); + var _value = Number(count * GameUI.Mem.snrOption.unit) + Number(GameUI.Mem.snrOption.min); + GameUI.Mem.snrOption.number = _value; + _value > GameUI.Mem.snrOption.max ? _value = GameUI.Mem.snrOption.max : true; + set_self(593, 20, String(_value).length * GameUI.Mem.snrOption.number_1, 0, 0); + set_self(593, 7, _value, 0, 0); + set_self(593, 18, get_self(597, 18, 0, 0, 0) + 35 - String(_value).length * GameUI.Mem.snrOption.number_1 / 2, 0, 0); //} - //GameData.snrOption.profit = GameUI.Mem.snrOption.number; - //GameData.snrOption.roomcode = GameUI.Mem.snrOption.roomcode_string; - set_group(83, 37, 0, 0, 0); - if (Game_Modify.onCloseVip) { - Game_Modify.onCloseVip(); - } - - } - //高级选项mouseup事件 - GameUI.seniorOptionsSlideEnd = function(gameid, spid_down, downx, downy, spid_up, upx, upy, timelong, no1, no2) { - var position = get_self(597, 18, 0, 0, 0) - GameUI.Mem.snrOption.start_x; - var new_position = GameUI.Mem.snrOption.start_x + Math.round(position / GameUI.Mem.snrOption.unit_px) * GameUI.Mem.snrOption.unit_px; - if (new_position < GameUI.Mem.snrOption.start_x) { - new_position = GameUI.Mem.snrOption.start_x; - } - if (new_position > GameUI.Mem.snrOption.end_x) { - new_position = GameUI.Mem.snrOption.end_x; - } - new_position < GameUI.Mem.snrOption.start_x ? new_position = GameUI.Mem.snrOption.start_x : (new_position > GameUI.Mem.snrOption.end_x ? new_position = GameUI.Mem.snrOption.end_x : true); - - set_self(597, 18, new_position, 0, 0); - set_self(593, 18, get_self(597, 18, 0, 0, 0) + 35 - get_self(593, 20, 0, 0, 0) / 2, 0, 0); - +} +//创建高级选项房间列表 +GameUI.createSnrOptionRoomList = function () { + var roomInfo = ""; + var tea = 0; + if (GameData.snrRoomList.roomtype) { + roomInfo = Game_Modify.getFullRoomInfo(GameData.snrRoomList.roomtype); } - //高级选项滑动 - GameUI.seniorOptionsSlide = function(gameid, spid, downx, downy, movex, movey, timelong, offmovex, offmovey, no1) { - var position = get_self(spid, 18, 0, 0, 0) + offmovex; - if (position >= GameUI.Mem.snrOption.start_x && position <= GameUI.Mem.snrOption.end_x) { - //if(position+offmovex){ - set_self(spid, 18, offmovex, 1, 0); - var count = Math.round((get_self(597, 18, 0, 0, 0) - GameUI.Mem.snrOption.start_x) / GameUI.Mem.snrOption.unit_px); - count < 0 ? count = 0 : (count > GameUI.Mem.snrOption.count ? count = GameUI.Mem.snrOption.count : true); - var _value = Number(count * GameUI.Mem.snrOption.unit) + Number(GameUI.Mem.snrOption.min); - GameUI.Mem.snrOption.number = _value; - _value > GameUI.Mem.snrOption.max ? _value = GameUI.Mem.snrOption.max : true; - set_self(593, 20, String(_value).length * GameUI.Mem.snrOption.number_1, 0, 0); - set_self(593, 7, _value, 0, 0); - set_self(593, 18, get_self(597, 18, 0, 0, 0) + 35 - String(_value).length * GameUI.Mem.snrOption.number_1 / 2, 0, 0); - //} - } + if (GameData.snrRoomList.tea) { + tea = GameData.snrRoomList.tea; } - //创建高级选项房间列表 - GameUI.createSnrOptionRoomList = function() { - var roomInfo = ""; - var tea = 0; - if (GameData.snrRoomList.roomtype) { - roomInfo = Game_Modify.getFullRoomInfo(GameData.snrRoomList.roomtype); - } - if (GameData.snrRoomList.tea) { - tea = GameData.snrRoomList.tea; - } - var bg_width = get_self(ConstVal.snrRoomList.bg_spid, 20, 0, 0); - var bg_height = get_self(ConstVal.snrRoomList.bg_spid, 21, 0, 0); - var space = bg_height + ConstVal.snrRoomList.bg_space; - set_self(ConstVal.snrRoomList.f_spid, 18, ConstVal.snrRoomList.clip_x, 0, 0); - set_self(ConstVal.snrRoomList.f_spid, 19, ConstVal.snrRoomList.clip_y, 0, 0); - //set_self(ConstVal.snrRoomList.f_spid,20,GameData.snrRoomList.roomlist.length*space,0,0); - //set_self(ConstVal.snrRoomList.f_spid,21,ConstVal.snrRoomList.clip_h,0,0); + var bg_width = get_self(ConstVal.snrRoomList.bg_spid, 20, 0, 0); + var bg_height = get_self(ConstVal.snrRoomList.bg_spid, 21, 0, 0); + var space = bg_height + ConstVal.snrRoomList.bg_space; + set_self(ConstVal.snrRoomList.f_spid, 18, ConstVal.snrRoomList.clip_x, 0, 0); + set_self(ConstVal.snrRoomList.f_spid, 19, ConstVal.snrRoomList.clip_y, 0, 0); + //set_self(ConstVal.snrRoomList.f_spid,20,GameData.snrRoomList.roomlist.length*space,0,0); + //set_self(ConstVal.snrRoomList.f_spid,21,ConstVal.snrRoomList.clip_h,0,0); - set_self(ConstVal.snrRoomList.f_spid, 20, ConstVal.snrRoomList.clip_w, 0, 0); - set_self(ConstVal.snrRoomList.f_spid, 21, GameData.snrRoomList.roomlist.length * space, 0, 0); + set_self(ConstVal.snrRoomList.f_spid, 20, ConstVal.snrRoomList.clip_w, 0, 0); + set_self(ConstVal.snrRoomList.f_spid, 21, GameData.snrRoomList.roomlist.length * space, 0, 0); - for (var i = 0; i < GameData.snrRoomList.roomlist.length; i++) { - //背景 - var bg = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.bg_spid, ConstVal.snrRoomList.bg_x, ConstVal.snrRoomList.bg_y + i * space, i + ConstVal.snrRoomList.bg_tag); + for (var i = 0; i < GameData.snrRoomList.roomlist.length; i++) { + //背景 + var bg = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.bg_spid, ConstVal.snrRoomList.bg_x, ConstVal.snrRoomList.bg_y + i * space, i + ConstVal.snrRoomList.bg_tag); - //房号 - var rcode = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.rcode_spid, ConstVal.snrRoomList.rcode_x, ConstVal.snrRoomList.rcode_y + i * space, i + ConstVal.snrRoomList.rcode_tag); - //set_self(rcode,20,String(GameData.snrRoomList.roomlist[i]).length*GameUI.Mem.snrOption.number_4,0,0); - //set_self(rcode,18,ConstVal.snrRoomList.bg_x + i*space+(get_self(bg,20,0,0) - get_self(rcode,20,0,0))/2,0,0); - set_self(rcode, 20, String(GameData.snrRoomList.roomlist[i]).length * GameUI.Mem.snrOption.number_4, 0, 0); - set_self(rcode, 7, GameData.snrRoomList.roomlist[i], 0, 0); - //关闭按钮 - //var closeBtn = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid,ConstVal.snrRoomList.close_spid, - //ConstVal.snrRoomList.close_x + i*space,ConstVal.snrRoomList.close_y,i+ConstVal.snrRoomList.close_tag); - //修改按钮 - //var updateBtn = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid,ConstVal.snrRoomList.update_spid, - //ConstVal.snrRoomList.update_x + i*space,ConstVal.snrRoomList.update_y,i+ConstVal.snrRoomList.update_tag); - //开关按钮 - //var switchBtn = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid,ConstVal.snrRoomList.switch_spid, - //ConstVal.snrRoomList.switch_x + i*space,ConstVal.snrRoomList.switch_y,i+ConstVal.snrRoomList.switch_tag); - //if(GameData.snrRoomList[i].state == 0){//开启中 - //set_self(switchBtn,43,2,0,0); - //}else{ - //set_self(switchBtn,43,3,0,0); - //} - //房间信息描述 - var info = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.info_spid, ConstVal.snrRoomList.info_x, ConstVal.snrRoomList.info_y + i * space, i + ConstVal.snrRoomList.info_tag); - var infoText = roomInfo; - set_self(info, 7, infoText, 0, 0, 0); + //房号 + var rcode = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.rcode_spid, ConstVal.snrRoomList.rcode_x, ConstVal.snrRoomList.rcode_y + i * space, i + ConstVal.snrRoomList.rcode_tag); + //set_self(rcode,20,String(GameData.snrRoomList.roomlist[i]).length*GameUI.Mem.snrOption.number_4,0,0); + //set_self(rcode,18,ConstVal.snrRoomList.bg_x + i*space+(get_self(bg,20,0,0) - get_self(rcode,20,0,0))/2,0,0); + set_self(rcode, 20, String(GameData.snrRoomList.roomlist[i]).length * GameUI.Mem.snrOption.number_4, 0, 0); + set_self(rcode, 7, GameData.snrRoomList.roomlist[i], 0, 0); + //关闭按钮 + //var closeBtn = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid,ConstVal.snrRoomList.close_spid, + //ConstVal.snrRoomList.close_x + i*space,ConstVal.snrRoomList.close_y,i+ConstVal.snrRoomList.close_tag); + //修改按钮 + //var updateBtn = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid,ConstVal.snrRoomList.update_spid, + //ConstVal.snrRoomList.update_x + i*space,ConstVal.snrRoomList.update_y,i+ConstVal.snrRoomList.update_tag); + //开关按钮 + //var switchBtn = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid,ConstVal.snrRoomList.switch_spid, + //ConstVal.snrRoomList.switch_x + i*space,ConstVal.snrRoomList.switch_y,i+ConstVal.snrRoomList.switch_tag); + //if(GameData.snrRoomList[i].state == 0){//开启中 + //set_self(switchBtn,43,2,0,0); + //}else{ + //set_self(switchBtn,43,3,0,0); + //} + //房间信息描述 + var info = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.info_spid, ConstVal.snrRoomList.info_x, ConstVal.snrRoomList.info_y + i * space, i + ConstVal.snrRoomList.info_tag); + var infoText = roomInfo; + set_self(info, 7, infoText, 0, 0, 0); - // 抽成背景 - //var rcode_bg = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid,ConstVal.snrRoomList.rcode_bg_spid, - //ConstVal.snrRoomList.rcode_bg_x + i*space,ConstVal.snrRoomList.rcode_bg_y,i+ConstVal.snrRoomList.rcode_bg_tag); - //茶水费 - var profit = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.profit_spid, ConstVal.snrRoomList.profit_x, ConstVal.snrRoomList.profit_y + i * space, i + ConstVal.snrRoomList.profit_tag); - var profigText = "房费:" + tea; - - - if (!GameData.snrRoomList.rebateType) { - profigText += GameData.starName; - } else { - profigText += GameData.sysConfig.charmName; - } - if(GameData.snrRoomList.rebateLimit){ - profigText += " 免收:"+GameData.snrRoomList.rebateLimit; - } - set_self(profit, 7, profigText, 0, 0); - //set_self(profit,18,get_self(bg,18,0,0,0)+get_self(bg,20,0,0,0)/2-profigText.gblen()*ConstVal.snrRoomList.profit_w/2,0,0); - //视频房标志 - if (GameData.snrRoomList.videoConfig) { - var info = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.video_spid, ConstVal.snrRoomList.video_x, ConstVal.snrRoomList.video_y + i * space, i + ConstVal.snrRoomList.video_tag); - } - } - GameData.snrOptionLength = GameData.snrRoomList.roomlist.length; - } - //清除高级选项房间列表 - GameUI.clearSnrOptionRoomList = function() { - for (var i = 0; i < GameData.snrOptionLength; i++) { - //背景 - ifast_dllpritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.bg_tag + i); - //房号 - ifast_dllpritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.rcode_tag + i); - //房间信息描述 - ifast_dllpritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.info_tag + i); - //关闭按钮 - ifast_dllpritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.close_tag + i); - //抽成背景 - ifast_dllpritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.rcode_bg_tag + i); - //抽成 - ifast_dllpritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.profit_tag + i); - //视频房标志 - ifast_dllpritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.video_tag + i); - } - GameData.snrOptionLength = 0; - } - //根据值更新滑动块位置 - GameUI.updateSnrSlider = function(value) { - set_self(597, 18, GameUI.Mem.snrOption.start_x + ((GameData.snrOption.max - GameUI.Mem.snrOption.min) / value) * GameUI.Mem.snrOption.slider, 0, 0); - } - //更新高级选项界面 - GameUI.updateSnrOption = function() { - GameData.snrOption.profit < GameUI.Mem.snrOption.min ? GameData.snrOption.profit = GameUI.Mem.snrOption.min : (GameData.snrOption.profit > GameUI.Mem.snrOption.max ? GameData.snrOption.profit = GameUI.Mem.snrOption.max : true); - GameUI.Mem.snrOption.slider = get_self(597, 20, 0, 0, 0); - GameUI.Mem.snrOption.start_x = get_self(596, 18, 0, 0, 0); - GameUI.Mem.snrOption.end_x = get_self(596, 20, 0, 0, 0) + GameUI.Mem.snrOption.start_x - GameUI.Mem.snrOption.slider; - GameUI.Mem.snrOption.unit_px = (get_self(596, 20, 0, 0, 0) - GameUI.Mem.snrOption.slider) / ((GameUI.Mem.snrOption.max - GameUI.Mem.snrOption.min) / GameUI.Mem.snrOption.unit); - GameUI.Mem.snrOption.count = Math.round((GameUI.Mem.snrOption.end_x - GameUI.Mem.snrOption.start_x) / GameUI.Mem.snrOption.unit_px); - set_self(597, 18, GameUI.Mem.snrOption.start_x + ((GameData.snrOption.profit - GameUI.Mem.snrOption.min) / GameUI.Mem.snrOption.unit) * GameUI.Mem.snrOption.unit_px, 0, 0); - - set_self(593, 20, GameUI.Mem.snrOption.number_1 * String(GameData.snrOption.profit).length, 0, 0); - set_self(593, 7, GameData.snrOption.profit, 0, 0); - - set_self(594, 20, GameUI.Mem.snrOption.number_2 * String(GameUI.Mem.snrOption.min).length, 0, 0); - set_self(594, 7, GameUI.Mem.snrOption.min, 0, 0); - set_self(594, 18, GameUI.Mem.snrOption.start_x - get_self(594, 20, 0, 0, 0) - 10, 0, 0); - - set_self(595, 20, GameUI.Mem.snrOption.number_2 * String(GameUI.Mem.snrOption.max).length, 0, 0); - set_self(595, 7, GameUI.Mem.snrOption.max, 0, 0); + // 抽成背景 + //var rcode_bg = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid,ConstVal.snrRoomList.rcode_bg_spid, + //ConstVal.snrRoomList.rcode_bg_x + i*space,ConstVal.snrRoomList.rcode_bg_y,i+ConstVal.snrRoomList.rcode_bg_tag); + //茶水费 + var profit = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.profit_spid, ConstVal.snrRoomList.profit_x, ConstVal.snrRoomList.profit_y + i * space, i + ConstVal.snrRoomList.profit_tag); + var profigText = "房费:" + tea; - GameUI.Mem.snrOption.roomcode_string = String(GameData.snrOption.roomcode); - //GameUI.Mem.snrOption.roomcode_number = Number(GameData.snrOption.roomcode); - - - - GameUI.Mem.snrOption.number = GameData.snrOption.profit; - } - //打开排行榜 - GameUI.openRankList = function(temp) { - GameData.rankType = temp; - if(GameData.rankType){ - set_self(3234,43,1,0,0); - }else{ - set_self(3234,43,2,0,0); - } - GameUI.closePallet(); - if (GameData.rankList.length == 0) { - return; + if (!GameData.snrRoomList.rebateType) { + profigText += GameData.starName; } else { - GameData.rankListTag = 0; + profigText += GameData.sysConfig.charmName; } - set_self(639, 43, GameData.nameImgFrame_2, 0, 0); - for (var i = 0; i < GameData.rankList.length; i++) { - Func.up_imgurl(ConstVal.rankList.headsrc + i, GameData.rankList[i].headimg); + if (GameData.snrRoomList.rebateLimit) { + profigText += " 免收:" + GameData.snrRoomList.rebateLimit; } - if(!GameData.rankType){ - if (GameData.ownerNote && GameData.hallConfig.isReSetOwnerNote) { - GameData.rankList[0].signature = GameData.ownerNote; - } + set_self(profit, 7, profigText, 0, 0); + //set_self(profit,18,get_self(bg,18,0,0,0)+get_self(bg,20,0,0,0)/2-profigText.gblen()*ConstVal.snrRoomList.profit_w/2,0,0); + //视频房标志 + if (GameData.snrRoomList.videoConfig) { + var info = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.video_spid, ConstVal.snrRoomList.video_x, ConstVal.snrRoomList.video_y + i * space, i + ConstVal.snrRoomList.video_tag); } - if (GameData.rankList[GameData.rankListTag].signature) { - set_self(641, 7, "个性签名:\n"+GameData.rankList[GameData.rankListTag].signature,0,0); + } + GameData.snrOptionLength = GameData.snrRoomList.roomlist.length; +} +//清除高级选项房间列表 +GameUI.clearSnrOptionRoomList = function () { + for (var i = 0; i < GameData.snrOptionLength; i++) { + //背景 + ifast_dllpritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.bg_tag + i); + //房号 + ifast_dllpritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.rcode_tag + i); + //房间信息描述 + ifast_dllpritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.info_tag + i); + //关闭按钮 + ifast_dllpritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.close_tag + i); + //抽成背景 + ifast_dllpritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.rcode_bg_tag + i); + //抽成 + ifast_dllpritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.profit_tag + i); + //视频房标志 + ifast_dllpritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.video_tag + i); + } + GameData.snrOptionLength = 0; +} +//根据值更新滑动块位置 +GameUI.updateSnrSlider = function (value) { + set_self(597, 18, GameUI.Mem.snrOption.start_x + ((GameData.snrOption.max - GameUI.Mem.snrOption.min) / value) * GameUI.Mem.snrOption.slider, 0, 0); +} +//更新高级选项界面 +GameUI.updateSnrOption = function () { + GameData.snrOption.profit < GameUI.Mem.snrOption.min ? GameData.snrOption.profit = GameUI.Mem.snrOption.min : (GameData.snrOption.profit > GameUI.Mem.snrOption.max ? GameData.snrOption.profit = GameUI.Mem.snrOption.max : true); + GameUI.Mem.snrOption.slider = get_self(597, 20, 0, 0, 0); + GameUI.Mem.snrOption.start_x = get_self(596, 18, 0, 0, 0); + GameUI.Mem.snrOption.end_x = get_self(596, 20, 0, 0, 0) + GameUI.Mem.snrOption.start_x - GameUI.Mem.snrOption.slider; + GameUI.Mem.snrOption.unit_px = (get_self(596, 20, 0, 0, 0) - GameUI.Mem.snrOption.slider) / ((GameUI.Mem.snrOption.max - GameUI.Mem.snrOption.min) / GameUI.Mem.snrOption.unit); + GameUI.Mem.snrOption.count = Math.round((GameUI.Mem.snrOption.end_x - GameUI.Mem.snrOption.start_x) / GameUI.Mem.snrOption.unit_px); + set_self(597, 18, GameUI.Mem.snrOption.start_x + ((GameData.snrOption.profit - GameUI.Mem.snrOption.min) / GameUI.Mem.snrOption.unit) * GameUI.Mem.snrOption.unit_px, 0, 0); + + set_self(593, 20, GameUI.Mem.snrOption.number_1 * String(GameData.snrOption.profit).length, 0, 0); + set_self(593, 7, GameData.snrOption.profit, 0, 0); + + set_self(594, 20, GameUI.Mem.snrOption.number_2 * String(GameUI.Mem.snrOption.min).length, 0, 0); + set_self(594, 7, GameUI.Mem.snrOption.min, 0, 0); + set_self(594, 18, GameUI.Mem.snrOption.start_x - get_self(594, 20, 0, 0, 0) - 10, 0, 0); + + set_self(595, 20, GameUI.Mem.snrOption.number_2 * String(GameUI.Mem.snrOption.max).length, 0, 0); + set_self(595, 7, GameUI.Mem.snrOption.max, 0, 0); + + + GameUI.Mem.snrOption.roomcode_string = String(GameData.snrOption.roomcode); + //GameUI.Mem.snrOption.roomcode_number = Number(GameData.snrOption.roomcode); + + + + GameUI.Mem.snrOption.number = GameData.snrOption.profit; +} +//打开排行榜 +GameUI.openRankList = function (temp) { + GameData.rankType = temp; + if (GameData.rankType) { + set_self(3234, 43, 1, 0, 0); + } else { + set_self(3234, 43, 2, 0, 0); + } + GameUI.closePallet(); + if (GameData.rankList.length == 0) { + return; + } else { + GameData.rankListTag = 0; + } + set_self(639, 43, GameData.nameImgFrame_2, 0, 0); + for (var i = 0; i < GameData.rankList.length; i++) { + Func.up_imgurl(ConstVal.rankList.headsrc + i, GameData.rankList[i].headimg); + } + if (!GameData.rankType) { + if (GameData.ownerNote && GameData.hallConfig.isReSetOwnerNote) { + GameData.rankList[0].signature = GameData.ownerNote; + } + } + if (GameData.rankList[GameData.rankListTag].signature) { + set_self(641, 7, "个性签名:\n" + GameData.rankList[GameData.rankListTag].signature, 0, 0); + //set_self(640, 7, GameData.rankList[GameData.rankListTag].signature, 0, 0); + } else { + set_self(641, 7, "个性签名:"); + //set_self(640, 7, "", 0, 0); + } + if (GameData.rankType) { + var rText = "公告:\n"; + if (GameData.rankList[GameData.rankListTag].destwo) { + rText += "(" + GameData.rankList[GameData.rankListTag].destwo + ")\n"; + } + if (GameData.rankList[GameData.rankListTag].notice) { + rText += GameData.rankList[GameData.rankListTag].notice + } + set_self(640, 7, rText, 0, 0); + /* + if (GameData.rankList[GameData.rankListTag].destwo) { + set_self(640, 7, "公告:\n\n("+GameData.rankList[GameData.rankListTag].destwo+")\n"+GameData.rankList[GameData.rankListTag].notice,0,0); //set_self(640, 7, GameData.rankList[GameData.rankListTag].signature, 0, 0); } else { - set_self(641, 7, "个性签名:"); + set_self(640, 7, "公告:",0,0); //set_self(640, 7, "", 0, 0); - } - if(GameData.rankType){ - var rText = "公告:\n"; - if (GameData.rankList[GameData.rankListTag].destwo){ - rText += "("+GameData.rankList[GameData.rankListTag].destwo+")\n"; - } - if(GameData.rankList[GameData.rankListTag].notice){ - rText += GameData.rankList[GameData.rankListTag].notice - } - set_self(640, 7,rText,0,0); - /* - if (GameData.rankList[GameData.rankListTag].destwo) { - set_self(640, 7, "公告:\n\n("+GameData.rankList[GameData.rankListTag].destwo+")\n"+GameData.rankList[GameData.rankListTag].notice,0,0); - //set_self(640, 7, GameData.rankList[GameData.rankListTag].signature, 0, 0); - } else { - set_self(640, 7, "公告:",0,0); - //set_self(640, 7, "", 0, 0); - }*/ - - }else{ - set_self(640, 7, "",0,0); - } + }*/ - set_self(634, 1, ConstVal.rankList.headsrc + GameData.rankListTag, 0, 0); - set_self(636, 7, GameData.rankList[GameData.rankListTag].name, 0, 0); - set_self(637, 7, "ID:" + GameData.rankList[GameData.rankListTag].playerid, 0, 0); - set_self(638, 7, GameData.rankList[GameData.rankListTag].star, 0, 0); - - set_group(84, 37, 1, 0, 0); - - GameUI.createRankList(); + } else { + set_self(640, 7, "", 0, 0); } - //关闭排行榜 - GameUI.closeRankList = function() { - set_group(84, 37, 0, 0, 0); - } - //创建排行榜 - GameUI.createRankList = function() { - GameUI.removeRankList(); - set_self(ConstVal.rankList.f_spid, 19, ConstVal.rankList.clip_y, 0, 0); - var rankLengthTemp = GameData.rankList.length; - var space = get_self(ConstVal.rankList.bg_spid, 21, 0, 0, 0) + ConstVal.rankList.space; - set_self(ConstVal.rankList.f_spid, 21, space * rankLengthTemp, 0, 0); - for (var i = 0; i < rankLengthTemp; i++) { - //背景 - var bg = ifast_addtospritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.bg_spid, ConstVal.rankList.bg_x, ConstVal.rankList.bg_y + i * space + ConstVal.rankList.space, i + ConstVal.rankList.bg_tag); - switch (i) { + + set_self(634, 1, ConstVal.rankList.headsrc + GameData.rankListTag, 0, 0); + set_self(636, 7, GameData.rankList[GameData.rankListTag].name, 0, 0); + set_self(637, 7, "ID:" + GameData.rankList[GameData.rankListTag].playerid, 0, 0); + set_self(638, 7, GameData.rankList[GameData.rankListTag].star, 0, 0); + + set_group(84, 37, 1, 0, 0); + + GameUI.createRankList(); +} +//关闭排行榜 +GameUI.closeRankList = function () { + set_group(84, 37, 0, 0, 0); +} +//创建排行榜 +GameUI.createRankList = function () { + GameUI.removeRankList(); + set_self(ConstVal.rankList.f_spid, 19, ConstVal.rankList.clip_y, 0, 0); + var rankLengthTemp = GameData.rankList.length; + var space = get_self(ConstVal.rankList.bg_spid, 21, 0, 0, 0) + ConstVal.rankList.space; + set_self(ConstVal.rankList.f_spid, 21, space * rankLengthTemp, 0, 0); + for (var i = 0; i < rankLengthTemp; i++) { + //背景 + var bg = ifast_addtospritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.bg_spid, ConstVal.rankList.bg_x, ConstVal.rankList.bg_y + i * space + ConstVal.rankList.space, i + ConstVal.rankList.bg_tag); + switch (i) { case 0: //徽章 var badge = ifast_addtospritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.badge_spid, ConstVal.rankList.badge_x, ConstVal.rankList.badge_y + i * space + ConstVal.rankList.space, i + ConstVal.rankList.badge_tag); @@ -7693,101 +7717,101 @@ var snrInputCallback = function(value) { break; default: break; - } - //头像 - var headimg = ifast_addtospritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.headimg_spid, ConstVal.rankList.headimg_x, ConstVal.rankList.headimg_y + i * space + ConstVal.rankList.space, i + ConstVal.rankList.headimg_tag); - set_self(headimg, 1, ConstVal.rankList.headsrc + i, 0, 0); - //头像框 - var headfront = ifast_addtospritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.headfront_spid, ConstVal.rankList.headfront_x, ConstVal.rankList.headfront_y + i * space + ConstVal.rankList.space, i + ConstVal.rankList.headfront_tag); - //昵称 - var name = ifast_addtospritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.name_spid, ConstVal.rankList.name_x, ConstVal.rankList.name_y + i * space + ConstVal.rankList.space, i + ConstVal.rankList.name_tag); - //星星数 - if(!GameData.rankType){ - set_self(name, 7, GameData.rankList[i].name, 0, 0, 0); - }else{ - set_self(name, 7, "VIP房号:"+GameData.rankList[i].shortcode, 0, 0, 0); - } - var star = ifast_addtospritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.star_spid, ConstVal.rankList.star_x, ConstVal.rankList.star_y + i * space + ConstVal.rankList.space, i + ConstVal.rankList.star_tag); - //if(!GameData.rankType){ - set_self(star, 7, GameData.starName + ":" + GameData.rankList[i].star, 0, 0, 0); - //}else{ - // var dtxt = "公告:" + GameData.rankList[i].destwo; - // set_self(star, 7,Func.subString(dtxt,20,true), 0, 0, 0); - //} } - GameData.ranListLength = rankLengthTemp; - set_self(ConstVal.rankList.f_spid, 20, get_self(ConstVal.rankList.bg_spid, 20, 0, 0), 0, 0); - - } - //删除排行榜 - GameUI.removeRankList = function() { - for (var i = 0; i < GameData.ranListLength; i++) { - //背景 - ifast_dllpritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.bg_tag + i); - //徽章 - ifast_dllpritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.badge_tag + i); - //头像 - ifast_dllpritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.headimg_tag + i); - //头像框 - ifast_dllpritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.headfront_tag + i); - //昵称 - ifast_dllpritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.name_tag + i); - //星星 - ifast_dllpritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.star_tag + i); - } - GameData.ranListLength = 0; - } - //点击排行榜 - GameUI.clickRankList = function(tag) { - GameData.rankListTag = tag; - set_self(634, 1, ConstVal.rankList.headsrc + GameData.rankListTag, 0, 0); - set_self(636, 7, GameData.rankList[GameData.rankListTag].name, 0, 0); - set_self(637, 7, "ID:" + GameData.rankList[GameData.rankListTag].playerid, 0, 0); - set_self(638, 7, GameData.rankList[GameData.rankListTag].star, 0, 0); - /*if (GameData.rankList[GameData.rankListTag].signature) { - set_self(641,7,"个性签名:"); - set_self(640, 7, GameData.rankList[GameData.rankListTag].signature, 0, 0); + //头像 + var headimg = ifast_addtospritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.headimg_spid, ConstVal.rankList.headimg_x, ConstVal.rankList.headimg_y + i * space + ConstVal.rankList.space, i + ConstVal.rankList.headimg_tag); + set_self(headimg, 1, ConstVal.rankList.headsrc + i, 0, 0); + //头像框 + var headfront = ifast_addtospritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.headfront_spid, ConstVal.rankList.headfront_x, ConstVal.rankList.headfront_y + i * space + ConstVal.rankList.space, i + ConstVal.rankList.headfront_tag); + //昵称 + var name = ifast_addtospritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.name_spid, ConstVal.rankList.name_x, ConstVal.rankList.name_y + i * space + ConstVal.rankList.space, i + ConstVal.rankList.name_tag); + //星星数 + if (!GameData.rankType) { + set_self(name, 7, GameData.rankList[i].name, 0, 0, 0); } else { - set_self(641,7,""); - set_self(640, 7, "", 0, 0); - }*/ - if (GameData.rankList[GameData.rankListTag].signature) { - set_self(641, 7, "个性签名:\n"+GameData.rankList[GameData.rankListTag].signature,0,0); + set_self(name, 7, "VIP房号:" + GameData.rankList[i].shortcode, 0, 0, 0); + } + var star = ifast_addtospritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.star_spid, ConstVal.rankList.star_x, ConstVal.rankList.star_y + i * space + ConstVal.rankList.space, i + ConstVal.rankList.star_tag); + //if(!GameData.rankType){ + set_self(star, 7, GameData.starName + ":" + GameData.rankList[i].star, 0, 0, 0); + //}else{ + // var dtxt = "公告:" + GameData.rankList[i].destwo; + // set_self(star, 7,Func.subString(dtxt,20,true), 0, 0, 0); + //} + } + GameData.ranListLength = rankLengthTemp; + set_self(ConstVal.rankList.f_spid, 20, get_self(ConstVal.rankList.bg_spid, 20, 0, 0), 0, 0); + +} +//删除排行榜 +GameUI.removeRankList = function () { + for (var i = 0; i < GameData.ranListLength; i++) { + //背景 + ifast_dllpritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.bg_tag + i); + //徽章 + ifast_dllpritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.badge_tag + i); + //头像 + ifast_dllpritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.headimg_tag + i); + //头像框 + ifast_dllpritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.headfront_tag + i); + //昵称 + ifast_dllpritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.name_tag + i); + //星星 + ifast_dllpritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.star_tag + i); + } + GameData.ranListLength = 0; +} +//点击排行榜 +GameUI.clickRankList = function (tag) { + GameData.rankListTag = tag; + set_self(634, 1, ConstVal.rankList.headsrc + GameData.rankListTag, 0, 0); + set_self(636, 7, GameData.rankList[GameData.rankListTag].name, 0, 0); + set_self(637, 7, "ID:" + GameData.rankList[GameData.rankListTag].playerid, 0, 0); + set_self(638, 7, GameData.rankList[GameData.rankListTag].star, 0, 0); + /*if (GameData.rankList[GameData.rankListTag].signature) { + set_self(641,7,"个性签名:"); + set_self(640, 7, GameData.rankList[GameData.rankListTag].signature, 0, 0); + } else { + set_self(641,7,""); + set_self(640, 7, "", 0, 0); + }*/ + if (GameData.rankList[GameData.rankListTag].signature) { + set_self(641, 7, "个性签名:\n" + GameData.rankList[GameData.rankListTag].signature, 0, 0); + //set_self(640, 7, GameData.rankList[GameData.rankListTag].signature, 0, 0); + } else { + set_self(641, 7, "个性签名:"); + //set_self(640, 7, "", 0, 0); + } + if (GameData.rankType) { + var rText = "公告:\n"; + if (GameData.rankList[GameData.rankListTag].destwo) { + rText += "(" + GameData.rankList[GameData.rankListTag].destwo + ")\n"; + } + if (GameData.rankList[GameData.rankListTag].notice) { + rText += GameData.rankList[GameData.rankListTag].notice + } + set_self(640, 7, rText, 0, 0); + /* + if (GameData.rankList[GameData.rankListTag].destwo) { + set_self(640, 7, "公告:\n\n("+GameData.rankList[GameData.rankListTag].destwo+")\n"+GameData.rankList[GameData.rankListTag].notice,0,0); //set_self(640, 7, GameData.rankList[GameData.rankListTag].signature, 0, 0); } else { - set_self(641, 7, "个性签名:"); + set_self(640, 7, "公告:",0,0); //set_self(640, 7, "", 0, 0); - } - if(GameData.rankType){ - var rText = "公告:\n"; - if (GameData.rankList[GameData.rankListTag].destwo){ - rText += "("+GameData.rankList[GameData.rankListTag].destwo+")\n"; - } - if(GameData.rankList[GameData.rankListTag].notice){ - rText += GameData.rankList[GameData.rankListTag].notice - } - set_self(640, 7, rText,0,0); - /* - if (GameData.rankList[GameData.rankListTag].destwo) { - set_self(640, 7, "公告:\n\n("+GameData.rankList[GameData.rankListTag].destwo+")\n"+GameData.rankList[GameData.rankListTag].notice,0,0); - //set_self(640, 7, GameData.rankList[GameData.rankListTag].signature, 0, 0); - } else { - set_self(640, 7, "公告:",0,0); - //set_self(640, 7, "", 0, 0); - }*/ - }else{ - set_self(640, 7, "",0,0); - } + }*/ + } else { + set_self(640, 7, "", 0, 0); } - //打开分享引导 - GameUI.openShareImg = function() { - set_group(85, 37, 1, 0, 0); - } - //关闭分享引导 - GameUI.closeShareImg = function() { - set_group(85, 37, 0, 0, 0); - } -GameUI.SetImg = function(base64) { +} +//打开分享引导 +GameUI.openShareImg = function () { + set_group(85, 37, 1, 0, 0); +} +//关闭分享引导 +GameUI.closeShareImg = function () { + set_group(85, 37, 0, 0, 0); +} +GameUI.SetImg = function (base64) { set_group(86, 37, 1, 0, 0); //var div_game = window.document.getElementById("div_game"); var dH = window.innerHeight * ConstVal.screenShotParam; @@ -7838,12 +7862,12 @@ GameUI.SetImg = function(base64) { } -GameUI.HideImg = function() { +GameUI.HideImg = function () { var div_result = window.document.getElementById("div_result"); div_result.style.display = "none"; set_group(86, 37, 0, 0, 0); } -GameUI.screenShot = function(spidList) { +GameUI.screenShot = function (spidList) { //if(yyy==1){return;} //yyy=1; //var canvas1 = document.createElement("canvas"); @@ -7886,50 +7910,50 @@ GameUI.screenShot = function(spidList) { } -GameUI.gameenddraw = function(gameid, spid, times, timelong) { +GameUI.gameenddraw = function (gameid, spid, times, timelong) { //更新完成代码 switch (GameData.screenShotStage) { - case 1: - //console.log("screenShotStage"); - GameData.screenShotStage = 0; - var imageData = iui.backBuffer.toDataURL("image/jpeg", ConstVal.screenShotParam); - for (var i = 0; i < GameData.screenShotSpidList.length; i++) { - set_self(GameData.screenShotSpidList[i], 37, 1, 0, 0); - } - GameUI.SetImg(imageData); + case 1: + //console.log("screenShotStage"); + GameData.screenShotStage = 0; + var imageData = iui.backBuffer.toDataURL("image/jpeg", ConstVal.screenShotParam); + for (var i = 0; i < GameData.screenShotSpidList.length; i++) { + set_self(GameData.screenShotSpidList[i], 37, 1, 0, 0); + } + GameUI.SetImg(imageData); - GameData.screenShotSpidList = []; - break; + GameData.screenShotSpidList = []; + break; } }; -GameUI.adaptWidthNumber = function(spid, text, width) { +GameUI.adaptWidthNumber = function (spid, text, width) { set_self(spid, 20, String(text).length * width, 0, 0); } -GameUI.adaptPositionX = function(spid, adpX) { +GameUI.adaptPositionX = function (spid, adpX) { set_self(spid, 18, adpX - get_self(spid, 20, 0, 0, 0) / 2, 0, 0); } -GameUI.adaptPositionSpid = function(spid, adpSpid) { +GameUI.adaptPositionSpid = function (spid, adpSpid) { set_self(spid, 18, get_self(adpSpid, 18, 0, 0, 0) + get_self(adpSpid, 20, 0, 0, 0) / 2 - get_self(spid, 20, 0, 0, 0) / 2, 0, 0); } -GameUI.setNumberImage = function(spid, text, width) { +GameUI.setNumberImage = function (spid, text, width) { set_self(spid, 7, text, 0, 0); set_self(spid, 20, String(text).length * width, 0, 0); } //打开数字输入面板 -GameUI.openInputPanel = function(_msg, _callback,begin0) { +GameUI.openInputPanel = function (_msg, _callback, begin0) { if (_callback) { GameData.inputCallBack = _callback; } - if(begin0){ + if (begin0) { GameData.begin0 = true; - }else{ + } else { GameData.begin0 = false; } - if(GameData.begin0){ + if (GameData.begin0) { GameData.inputPanelData = ""; - }else{ + } else { GameData.inputPanelData = "0"; } set_self(3001, 7, _msg, 0, 0); @@ -7941,16 +7965,16 @@ GameUI.openInputPanel = function(_msg, _callback,begin0) { } //关闭数字输入面板 -GameUI.closeInputPanel = function() { +GameUI.closeInputPanel = function () { set_group(87, 37, 0, 0, 0); } -GameUI.inputPanel = function(spid) { +GameUI.inputPanel = function (spid) { if (spid >= 661 && spid <= 670) { //数字输入 if (GameData.inputPanelData.length > 17) { GameUI.OpenTips("输入超出范围", ConstVal.Tips.time); return; } - if(!GameData.begin0){ + if (!GameData.begin0) { if (GameData.inputPanelData == "0") { // GameData.inputPanelData = String(spid - 661); GameUI.setNumberImage(3003, GameData.inputPanelData, 51); @@ -7960,7 +7984,7 @@ GameUI.inputPanel = function(spid) { GameUI.setNumberImage(3003, GameData.inputPanelData, 51); GameUI.adaptPositionSpid(3003, 3002); } - }else{ + } else { GameData.inputPanelData += String(spid - 661); GameUI.setNumberImage(3003, GameData.inputPanelData, 51); GameUI.adaptPositionSpid(3003, 3002); @@ -7968,10 +7992,10 @@ GameUI.inputPanel = function(spid) { } if (spid == 671) { //删除 if (GameData.inputPanelData.length == 1) { - if(GameData.begin0){ + if (GameData.begin0) { GameData.inputPanelData = ""; - }else{ - GameData.inputPanelData = "0"; + } else { + GameData.inputPanelData = "0"; } } else { GameData.inputPanelData = GameData.inputPanelData.substring(0, GameData.inputPanelData.length - 1); @@ -7982,33 +8006,33 @@ GameUI.inputPanel = function(spid) { if (spid == 3000) { //确定 //console.log(Number(GameData.inputPanelData)); //GameUI.closeInputPanel(); - if(GameData.begin0){ - Game_Modify.onCheckInput(GameData.inputPanelData); - }else{ - Game_Modify.onCheckInput(Number(GameData.inputPanelData)); + if (GameData.begin0) { + Game_Modify.onCheckInput(GameData.inputPanelData); + } else { + Game_Modify.onCheckInput(Number(GameData.inputPanelData)); } - if(GameData.begin0){ + if (GameData.begin0) { if (GameData.inputCallBack) { GameData.inputCallBack(GameData.inputPanelData); } - }else{ + } else { if (GameData.inputCallBack) { GameData.inputCallBack(Number(GameData.inputPanelData)); } - } - + } + } } -GameUI.showNeighbor = function() { +GameUI.showNeighbor = function () { set_group(88, 37, 1, 0, 0); } -GameUI.hideNeighbor = function() { +GameUI.hideNeighbor = function () { set_group(88, 37, 0, 0, 0); } -GameUI.updateInsertHTML = function() { +GameUI.updateInsertHTML = function () { //Logic.getHTML(); return; //if(!GameData.hallConfig.activity){ @@ -8030,7 +8054,7 @@ GameUI.updateInsertHTML = function() { } } -GameUI.openTips2 = function(_msg, time) { +GameUI.openTips2 = function (_msg, time) { try { //if(GameData.tipTimer2){ // GameData.tipTimer2 = null; @@ -8067,7 +8091,7 @@ GameUI.openTips2 = function(_msg, time) { } } -GameUI.closeTips2 = function() { +GameUI.closeTips2 = function () { //if(GameData.tipTimer2){ // GameData.tipTimer2 = null; // clearTimeout(GameData.tipTimer2); @@ -8075,7 +8099,7 @@ GameUI.closeTips2 = function() { set_group(89, 37, 0, 0, 0); } //更新常驻活动按钮 -GameUI.updateActBtn = function() { +GameUI.updateActBtn = function () { if (ConstVal.isGameHall) { set_self(3018, 37, 0, 0, 0); return; @@ -8090,11 +8114,11 @@ GameUI.updateActBtn = function() { } } //打开保险箱 -GameUI.openWareHouse = function() { +GameUI.openWareHouse = function () { GameData.wareHouse.safeInputCount = -1, //保险箱存入取出数量 - GameData.wareHouse.safePassWord = -1, //保险箱存入取出密码 - GameData.wareHouse.inputNumber = 0, //输入的数字 - GameUI.closePallet(); + GameData.wareHouse.safePassWord = -1, //保险箱存入取出密码 + GameData.wareHouse.inputNumber = 0, //输入的数字 + GameUI.closePallet(); var bTemp = C_Player.bankpwd; set_group(91, 37, 1, 0, 0); set_self(3031, 37, 0, 0, 0); @@ -8105,17 +8129,17 @@ GameUI.openWareHouse = function() { set_self(3078, 43, Utl.getNameImgFrame_1(), 0, 0); if (bTemp) { //已绑定 switch (GameData.hallConfig.wareHouse) { - case 2: - GameData.wareHouse.selectType = 5; - GameData.wareHouse.page = 2; - break; - case 1: - case 3: - case 4: - case 5: - GameData.wareHouse.selectType = 3; - GameData.wareHouse.page = 1; - break; + case 2: + GameData.wareHouse.selectType = 5; + GameData.wareHouse.page = 2; + break; + case 1: + case 3: + case 4: + case 5: + GameData.wareHouse.selectType = 3; + GameData.wareHouse.page = 1; + break; } //GameData.wareHouse.selectType = 3; GameUI.selectWareHouseInputType(GameData.wareHouse.selectType); @@ -8128,594 +8152,594 @@ GameUI.openWareHouse = function() { GameUI.selectWareHouseInputType(GameData.wareHouse.selectType); } } -GameUI.closeWareHouse = function() { +GameUI.closeWareHouse = function () { set_group(91, 37, 0, 0, 0); set_group(92, 37, 0, 0, 0); set_group(93, 37, 0, 0, 0); set_group(94, 37, 0, 0, 0); } //显示仓库标签页 -GameUI.showWareHouseTable = function() { +GameUI.showWareHouseTable = function () { switch (GameData.hallConfig.wareHouse) { - case 0: - set_self(3059, 37, 0, 0, 0); - set_self(3060, 37, 0, 0, 0); - set_self(3061, 37, 0, 0, 0); - set_self(3062, 37, 0, 0, 0); - break; - case 1: - case 2: - set_self(3059, 37, 1, 0, 0); - set_self(3060, 37, 0, 0, 0); - set_self(3061, 37, 1, 0, 0); - set_self(3062, 37, 0, 0, 0); - break; + case 0: + set_self(3059, 37, 0, 0, 0); + set_self(3060, 37, 0, 0, 0); + set_self(3061, 37, 0, 0, 0); + set_self(3062, 37, 0, 0, 0); + break; + case 1: + case 2: + set_self(3059, 37, 1, 0, 0); + set_self(3060, 37, 0, 0, 0); + set_self(3061, 37, 1, 0, 0); + set_self(3062, 37, 0, 0, 0); + break; - case 3: - case 4: - case 5: - GameUI.switchWareHousePage(GameData.wareHouse.page); - set_self(3059, 37, 1, 0, 0); - set_self(3060, 37, 1, 0, 0); - set_self(3061, 37, 1, 0, 0); - set_self(3062, 37, 1, 0, 0); - set_self(3081,1,170,0,0); - set_self(3082,7,'',0,0); - set_self(3083,7,'',0,0); - break; + case 3: + case 4: + case 5: + GameUI.switchWareHousePage(GameData.wareHouse.page); + set_self(3059, 37, 1, 0, 0); + set_self(3060, 37, 1, 0, 0); + set_self(3061, 37, 1, 0, 0); + set_self(3062, 37, 1, 0, 0); + set_self(3081, 1, 170, 0, 0); + set_self(3082, 7, '', 0, 0); + set_self(3083, 7, '', 0, 0); + break; } switch (GameData.wareHouse.page) { - case 1: - //保险箱 + case 1: + //保险箱 - set_self(3059, 43, 1, 0, 0); - set_self(3060, 43, 2, 0, 0); - set_self(3061, 43, 1, 0, 0); - set_self(3062, 43, 4, 0, 0); - break; - case 2: - //仓库 + set_self(3059, 43, 1, 0, 0); + set_self(3060, 43, 2, 0, 0); + set_self(3061, 43, 1, 0, 0); + set_self(3062, 43, 4, 0, 0); + break; + case 2: + //仓库 - set_self(3059, 43, 2, 0, 0); - set_self(3060, 43, 1, 0, 0); - set_self(3061, 43, 2, 0, 0); - set_self(3062, 43, 3, 0, 0); + set_self(3059, 43, 2, 0, 0); + set_self(3060, 43, 1, 0, 0); + set_self(3061, 43, 2, 0, 0); + set_self(3062, 43, 3, 0, 0); - break; + break; } } //显示初始化密码界面 -GameUI.showInitPassWord = function() { +GameUI.showInitPassWord = function () { set_group(93, 37, 1, 0, 0); } //切换仓库页 -GameUI.switchWareHousePage = function(page, bTemp) { +GameUI.switchWareHousePage = function (page, bTemp) { var bTemp = C_Player.bankpwd; GameData.wareHouse.page = page; switch (page) { - case 1: - //保险箱 - //set_self(3059,18,ConstVal.wareHouse.tableBgX[1],0,0); - //set_self(3060,18,ConstVal.wareHouse.tableBgX[0],0,0); - //set_self(3061,18,ConstVal.wareHouse.tableTextX[1],0,0); - //set_self(3062,18,ConstVal.wareHouse.tableTextX[0],0,0); + case 1: + //保险箱 + //set_self(3059,18,ConstVal.wareHouse.tableBgX[1],0,0); + //set_self(3060,18,ConstVal.wareHouse.tableBgX[0],0,0); + //set_self(3061,18,ConstVal.wareHouse.tableTextX[1],0,0); + //set_self(3062,18,ConstVal.wareHouse.tableTextX[0],0,0); - set_self(3059, 43, 1, 0, 0); - set_self(3060, 43, 2, 0, 0); - set_self(3061, 43, 1, 0, 0); - set_self(3062, 43, 4, 0, 0); - if (bTemp) { - GameData.wareHouse.selectType = 3; - //GameUI.updateWareHouseInput(); - } else { - GameData.wareHouse.selectType = 1; - GameUI.showInitPassWord(); - } - GameUI.updateWareHouseInput(bTemp); - GameUI.selectWareHouseInputType(GameData.wareHouse.selectType); - break; - case 2: - //仓库 - //set_self(3059,18,ConstVal.wareHouse.tableBgX[0],0,0); - //set_self(3060,18,ConstVal.wareHouse.tableBgX[1],0,0); - //set_self(3061,18,ConstVal.wareHouse.tableTextX[0],0,0); - //set_self(3062,18,ConstVal.wareHouse.tableTextX[1],0,0); - GameUI.updateWareHousePlayerInfo(); - set_self(3059, 43, 2, 0, 0); - set_self(3060, 43, 1, 0, 0); - set_self(3061, 43, 2, 0, 0); - set_self(3062, 43, 3, 0, 0); - if (bTemp) { - GameData.wareHouse.selectType = 5; - //GameUI.updateWareHouseInput(); - } else { - GameUI.showInitPassWord(); + set_self(3059, 43, 1, 0, 0); + set_self(3060, 43, 2, 0, 0); + set_self(3061, 43, 1, 0, 0); + set_self(3062, 43, 4, 0, 0); + if (bTemp) { + GameData.wareHouse.selectType = 3; + //GameUI.updateWareHouseInput(); + } else { + GameData.wareHouse.selectType = 1; + GameUI.showInitPassWord(); + } + GameUI.updateWareHouseInput(bTemp); + GameUI.selectWareHouseInputType(GameData.wareHouse.selectType); + break; + case 2: + //仓库 + //set_self(3059,18,ConstVal.wareHouse.tableBgX[0],0,0); + //set_self(3060,18,ConstVal.wareHouse.tableBgX[1],0,0); + //set_self(3061,18,ConstVal.wareHouse.tableTextX[0],0,0); + //set_self(3062,18,ConstVal.wareHouse.tableTextX[1],0,0); + GameUI.updateWareHousePlayerInfo(); + set_self(3059, 43, 2, 0, 0); + set_self(3060, 43, 1, 0, 0); + set_self(3061, 43, 2, 0, 0); + set_self(3062, 43, 3, 0, 0); + if (bTemp) { + GameData.wareHouse.selectType = 5; + //GameUI.updateWareHouseInput(); + } else { + GameUI.showInitPassWord(); - } - GameUI.updateWareHouseInput(bTemp); - GameUI.selectWareHouseInputType(GameData.wareHouse.selectType); - break; + } + GameUI.updateWareHouseInput(bTemp); + GameUI.selectWareHouseInputType(GameData.wareHouse.selectType); + break; } GameUI.updateWareHouseCheckBox(); } //初始化赠送数据 -GameUI.initGiveData = function(){ +GameUI.initGiveData = function () { GameData.wareHouse.pNickName = ''; - GameData.wareHouse.pId=''; - GameData.wareHouse.pImg=''; - GameData.wareHouse.pInputPassWord=''; + GameData.wareHouse.pId = ''; + GameData.wareHouse.pImg = ''; + GameData.wareHouse.pInputPassWord = ''; GameData.wareHouse.pInputCount = -1; GameData.wareHouse.pInputId = -1; -} +} //更新输入框内容 -GameUI.updateWareHouseInput = function() { +GameUI.updateWareHouseInput = function () { //var bTemp = C_Player.bankpwd; GameUI.updateCount(); switch (GameData.wareHouse.selectType) { - case 1: + case 1: //初始化密码 - case 2: - set_group(93, 37, 1, 0, 0); - set_group(94, 37, 0, 0, 0); - set_group(92, 37, 0, 0, 0); - if (GameData.wareHouse.initPassWord1 == GameData.wareHouse.initPassWord2) { - if (GameData.wareHouse.initPassWord1 != -1 && String(GameData.wareHouse.initPassWord1).length != 0) { - set_self(3073, 7, "输入符合规则!"); - } else { - set_self(3073, 7, "密码不能为空!"); - set_self(3069, 37, 1, 0, 0); - } - } else { - if (GameData.wareHouse.selectType == 1) { - set_self(3073, 7, "输入密码....."); - } else { - if (GameData.wareHouse.initPassWord2 != -1 || String(GameData.wareHouse.initPassWord2).length == 0) { - set_self(3073, 7, "两次输入不一致!"); + case 2: + set_group(93, 37, 1, 0, 0); + set_group(94, 37, 0, 0, 0); + set_group(92, 37, 0, 0, 0); + if (GameData.wareHouse.initPassWord1 == GameData.wareHouse.initPassWord2) { + if (GameData.wareHouse.initPassWord1 != -1 && String(GameData.wareHouse.initPassWord1).length != 0) { + set_self(3073, 7, "输入符合规则!"); } else { - set_self(3073, 7, "请再次输入密码....."); + set_self(3073, 7, "密码不能为空!"); + set_self(3069, 37, 1, 0, 0); + } + } else { + if (GameData.wareHouse.selectType == 1) { + set_self(3073, 7, "输入密码....."); + } else { + if (GameData.wareHouse.initPassWord2 != -1 || String(GameData.wareHouse.initPassWord2).length == 0) { + set_self(3073, 7, "两次输入不一致!"); + } else { + set_self(3073, 7, "请再次输入密码....."); + } + } + } - - - } - if (GameData.wareHouse.initPassWord2 == -1 || String(GameData.wareHouse.initPassWord2).length == 0) { - set_self(3072, 37, 0, 0, 0); - set_self(3070, 37, 1, 0, 0); - } else { - set_self(3072, 37, 1, 0, 0); - set_self(3070, 37, 0, 0, 0); - GameUI.setNumberImage(3072, GameData.wareHouse.initPassWord2, 27); - } - if (GameData.wareHouse.initPassWord1 == -1 || String(GameData.wareHouse.initPassWord1).length == 0) { - set_self(3071, 37, 0, 0, 0); - set_self(3069, 37, 1, 0, 0); - } else { - set_self(3071, 37, 1, 0, 0); - set_self(3069, 37, 0, 0, 0); - GameUI.setNumberImage(3071, GameData.wareHouse.initPassWord1, 27); - } - break; + if (GameData.wareHouse.initPassWord2 == -1 || String(GameData.wareHouse.initPassWord2).length == 0) { + set_self(3072, 37, 0, 0, 0); + set_self(3070, 37, 1, 0, 0); + } else { + set_self(3072, 37, 1, 0, 0); + set_self(3070, 37, 0, 0, 0); + GameUI.setNumberImage(3072, GameData.wareHouse.initPassWord2, 27); + } + if (GameData.wareHouse.initPassWord1 == -1 || String(GameData.wareHouse.initPassWord1).length == 0) { + set_self(3071, 37, 0, 0, 0); + set_self(3069, 37, 1, 0, 0); + } else { + set_self(3071, 37, 1, 0, 0); + set_self(3069, 37, 0, 0, 0); + GameUI.setNumberImage(3071, GameData.wareHouse.initPassWord1, 27); + } + break; //case 2://初始化密码二次输入 //break; - case 3: + case 3: //保险箱数量 //set_group(93,37,0,0,0); //break; - case 4: - //保险箱密码 - set_group(94, 37, 0, 0, 0); - set_group(93, 37, 0, 0, 0); - set_group(92, 37, 1, 0, 0); - if (GameData.wareHouse.safeInputCount == -1 || String(GameData.wareHouse.safeInputCount).length == 0) { - set_self(3056, 37, 0, 0, 0); - set_self(3040, 37, 1, 0, 0); + case 4: + //保险箱密码 + set_group(94, 37, 0, 0, 0); + set_group(93, 37, 0, 0, 0); + set_group(92, 37, 1, 0, 0); + if (GameData.wareHouse.safeInputCount == -1 || String(GameData.wareHouse.safeInputCount).length == 0) { + set_self(3056, 37, 0, 0, 0); + set_self(3040, 37, 1, 0, 0); - } else { - set_self(3056, 37, 1, 0, 0); - set_self(3040, 37, 0, 0, 0); - GameUI.setNumberImage(3056, GameData.wareHouse.safeInputCount, 27); - } - if (GameData.wareHouse.safePassWord == -1 || String(GameData.wareHouse.safePassWord).length == 0) { - set_self(3058, 37, 0, 0, 0); - set_self(3041, 37, 1, 0, 0); - } else { - set_self(3058, 37, 1, 0, 0); - set_self(3041, 37, 0, 0, 0); - GameUI.setNumberImage(3058, GameData.wareHouse.safePassWord, 27); - } - break; - case 5: + } else { + set_self(3056, 37, 1, 0, 0); + set_self(3040, 37, 0, 0, 0); + GameUI.setNumberImage(3056, GameData.wareHouse.safeInputCount, 27); + } + if (GameData.wareHouse.safePassWord == -1 || String(GameData.wareHouse.safePassWord).length == 0) { + set_self(3058, 37, 0, 0, 0); + set_self(3041, 37, 1, 0, 0); + } else { + set_self(3058, 37, 1, 0, 0); + set_self(3041, 37, 0, 0, 0); + GameUI.setNumberImage(3058, GameData.wareHouse.safePassWord, 27); + } + break; + case 5: //玩家id - case 6: + case 6: //赠送数量 - case 7: - //密码 - set_group(93, 37, 0, 0, 0); - set_group(92, 37, 0, 0, 0); - set_group(94, 37, 1, 0, 0); - if (GameData.hallConfig.wareHouse == 3) { - set_self(3076, 37, 0, 0, 0); - set_self(3078, 37, 0, 0, 0); - set_self(3080, 37, 0, 0, 0); - } else if (GameData.hallConfig.wareHouse == 4) { - set_self(3075, 37, 0, 0, 0); - set_self(3077, 37, 0, 0, 0); - set_self(3079, 37, 0, 0, 0); - } - if (GameData.wareHouse.pInputId == -1 || String(GameData.wareHouse.pInputId).length == 0) { - set_self(3093, 37, 0, 0, 0); - set_self(3090, 37, 1, 0, 0); - //GameUI.setNumberImage(3079,0,27); - } else { - set_self(3093, 37, 1, 0, 0); - set_self(3090, 37, 0, 0, 0); - GameUI.setNumberImage(3093, GameData.wareHouse.pInputId, 27); - //GameUI.setNumberImage(3079,GameData.wareHouse.pInputId,27); - } - if (GameData.wareHouse.pInputCount == -1 || String(GameData.wareHouse.pInputCount).length == 0) { - set_self(3094, 37, 0, 0, 0); - set_self(3091, 37, 1, 0, 0); - } else { - set_self(3094, 37, 1, 0, 0); - set_self(3091, 37, 0, 0, 0); - GameUI.setNumberImage(3094, GameData.wareHouse.pInputCount, 27); - } - if (GameData.wareHouse.pInputPassWord == -1 || String(GameData.wareHouse.pInputPassWord).length == 0) { - set_self(3095, 37, 0, 0, 0); - set_self(3092, 37, 1, 0, 0); - } else { - set_self(3095, 37, 1, 0, 0); - set_self(3092, 37, 0, 0, 0); - GameUI.setNumberImage(3095, GameData.wareHouse.pInputPassWord, 27); - } - break; + case 7: + //密码 + set_group(93, 37, 0, 0, 0); + set_group(92, 37, 0, 0, 0); + set_group(94, 37, 1, 0, 0); + if (GameData.hallConfig.wareHouse == 3) { + set_self(3076, 37, 0, 0, 0); + set_self(3078, 37, 0, 0, 0); + set_self(3080, 37, 0, 0, 0); + } else if (GameData.hallConfig.wareHouse == 4) { + set_self(3075, 37, 0, 0, 0); + set_self(3077, 37, 0, 0, 0); + set_self(3079, 37, 0, 0, 0); + } + if (GameData.wareHouse.pInputId == -1 || String(GameData.wareHouse.pInputId).length == 0) { + set_self(3093, 37, 0, 0, 0); + set_self(3090, 37, 1, 0, 0); + //GameUI.setNumberImage(3079,0,27); + } else { + set_self(3093, 37, 1, 0, 0); + set_self(3090, 37, 0, 0, 0); + GameUI.setNumberImage(3093, GameData.wareHouse.pInputId, 27); + //GameUI.setNumberImage(3079,GameData.wareHouse.pInputId,27); + } + if (GameData.wareHouse.pInputCount == -1 || String(GameData.wareHouse.pInputCount).length == 0) { + set_self(3094, 37, 0, 0, 0); + set_self(3091, 37, 1, 0, 0); + } else { + set_self(3094, 37, 1, 0, 0); + set_self(3091, 37, 0, 0, 0); + GameUI.setNumberImage(3094, GameData.wareHouse.pInputCount, 27); + } + if (GameData.wareHouse.pInputPassWord == -1 || String(GameData.wareHouse.pInputPassWord).length == 0) { + set_self(3095, 37, 0, 0, 0); + set_self(3092, 37, 1, 0, 0); + } else { + set_self(3095, 37, 1, 0, 0); + set_self(3092, 37, 0, 0, 0); + GameUI.setNumberImage(3095, GameData.wareHouse.pInputPassWord, 27); + } + break; } } //更新输入框内容 -GameUI.wareHouseInputNumber = function(type, _input) { +GameUI.wareHouseInputNumber = function (type, _input) { switch (GameData.wareHouse.selectType) { - case 1: - // - switch (type) { case 1: - if (GameData.wareHouse.initPassWord1 == -1) { - GameData.wareHouse.initPassWord1 = _input; - } else if (String(GameData.wareHouse.initPassWord1).length >= ConstVal.wareHouse.passWordLength) { - GameUI.OpenTips("密码长度为" + ConstVal.wareHouse.passWordLength + "位!", ConstVal.Tips.time); - } else { - GameData.wareHouse.initPassWord1 = String(GameData.wareHouse.initPassWord1) + _input; - } - GameUI.updateWareHouseInput(); - break; - case 2: - if (GameData.wareHouse.initPassWord1 == -1 || String(GameData.wareHouse.initPassWord1).length == 0) { - GameData.wareHouse.initPassWord1 = -1; - } else { - GameData.wareHouse.initPassWord1 = String(GameData.wareHouse.initPassWord1).substring(0, String(GameData.wareHouse.initPassWord1).length - 1); - } - GameUI.updateWareHouseInput(); - break; - case 3: - GameData.wareHouse.initPassWord1 = -1; - GameUI.updateWareHouseInput(); - break; - } - break; - case 2: - // - switch (type) { - case 1: - if (GameData.wareHouse.initPassWord2 == -1) { - GameData.wareHouse.initPassWord2 = _input; - } else if (String(GameData.wareHouse.initPassWord2).length >= ConstVal.wareHouse.passWordLength) { - GameUI.OpenTips("密码长度为" + ConstVal.wareHouse.passWordLength + "位!", ConstVal.Tips.time); - } else { - GameData.wareHouse.initPassWord2 = String(GameData.wareHouse.initPassWord2) + _input; - } - GameUI.updateWareHouseInput(); - break; - case 2: - if (GameData.wareHouse.initPassWord2 == -1 || String(GameData.wareHouse.initPassWord2).length == 0) { - GameData.wareHouse.initPassWord2 = -1; - } else { - GameData.wareHouse.initPassWord2 = String(GameData.wareHouse.initPassWord2).substring(0, String(GameData.wareHouse.initPassWord2).length - 1); - } - GameUI.updateWareHouseInput(); - break; - case 3: - GameData.wareHouse.initPassWord2 = -1; - GameUI.updateWareHouseInput(); - break; - } - break; - - case 3: - //取出存入数量 - switch (type) { - case 1: - if (GameData.wareHouse.safeInputCount == -1) { - if (_input != 0) { - //if(GameUI.checkWareHouseInput(_input,GameData.wareHouse.pInputType,GameData.wareHouse.safeInputType)[0]){ - // GameData.wareHouse.safeInputCount = _input; - //} - var result = GameUI.checkWareHouseInput(_input, 2, GameData.wareHouse.safeInputType); - if (result[0]) { - GameData.wareHouse.safeInputCount = _input; + // + switch (type) { + case 1: + if (GameData.wareHouse.initPassWord1 == -1) { + GameData.wareHouse.initPassWord1 = _input; + } else if (String(GameData.wareHouse.initPassWord1).length >= ConstVal.wareHouse.passWordLength) { + GameUI.OpenTips("密码长度为" + ConstVal.wareHouse.passWordLength + "位!", ConstVal.Tips.time); } else { - GameData.wareHouse.safeInputCount = result[1]; - GameUI.OpenTips("输入超出范围!已调整为最大值", ConstVal.Tips.time); + GameData.wareHouse.initPassWord1 = String(GameData.wareHouse.initPassWord1) + _input; } - //GameData.wareHouse.safeInputCount = _input; - } - } else { - var cTemp = Number(String(GameData.wareHouse.safeInputCount) + _input); - //if(GameUI.checkWareHouseInput(cTemp,GameData.wareHouse.pInputType,GameData.wareHouse.safeInputType)[0]){ - // GameData.wareHouse.safeInputCount = cTemp; - // } - var result = GameUI.checkWareHouseInput(cTemp, 2, GameData.wareHouse.safeInputType); - if (result[0]) { - GameData.wareHouse.safeInputCount = cTemp; - - - } else { - GameData.wareHouse.safeInputCount = result[1]; - GameUI.OpenTips("输入超出范围!已调整为最大值", ConstVal.Tips.time); - } - } - GameUI.updateWareHouseInput(); - break; - case 2: - if (GameData.wareHouse.safeInputCount == -1 || String(GameData.wareHouse.safeInputCount).length == 1) { - GameData.wareHouse.safeInputCount = -1; - } else { - //if(String(GameData.wareHouse.safeInputCount).length == 1){ - //GameData.wareHouse.safeInputCount = -1; - //}else{ - GameData.wareHouse.safeInputCount = Number(String(GameData.wareHouse.safeInputCount).substring(0, String(GameData.wareHouse.safeInputCount).length - 1)); - //} - - } - GameUI.updateWareHouseInput(); - break; - case 3: - GameData.wareHouse.safeInputCount = -1; - GameUI.updateWareHouseInput(); - break; - } - break; - case 4: - // - switch (type) { - case 1: - if (GameData.wareHouse.safePassWord == -1) { - GameData.wareHouse.safePassWord = _input; - } else if (String(GameData.wareHouse.safePassWord).length >= ConstVal.wareHouse.passWordLength) { - GameUI.OpenTips("密码长度为" + ConstVal.wareHouse.passWordLength + "位!", ConstVal.Tips.time); - } else { - GameData.wareHouse.safePassWord = String(GameData.wareHouse.safePassWord) + _input; - } - GameUI.updateWareHouseInput(); - break; - case 2: - if (GameData.wareHouse.safePassWord == -1 || String(GameData.wareHouse.safePassWord).length == 0) { - GameData.wareHouse.safePassWord = -1; - } else { - GameData.wareHouse.safePassWord = String(GameData.wareHouse.safePassWord).substring(0, String(GameData.wareHouse.safePassWord).length - 1); - } - GameUI.updateWareHouseInput(); - break; - case 3: - GameData.wareHouse.safePassWord = -1; - GameUI.updateWareHouseInput(); - break; - } - break; - case 5: - //id - switch (type) { - case 1: - - if (GameData.wareHouse.pInputId == -1) { - GameData.wareHouse.pInputId = _input; - } else if (String(GameData.wareHouse.pInputId).length >= 6) { - GameUI.OpenTips("玩家id长度为6位!", ConstVal.Tips.time); - } else { - GameData.wareHouse.pInputId = String(GameData.wareHouse.pInputId) + _input; - } - GameUI.updateWareHouseInput(); - break; - case 2: - if (GameData.wareHouse.pInputId == -1 || String(GameData.wareHouse.pInputId).length == 0) { - GameData.wareHouse.pInputId = -1; - } else { - GameData.wareHouse.pInputId = String(GameData.wareHouse.pInputId).substring(0, String(GameData.wareHouse.pInputId).length - 1); - } - GameUI.updateWareHouseInput(); - break; - case 3: - GameData.wareHouse.pInputId = -1; - GameUI.updateWareHouseInput(); - break; - } - break; - case 6: - switch (type) { - case 1: - if (GameData.wareHouse.pInputCount == -1) { - if (_input != 0) { - //GameData.wareHouse.pInputCount = _input; - if (GameUI.checkWareHouseInput(_input, GameData.wareHouse.pInputType, 1)[0]) { - GameData.wareHouse.pInputCount = _input; + GameUI.updateWareHouseInput(); + break; + case 2: + if (GameData.wareHouse.initPassWord1 == -1 || String(GameData.wareHouse.initPassWord1).length == 0) { + GameData.wareHouse.initPassWord1 = -1; + } else { + GameData.wareHouse.initPassWord1 = String(GameData.wareHouse.initPassWord1).substring(0, String(GameData.wareHouse.initPassWord1).length - 1); } - } - - } else { - var cTemp = Number(String(GameData.wareHouse.pInputCount) + _input); - //验证输入星星合法性 - if(String(cTemp).length> 10){ - GameUI.OpenTips("输入超出限制!",ConstVal.Tips.time); - }else{ - GameData.wareHouse.pInputCount = cTemp; - } - //if (GameUI.checkWareHouseInput(cTemp, GameData.wareHouse.pInputType, 1)[0]) { - // GameData.wareHouse.pInputCount = cTemp; - //} + GameUI.updateWareHouseInput(); + break; + case 3: + GameData.wareHouse.initPassWord1 = -1; + GameUI.updateWareHouseInput(); + break; } - GameUI.updateWareHouseInput(); break; case 2: - if (GameData.wareHouse.pInputCount == -1 || String(GameData.wareHouse.pInputCount).length == 1) { - GameData.wareHouse.pInputCount = -1; - } else { - if(String(GameData.wareHouse.pInputCount).length > 10){ - GameUI.OpenTips("输入超出限制!",ConstVal.Tips.time); - }else{ - GameData.wareHouse.pInputCount = Number(String(GameData.wareHouse.pInputCount).substring(0, String(GameData.wareHouse.pInputCount).length - 1)); - } + // + switch (type) { + case 1: + if (GameData.wareHouse.initPassWord2 == -1) { + GameData.wareHouse.initPassWord2 = _input; + } else if (String(GameData.wareHouse.initPassWord2).length >= ConstVal.wareHouse.passWordLength) { + GameUI.OpenTips("密码长度为" + ConstVal.wareHouse.passWordLength + "位!", ConstVal.Tips.time); + } else { + GameData.wareHouse.initPassWord2 = String(GameData.wareHouse.initPassWord2) + _input; + } + GameUI.updateWareHouseInput(); + break; + case 2: + if (GameData.wareHouse.initPassWord2 == -1 || String(GameData.wareHouse.initPassWord2).length == 0) { + GameData.wareHouse.initPassWord2 = -1; + } else { + GameData.wareHouse.initPassWord2 = String(GameData.wareHouse.initPassWord2).substring(0, String(GameData.wareHouse.initPassWord2).length - 1); + } + GameUI.updateWareHouseInput(); + break; + case 3: + GameData.wareHouse.initPassWord2 = -1; + GameUI.updateWareHouseInput(); + break; + } + break; - } - GameUI.updateWareHouseInput(); - break; case 3: - GameData.wareHouse.pInputCount = -1; - GameUI.updateWareHouseInput(); - break; - } - break; - case 7: - // - switch (type) { - case 1: - if (GameData.wareHouse.pInputPassWord == -1) { - GameData.wareHouse.pInputPassWord = _input; - } else if (String(GameData.wareHouse.pInputPassWord).length >= ConstVal.wareHouse.passWordLength) { - GameUI.OpenTips("密码长度为" + ConstVal.wareHouse.passWordLength + "位!", ConstVal.Tips.time); - } else { - GameData.wareHouse.pInputPassWord = String(GameData.wareHouse.pInputPassWord) + _input; + //取出存入数量 + switch (type) { + case 1: + if (GameData.wareHouse.safeInputCount == -1) { + if (_input != 0) { + //if(GameUI.checkWareHouseInput(_input,GameData.wareHouse.pInputType,GameData.wareHouse.safeInputType)[0]){ + // GameData.wareHouse.safeInputCount = _input; + //} + var result = GameUI.checkWareHouseInput(_input, 2, GameData.wareHouse.safeInputType); + if (result[0]) { + GameData.wareHouse.safeInputCount = _input; + } else { + GameData.wareHouse.safeInputCount = result[1]; + GameUI.OpenTips("输入超出范围!已调整为最大值", ConstVal.Tips.time); + } + //GameData.wareHouse.safeInputCount = _input; + } + } else { + var cTemp = Number(String(GameData.wareHouse.safeInputCount) + _input); + //if(GameUI.checkWareHouseInput(cTemp,GameData.wareHouse.pInputType,GameData.wareHouse.safeInputType)[0]){ + // GameData.wareHouse.safeInputCount = cTemp; + // } + var result = GameUI.checkWareHouseInput(cTemp, 2, GameData.wareHouse.safeInputType); + if (result[0]) { + GameData.wareHouse.safeInputCount = cTemp; + + + } else { + GameData.wareHouse.safeInputCount = result[1]; + GameUI.OpenTips("输入超出范围!已调整为最大值", ConstVal.Tips.time); + } + } + GameUI.updateWareHouseInput(); + break; + case 2: + if (GameData.wareHouse.safeInputCount == -1 || String(GameData.wareHouse.safeInputCount).length == 1) { + GameData.wareHouse.safeInputCount = -1; + } else { + //if(String(GameData.wareHouse.safeInputCount).length == 1){ + //GameData.wareHouse.safeInputCount = -1; + //}else{ + GameData.wareHouse.safeInputCount = Number(String(GameData.wareHouse.safeInputCount).substring(0, String(GameData.wareHouse.safeInputCount).length - 1)); + //} + + } + GameUI.updateWareHouseInput(); + break; + case 3: + GameData.wareHouse.safeInputCount = -1; + GameUI.updateWareHouseInput(); + break; } - GameUI.updateWareHouseInput(); break; - case 2: - if (GameData.wareHouse.pInputPassWord == -1 || String(GameData.wareHouse.pInputPassWord).length == 0) { - GameData.wareHouse.pInputPassWord = -1; - } else { - GameData.wareHouse.pInputPassWord = String(GameData.wareHouse.pInputPassWord).substring(0, String(GameData.wareHouse.pInputPassWord).length - 1); + case 4: + // + switch (type) { + case 1: + if (GameData.wareHouse.safePassWord == -1) { + GameData.wareHouse.safePassWord = _input; + } else if (String(GameData.wareHouse.safePassWord).length >= ConstVal.wareHouse.passWordLength) { + GameUI.OpenTips("密码长度为" + ConstVal.wareHouse.passWordLength + "位!", ConstVal.Tips.time); + } else { + GameData.wareHouse.safePassWord = String(GameData.wareHouse.safePassWord) + _input; + } + GameUI.updateWareHouseInput(); + break; + case 2: + if (GameData.wareHouse.safePassWord == -1 || String(GameData.wareHouse.safePassWord).length == 0) { + GameData.wareHouse.safePassWord = -1; + } else { + GameData.wareHouse.safePassWord = String(GameData.wareHouse.safePassWord).substring(0, String(GameData.wareHouse.safePassWord).length - 1); + } + GameUI.updateWareHouseInput(); + break; + case 3: + GameData.wareHouse.safePassWord = -1; + GameUI.updateWareHouseInput(); + break; } - GameUI.updateWareHouseInput(); break; - case 3: - GameData.wareHouse.pInputPassWord = -1; - GameUI.updateWareHouseInput(); + case 5: + //id + switch (type) { + case 1: + + if (GameData.wareHouse.pInputId == -1) { + GameData.wareHouse.pInputId = _input; + } else if (String(GameData.wareHouse.pInputId).length >= 6) { + GameUI.OpenTips("玩家id长度为6位!", ConstVal.Tips.time); + } else { + GameData.wareHouse.pInputId = String(GameData.wareHouse.pInputId) + _input; + } + GameUI.updateWareHouseInput(); + break; + case 2: + if (GameData.wareHouse.pInputId == -1 || String(GameData.wareHouse.pInputId).length == 0) { + GameData.wareHouse.pInputId = -1; + } else { + GameData.wareHouse.pInputId = String(GameData.wareHouse.pInputId).substring(0, String(GameData.wareHouse.pInputId).length - 1); + } + GameUI.updateWareHouseInput(); + break; + case 3: + GameData.wareHouse.pInputId = -1; + GameUI.updateWareHouseInput(); + break; + } + break; + case 6: + switch (type) { + case 1: + if (GameData.wareHouse.pInputCount == -1) { + if (_input != 0) { + //GameData.wareHouse.pInputCount = _input; + if (GameUI.checkWareHouseInput(_input, GameData.wareHouse.pInputType, 1)[0]) { + GameData.wareHouse.pInputCount = _input; + } + } + + } else { + var cTemp = Number(String(GameData.wareHouse.pInputCount) + _input); + //验证输入星星合法性 + if (String(cTemp).length > 10) { + GameUI.OpenTips("输入超出限制!", ConstVal.Tips.time); + } else { + GameData.wareHouse.pInputCount = cTemp; + } + //if (GameUI.checkWareHouseInput(cTemp, GameData.wareHouse.pInputType, 1)[0]) { + // GameData.wareHouse.pInputCount = cTemp; + //} + } + GameUI.updateWareHouseInput(); + break; + case 2: + if (GameData.wareHouse.pInputCount == -1 || String(GameData.wareHouse.pInputCount).length == 1) { + GameData.wareHouse.pInputCount = -1; + } else { + if (String(GameData.wareHouse.pInputCount).length > 10) { + GameUI.OpenTips("输入超出限制!", ConstVal.Tips.time); + } else { + GameData.wareHouse.pInputCount = Number(String(GameData.wareHouse.pInputCount).substring(0, String(GameData.wareHouse.pInputCount).length - 1)); + } + + } + GameUI.updateWareHouseInput(); + break; + case 3: + GameData.wareHouse.pInputCount = -1; + GameUI.updateWareHouseInput(); + break; + } + break; + case 7: + // + switch (type) { + case 1: + if (GameData.wareHouse.pInputPassWord == -1) { + GameData.wareHouse.pInputPassWord = _input; + } else if (String(GameData.wareHouse.pInputPassWord).length >= ConstVal.wareHouse.passWordLength) { + GameUI.OpenTips("密码长度为" + ConstVal.wareHouse.passWordLength + "位!", ConstVal.Tips.time); + } else { + GameData.wareHouse.pInputPassWord = String(GameData.wareHouse.pInputPassWord) + _input; + } + GameUI.updateWareHouseInput(); + break; + case 2: + if (GameData.wareHouse.pInputPassWord == -1 || String(GameData.wareHouse.pInputPassWord).length == 0) { + GameData.wareHouse.pInputPassWord = -1; + } else { + GameData.wareHouse.pInputPassWord = String(GameData.wareHouse.pInputPassWord).substring(0, String(GameData.wareHouse.pInputPassWord).length - 1); + } + GameUI.updateWareHouseInput(); + break; + case 3: + GameData.wareHouse.pInputPassWord = -1; + GameUI.updateWareHouseInput(); + break; + } break; - } - break; } } //点击保险箱存入取出 -GameUI.updateWareHouseCheckBox = function() { +GameUI.updateWareHouseCheckBox = function () { switch (GameData.wareHouse.page) { - case 1: - //第一页 - switch (GameData.wareHouse.safeInputType) { case 1: - set_self(3034, 43, 2, 0, 0); - set_self(3035, 43, 1, 0, 0); - var r = GameUI.checkWareHouseInput(GameData.wareHouse.safeInputCount, 1, GameData.wareHouse.safeInputType); - if (!r[0]) { - GameData.wareHouse.safeInputCount = r[1]; - GameUI.OpenTips("输入超出,已调整为最大!", ConstVal.Tips.time); - GameUI.updateWareHouseInput(); + //第一页 + switch (GameData.wareHouse.safeInputType) { + case 1: + set_self(3034, 43, 2, 0, 0); + set_self(3035, 43, 1, 0, 0); + var r = GameUI.checkWareHouseInput(GameData.wareHouse.safeInputCount, 1, GameData.wareHouse.safeInputType); + if (!r[0]) { + GameData.wareHouse.safeInputCount = r[1]; + GameUI.OpenTips("输入超出,已调整为最大!", ConstVal.Tips.time); + GameUI.updateWareHouseInput(); + } + break; + case 2: + set_self(3035, 43, 2, 0, 0); + set_self(3034, 43, 1, 0, 0); + var r = GameUI.checkWareHouseInput(GameData.wareHouse.safeInputCount, 2, GameData.wareHouse.safeInputType); + if (!r[0]) { + GameData.wareHouse.safeInputCount = r[1]; + GameUI.OpenTips("输入超出,已调整为最大!", ConstVal.Tips.time); + GameUI.updateWareHouseInput(); + } + break; } break; case 2: - set_self(3035, 43, 2, 0, 0); - set_self(3034, 43, 1, 0, 0); - var r = GameUI.checkWareHouseInput(GameData.wareHouse.safeInputCount, 2, GameData.wareHouse.safeInputType); - if (!r[0]) { - GameData.wareHouse.safeInputCount = r[1]; - GameUI.OpenTips("输入超出,已调整为最大!", ConstVal.Tips.time); - GameUI.updateWareHouseInput(); + //第二页 + switch (GameData.wareHouse.pInputType) { + case 1: + set_self(3075, 43, 2, 0, 0); + set_self(3076, 43, 1, 0, 0); + var r = GameUI.checkWareHouseInput(GameData.wareHouse.pInputCount, 1, 1); + if (!r[0]) { + GameData.wareHouse.pInputCount = r[1]; + GameUI.OpenTips("输入超出,已调整为最大!", ConstVal.Tips.time); + GameUI.updateWareHouseInput(); + } + break; + case 2: + set_self(3075, 43, 1, 0, 0); + set_self(3076, 43, 2, 0, 0); + var r = GameUI.checkWareHouseInput(GameData.wareHouse.pInputCount, 2, 1); + if (!r[0]) { + GameData.wareHouse.pInputCount = r[1]; + GameUI.OpenTips("输入超出,已调整为最大!", ConstVal.Tips.time); + GameUI.updateWareHouseInput(); + } + break; } break; - } - break; - case 2: - //第二页 - switch (GameData.wareHouse.pInputType) { - case 1: - set_self(3075, 43, 2, 0, 0); - set_self(3076, 43, 1, 0, 0); - var r = GameUI.checkWareHouseInput(GameData.wareHouse.pInputCount, 1, 1); - if (!r[0]) { - GameData.wareHouse.pInputCount = r[1]; - GameUI.OpenTips("输入超出,已调整为最大!", ConstVal.Tips.time); - GameUI.updateWareHouseInput(); - } - break; - case 2: - set_self(3075, 43, 1, 0, 0); - set_self(3076, 43, 2, 0, 0); - var r = GameUI.checkWareHouseInput(GameData.wareHouse.pInputCount, 2, 1); - if (!r[0]) { - GameData.wareHouse.pInputCount = r[1]; - GameUI.OpenTips("输入超出,已调整为最大!", ConstVal.Tips.time); - GameUI.updateWareHouseInput(); - } - break; - } - break; } } //选择输入类型 -GameUI.selectWareHouseInputType = function(type) { +GameUI.selectWareHouseInputType = function (type) { GameData.wareHouse.selectType = type; switch (type) { - case 1: - // - set_self(3067, 43, 2, 0, 0); - set_self(3068, 43, 1, 0, 0); - break; - case 2: - // - set_self(3067, 43, 1, 0, 0); - set_self(3068, 43, 2, 0, 0); - break; - case 3: - // - set_self(3039, 43, 1, 0, 0); - set_self(3038, 43, 2, 0, 0); - break; - case 4: - // - set_self(3039, 43, 2, 0, 0); - set_self(3038, 43, 1, 0, 0); - break; - case 5: - // - set_self(3087, 43, 2, 0, 0); - set_self(3088, 43, 1, 0, 0); - set_self(3089, 43, 1, 0, 0); - break; - case 6: - // - set_self(3087, 43, 1, 0, 0); - set_self(3088, 43, 2, 0, 0); - set_self(3089, 43, 1, 0, 0); - break; - case 7: - // - set_self(3087, 43, 1, 0, 0); - set_self(3088, 43, 1, 0, 0); - set_self(3089, 43, 2, 0, 0); - break; + case 1: + // + set_self(3067, 43, 2, 0, 0); + set_self(3068, 43, 1, 0, 0); + break; + case 2: + // + set_self(3067, 43, 1, 0, 0); + set_self(3068, 43, 2, 0, 0); + break; + case 3: + // + set_self(3039, 43, 1, 0, 0); + set_self(3038, 43, 2, 0, 0); + break; + case 4: + // + set_self(3039, 43, 2, 0, 0); + set_self(3038, 43, 1, 0, 0); + break; + case 5: + // + set_self(3087, 43, 2, 0, 0); + set_self(3088, 43, 1, 0, 0); + set_self(3089, 43, 1, 0, 0); + break; + case 6: + // + set_self(3087, 43, 1, 0, 0); + set_self(3088, 43, 2, 0, 0); + set_self(3089, 43, 1, 0, 0); + break; + case 7: + // + set_self(3087, 43, 1, 0, 0); + set_self(3088, 43, 1, 0, 0); + set_self(3089, 43, 2, 0, 0); + break; } GameUI.updateWareHouseInput(); } //保险箱输入 -GameUI.wareHouseInput = function(spid) { +GameUI.wareHouseInput = function (spid) { if (spid >= 3044 && spid <= 3053) { //数字输入 GameUI.wareHouseInputNumber(1, spid - 3044); } else if (spid == 3055) { //删除 @@ -8725,7 +8749,7 @@ GameUI.wareHouseInput = function(spid) { } } //检测星星房卡数量合法性 -GameUI.checkWareHouseInput = function(input, type, mode) { //input输入数量 type1房卡2星星,mode与1携带的比较还是仓库2里的比较 +GameUI.checkWareHouseInput = function (input, type, mode) { //input输入数量 type1房卡2星星,mode与1携带的比较还是仓库2里的比较 input = Number(input); //console.log("input:"+input+"type:"+type+"mode:"+mode); //if(input < 1000){ @@ -8740,29 +8764,29 @@ GameUI.checkWareHouseInput = function(input, type, mode) { //input输入数量 t //} if (type == 2) { switch (mode) { - case 2: - if (input > C_Player.wareHouseStarCount) { - return [false, C_Player.wareHouseStarCount]; - } - break; - case 1: - if (input > C_Player.bean) { - if (C_Player.bean < 0) { - return [false, 0]; + case 2: + if (input > C_Player.wareHouseStarCount) { + return [false, C_Player.wareHouseStarCount]; } - if (C_Player.bean - GameData.initBean < 0) { - return [false, 0]; + break; + case 1: + if (input > C_Player.bean) { + if (C_Player.bean < 0) { + return [false, 0]; + } + if (C_Player.bean - GameData.initBean < 0) { + return [false, 0]; + } + return [false, C_Player.bean - GameData.initBean]; } - return [false, C_Player.bean - GameData.initBean]; - } - break; + break; } } return [true, 1000]; } //更新仓库赠送玩家信息 -GameUI.updateWareHousePlayerInfo = function() { +GameUI.updateWareHousePlayerInfo = function () { if (GameData.wareHouse.pNickName) { set_self(3082, 7, "昵称:" + GameData.wareHouse.pNickName, 0, 0); } else { @@ -8774,27 +8798,27 @@ GameUI.updateWareHousePlayerInfo = function() { set_self(3083, 7, "", 0, 0); } - if(GameData.wareHouse.pImg){ + if (GameData.wareHouse.pImg) { Func.up_imgurl(336, GameData.wareHouse.pImg); - set_self(3081,1,336,0,0); - }else{ - set_self(3081,1,170,0,0); + set_self(3081, 1, 336, 0, 0); + } else { + set_self(3081, 1, 170, 0, 0); } - + } -GameUI.updateCount = function() { - if(GameData.wareHouse.page == 1){ +GameUI.updateCount = function () { + if (GameData.wareHouse.page == 1) { GameUI.setNumberImage(3033, C_Player.wareHouseStarCount, 27); //仓库库存数量 GameUI.setNumberImage(3079, C_Player.bean, 27); //携带的星星数量 GameUI.setNumberImage(3080, C_Player.roomcard, 27); //房卡数量 - }else{ + } else { GameUI.setNumberImage(3033, C_Player.wareHouseStarCount, 27); //仓库库存数量 GameUI.setNumberImage(3079, C_Player.wareHouseStarCount, 27); //携带的星星数量 GameUI.setNumberImage(3080, C_Player.roomcard, 27); //房卡数量 } } //开启广告倒计时 -GameUI.startAdCountDown = function() { +GameUI.startAdCountDown = function () { set_self(3103, 37, 1, 0, 0); set_self(3104, 37, 1, 0, 0); var tt = Math.ceil(GameData.launchWaitTime / 1000); @@ -8805,7 +8829,7 @@ GameUI.startAdCountDown = function() { set_self(3104, 7, ttext, 0, 0); set_self(3104, 20, ttext.gblen() * 12, 0, 0); GameUI.adaptPositionSpid(3104, 3103); - GameData.adTimer = setInterval(function() { + GameData.adTimer = setInterval(function () { GameData.launchWaitTime -= 1000; if (GameData.launchWaitTime > 0) { var tt = Math.ceil(GameData.launchWaitTime / 1000); @@ -8829,7 +8853,7 @@ GameUI.startAdCountDown = function() { }, 1000); } -GameUI.openMainSceneBtnPanel = function() { +GameUI.openMainSceneBtnPanel = function () { GameUI.closeRoomInfo(); set_group(99, 37, 1, 0, 0); //app下载 @@ -8856,31 +8880,31 @@ GameUI.openMainSceneBtnPanel = function() { if (Desk.stage == 1) { //GameUI.hideExitBtn(); switch (C_Player.canexit) { - case 1: - //if (C_Player.status == 1) { + case 1: + //if (C_Player.status == 1) { //set_self(185, 37, 1, 0, 0); - //} else { + //} else { set_self(185, 37, 0, 0, 0); - //} - //if (Desk.infinite == 1 && !Game_Config.sysConfig.vipInfinite) { + //} + //if (Desk.infinite == 1 && !Game_Config.sysConfig.vipInfinite) { //set_self(181, 43, 3, 0, 0); //set_self(182, 37, 0, 0, 0); //set_self(181, 18, 520, 0, 0); - //} - //if (GameData.matchId) { //比赛房间 + //} + //if (GameData.matchId) { //比赛房间 //set_self(181, 43, 3, 0, 0); //GameUI.adaptPositionSpid(181, 41); //set_self(182, 37, 0, 0, 0); - //} - break; - case 0: - GameUI.hideExitBtn(); - //if (C_Player.status == 1) { + //} + break; + case 0: + GameUI.hideExitBtn(); + //if (C_Player.status == 1) { set_self(185, 37, 1, 0, 0); - //} else { + //} else { //set_self(185, 37, 0, 0, 0); - //} - break; + //} + break; } } else { GameUI.showExitBtn(); @@ -8898,7 +8922,7 @@ GameUI.openMainSceneBtnPanel = function() { GameUI.adaptPannelBtn(); } -GameUI.adaptPannelBtn = function() { +GameUI.adaptPannelBtn = function () { var spList = [151, 150, 185, 233, 3014, 513, 656]; var posList = [75, 168, 261, 354, 447, 540, 633]; //var spList = [235,13,604,3017,483,3018,3057]; @@ -8912,22 +8936,22 @@ GameUI.adaptPannelBtn = function() { } } } -GameUI.playPanelAnimation = function(spidList, posList) { +GameUI.playPanelAnimation = function (spidList, posList) { } -GameUI.stopPanelAnimation = function(spidList, posList) { +GameUI.stopPanelAnimation = function (spidList, posList) { } -GameUI.closeMainSceneBtnPanel = function() { +GameUI.closeMainSceneBtnPanel = function () { set_group(99, 37, 0, 0, 0); } -GameUI.updateMainSceneBtnPanel = function() { +GameUI.updateMainSceneBtnPanel = function () { if (get_self(151, 37, 0, 0, 0)) { //当前开启状态 GameUI.openMainSceneBtnPanel(); GameUI.closeMainSceneBtnPanel(); } } -GameUI.openRoomInfo = function() { +GameUI.openRoomInfo = function () { //- //Desk.infinite = 1; //GameData.matchInfo = 111; @@ -8961,15 +8985,15 @@ GameUI.openRoomInfo = function() { rTxt += "(" + GameData.starName + ")"; } switch (Desk.rebateMode) { - case 1: - rTxt += "大赢家:"; - break; - case 2: - rTxt += "赢家:"; - break; - case 3: - rTxt += "所有人:"; - break; + case 1: + rTxt += "大赢家:"; + break; + case 2: + rTxt += "赢家:"; + break; + case 3: + rTxt += "所有人:"; + break; } } @@ -9033,10 +9057,10 @@ GameUI.openRoomInfo = function() { set_self(111, 18, get_self(109, 18, 0, 0, 0) + spaceX2); } -GameUI.closeRoomInfo = function() { +GameUI.closeRoomInfo = function () { set_group(100, 37, 0, 0, 0); } -GameUI.playTopInfoAnimation = function() { +GameUI.playTopInfoAnimation = function () { var time = 5000; if (Desk.infinite == 1) { return; @@ -9048,7 +9072,7 @@ GameUI.playTopInfoAnimation = function() { if (GameData.topInfoTimer) { window.clearInterval(GameData.topInfoTimer); } - GameData.topInfoTimer = setInterval(function() { + GameData.topInfoTimer = setInterval(function () { if (get_self(149, 37, 0, 0, 0)) { if (get_self(155, 37)) { //当前显示时钟 set_self(154, 37, 0, 0, 0); @@ -9077,7 +9101,7 @@ GameUI.playTopInfoAnimation = function() { } }, time); } -GameUI.stopTopInfoAnimation = function(bTemp) { +GameUI.stopTopInfoAnimation = function (bTemp) { if (GameData.topInfoTimer) { window.clearInterval(GameData.topInfoTimer); } @@ -9093,7 +9117,7 @@ GameUI.stopTopInfoAnimation = function(bTemp) { set_self(3142, 37, 0, 0, 0); } } -GameUI.startRecord = function() { +GameUI.startRecord = function () { try { startRecordAac(); } catch (e) { @@ -9104,7 +9128,7 @@ GameUI.startRecord = function() { set_self(3128, 43, 1, 0, 0); play_ani(1, 3128, 43, 1, 6, 0, 900, 0, 0, 0, 0, 0, 0, 0); } -GameUI.stopRecord = function() { +GameUI.stopRecord = function () { try { stopRecord(); } catch (e) { @@ -9115,13 +9139,13 @@ GameUI.stopRecord = function() { set_self(3128, 43, 1, 0, 0); } -GameUI.openTextInput = function(msg, callback, len) { +GameUI.openTextInput = function (msg, callback, len) { if (!len) { len = 150; } GameData.textCallback = callback; set_group(102, 37, 1, 0, 0); - setTimeout(function() { + setTimeout(function () { try { var obj = gameabc_face.getdiv("div3154"); obj.click(); @@ -9146,14 +9170,14 @@ GameUI.openTextInput = function(msg, callback, len) { } set_self(3160, 7, "限制" + len + "字以内"); } -GameUI.closeTextInput = function() { +GameUI.closeTextInput = function () { var obj = gameabc_face.getdiv("div3154"); obj.blur(); obj = null; set_group(102, 37, 0, 0, 0); } //打开vip房间列表 -GameUI.openVipRoomList = function(bTemp) { +GameUI.openVipRoomList = function (bTemp) { set_self(234, 37, 0, 0, 0); GameData.vipRoomJump = true; if (!GameData.vipRoomTimer1) { @@ -9162,18 +9186,18 @@ GameUI.openVipRoomList = function(bTemp) { } set_group(103, 37, 1, 0, 0); var allCharm = Utl.ReadData(Utl.Config.vipCharm); - if(allCharm){ + if (allCharm) { allCharm = Number(allCharm); - }else{ - allCharm=0; + } else { + allCharm = 0; } if (C_Player.advanced) { set_self(3171, 37, 0, 0, 0); set_self(3170, 37, 0, 0, 0); //set_self(3197,7,"",0,0); GameData.allCharm = allCharm; - GameUI.setNumberImage(3197,allCharm,23); - GameUI.adaptPositionSpid(3197,3196); + GameUI.setNumberImage(3197, allCharm, 23); + GameUI.adaptPositionSpid(3197, 3196); set_self(3198, 7, "(黑名单内玩家临时禁入房间,请尽快到后台处理好友关系)"); if (!GameData.sysConfig.managerUrl) { set_self(3235, 37, 0, 0, 0); @@ -9182,13 +9206,13 @@ GameUI.openVipRoomList = function(bTemp) { set_self(3183, 37, 0, 0, 0); set_self(3184, 37, 0, 0, 0); set_self(3171, 7, GameData.sysConfig.vipWx, 0, 0); - set_self(3194,37,0,0,0); - set_self(3195,37,0,0,0); - set_self(3196,37,0,0,0); - set_self(3197,37,0,0,0); - set_self(3198,37,0,0,0); - set_self(3214,37,0,0,0); - set_self(3215,37,0,0,0); + set_self(3194, 37, 0, 0, 0); + set_self(3195, 37, 0, 0, 0); + set_self(3196, 37, 0, 0, 0); + set_self(3197, 37, 0, 0, 0); + set_self(3198, 37, 0, 0, 0); + set_self(3214, 37, 0, 0, 0); + set_self(3215, 37, 0, 0, 0); set_self(3235, 37, 0, 0, 0); } if (bTemp) { @@ -9204,13 +9228,13 @@ GameUI.openVipRoomList = function(bTemp) { Net.Send_getInfoByShortCode(data); } -GameUI.closeVipRoomList = function() { +GameUI.closeVipRoomList = function () { GameData.vipRoomJump = false; set_group(103, 37, 0, 0, 0); set_self(234, 37, 1, 0, 0); } //设置vip房间列表数据 -GameUI.setVipRoomListData = function(data) { +GameUI.setVipRoomListData = function (data) { //移除已经从列表中删除的房间 var temp = []; for (var i = 0; i < GameData.vipRoomShortList.length; i++) { @@ -9221,20 +9245,20 @@ GameUI.setVipRoomListData = function(data) { } GameData.vipRoomData = temp; } -GameUI.updateVipRoomList = function() { +GameUI.updateVipRoomList = function () { if (get_self(6, 37, 0, 0, 0)) { switch (GameData.vipRoomPage) { - case 0: - GameUI.goVipPageOne(); + case 0: + GameUI.goVipPageOne(); - break; - case 1: - GameUI.goVipPageTwo(); - break; + break; + case 1: + GameUI.goVipPageTwo(); + break; } } } -GameUI.goVipPageOne = function() { +GameUI.goVipPageOne = function () { GameData.vipRoomPage = 0; set_self(ConstVal.vipRoomList2.f_spid, 37, 0, 0, 0); set_self(3174, 43, 1, 0, 0); @@ -9243,7 +9267,7 @@ GameUI.goVipPageOne = function() { set_self(3259, 37, 0, 0, 0); GameUI.createVipRoomListPageOne(); } -GameUI.goVipPageTwo = function() { +GameUI.goVipPageTwo = function () { GameData.vipRoomPage = 1; set_self(ConstVal.vipRoomList1.f_spid, 37, 0, 0, 0); set_self(3174, 43, 2, 0, 0); @@ -9251,12 +9275,12 @@ GameUI.goVipPageTwo = function() { set_self(3199, 37, 1, 0, 0); //set_self(3259, 37, 1, 0, 0); //if(){ - + //} GameUI.createVipRoomListPageTwo(); } //创建vip房间列表页一 -GameUI.createVipRoomListPageOne = function() { +GameUI.createVipRoomListPageOne = function () { set_self(ConstVal.vipRoomList1.f_spid, 37, 1, 0, 0); if (GameData.vipRoomPageOne.cLength != GameData.vipRoomData.length) { //set_self(ConstVal.vipRoomList1.f_spid,37,1,0,0); @@ -9367,7 +9391,7 @@ GameUI.createVipRoomListPageOne = function() { } } //删除vip房间列表页一 -GameUI.removeVipRoomListPageOne = function() { +GameUI.removeVipRoomListPageOne = function () { for (var i = 0; i < GameData.vipRoomPageOne.cLength; i++) { ifast_dllpritefromspritecopy(ConstVal.vipRoomList1.f_spid, ConstVal.vipRoomList1.bg_tag + i); ifast_dllpritefromspritecopy(ConstVal.vipRoomList1.f_spid, ConstVal.vipRoomList1.title_tag + i); @@ -9380,7 +9404,7 @@ GameUI.removeVipRoomListPageOne = function() { GameData.vipRoomPageOne.cLength = 0; } //创建vip房间列表页二 -GameUI.createVipRoomListPageTwo = function() { +GameUI.createVipRoomListPageTwo = function () { var indx = min_ary_indexof(GameData.vipRoomData, GameData.vipRoomCode, "shortCode"); if (indx > -1) { set_self(ConstVal.vipRoomList2.f_spid, 37, 1, 0, 0); @@ -9390,9 +9414,9 @@ GameUI.createVipRoomListPageTwo = function() { } GameData.vipRoomPageTwo.data = rData; set_self(3259, 37, 1, 0, 0); - if(GameData.vipRoomPageTwo.data.forbidSelect){ + if (GameData.vipRoomPageTwo.data.forbidSelect) { set_self(3259, 7, " 比赛模式\n禁止自由选桌", 0, 0); - }else{ + } else { set_self(3259, 7, " 普通模式\n允许自由选桌", 0, 0); } // if(GameData.vipRoomPageTwo.cLength != rData.playerList.length){ @@ -9410,10 +9434,10 @@ GameUI.createVipRoomListPageTwo = function() { var ply = spaceY * Math.floor(i / 2); //背景 var bg = ifast_addtospritefromspritecopy(ConstVal.vipRoomList2.f_spid, ConstVal.vipRoomList2.bg_spid, plx, ply, ConstVal.vipRoomList2.bg_tag + i); - if(rData.deskState[i]){ - set_self(bg,43,2,0,0); - }else{ - set_self(bg,43,1,0,0); + if (rData.deskState[i]) { + set_self(bg, 43, 2, 0, 0); + } else { + set_self(bg, 43, 1, 0, 0); } //桌号 var code = ifast_addtospritefromspritecopy(ConstVal.vipRoomList2.f_spid, ConstVal.vipRoomList2.code_spid, plx + ConstVal.vipRoomList2.code_x, ply + ConstVal.vipRoomList2.code_y, ConstVal.vipRoomList2.code_tag + i); @@ -9421,7 +9445,7 @@ GameUI.createVipRoomListPageTwo = function() { var dTag = i + 1; set_self(code, 7, dTag, 0, 0); set_self(code, 20, String(dTag).length * 23, 0, 0); - GameUI.adaptPositionSpid(code,bg); + GameUI.adaptPositionSpid(code, bg); //人数 var count = ifast_addtospritefromspritecopy(ConstVal.vipRoomList2.f_spid, ConstVal.vipRoomList2.count_spid, plx + ConstVal.vipRoomList2.count_x, ply + ConstVal.vipRoomList2.count_y, ConstVal.vipRoomList2.count_tag + i); var coTxt = 0; @@ -9444,10 +9468,10 @@ GameUI.createVipRoomListPageTwo = function() { set_self(code, 7, rData.roomcodes.roomlist[i], 0, 0); tag = ConstVal.vipRoomList2.bg_tag + i; var bg = ConstVal.vipRoomList2.f_spid + "add" + tag; - if(rData.deskState[i]){ - set_self(bg,43,2,0,0); - }else{ - set_self(bg,43,1,0,0); + if (rData.deskState[i]) { + set_self(bg, 43, 2, 0, 0); + } else { + set_self(bg, 43, 1, 0, 0); } var tag = ConstVal.vipRoomList2.count_tag + i; var count = ConstVal.vipRoomList2.f_spid + "add" + tag; @@ -9469,7 +9493,7 @@ GameUI.createVipRoomListPageTwo = function() { } } //删除vip房间列表页二 -GameUI.removeVipRoomListPageTwo = function() { +GameUI.removeVipRoomListPageTwo = function () { for (var i = 0; i < GameData.vipRoomPageTwo.cLength; i++) { ifast_dllpritefromspritecopy(ConstVal.vipRoomList2.f_spid, ConstVal.vipRoomList2.bg_tag + i); ifast_dllpritefromspritecopy(ConstVal.vipRoomList2.f_spid, ConstVal.vipRoomList2.code_tag + i); @@ -9477,80 +9501,80 @@ GameUI.removeVipRoomListPageTwo = function() { } GameData.vipRoomPageTwo.cLength = 0; } -var playeridInputCallBack = function(data){ +var playeridInputCallBack = function (data) { //if(String(data).length == 6){ - GameData.allCharm = Number(data); - Utl.closeInputPanel(); - GameUI.setNumberImage(3197,data,23); - GameUI.adaptPositionSpid(3197,3196); + GameData.allCharm = Number(data); + Utl.closeInputPanel(); + GameUI.setNumberImage(3197, data, 23); + GameUI.adaptPositionSpid(3197, 3196); //}else{ - //GameUI.OpenTips("玩家id长度为6位!",ConstVal.Tips.time); + //GameUI.OpenTips("玩家id长度为6位!",ConstVal.Tips.time); //} } -GameUI.setTextSpid = function(spid,msg,width){ - set_self(spid,7,msg,0,0,0); - set_self(spid,20,String(msg).gblen()*width,0,0,0); - console.log(msg,String(msg).gblen()); +GameUI.setTextSpid = function (spid, msg, width) { + set_self(spid, 7, msg, 0, 0, 0); + set_self(spid, 20, String(msg).gblen() * width, 0, 0, 0); + console.log(msg, String(msg).gblen()); } -GameUI.openBlackList = function(){ - set_group(104,37,1,0,0); +GameUI.openBlackList = function () { + set_group(104, 37, 1, 0, 0); GameData.blackList.inputId = ""; - if(GameData.blackList.inputId){ + if (GameData.blackList.inputId) { //set_self(3212,7,GameData.blackList.inputId,0,0); - GameUI.setTextSpid(3212,GameData.blackList.inputId,GameData.blackList.idWidth); - - }else{ + GameUI.setTextSpid(3212, GameData.blackList.inputId, GameData.blackList.idWidth); + + } else { //set_self(3212,7,"点击输入玩家ID",0,0); - GameUI.setTextSpid(3212,"点击输入玩家ID",GameData.blackList.idWidth); + GameUI.setTextSpid(3212, "点击输入玩家ID", GameData.blackList.idWidth); } - set_self(3261,7,"解散该玩家所在房间(已开战提前解散)",0,0); + set_self(3261, 7, "解散该玩家所在房间(已开战提前解散)", 0, 0); //blackInputCallBack(""); - GameUI.adaptPositionSpid(3212,3205); + GameUI.adaptPositionSpid(3212, 3205); GameUI.createBlackList(); } -GameUI.closeBlackList = function(){ - set_group(104,37,0,0,0); +GameUI.closeBlackList = function () { + set_group(104, 37, 0, 0, 0); } -var blackInputCallBack = function(data){ - if(String(data).length == 6){ +var blackInputCallBack = function (data) { + if (String(data).length == 6) { Utl.closeInputPanel(); GameData.blackList.inputId = data; - if(GameData.blackList.inputId){ + if (GameData.blackList.inputId) { //set_self(3212,7,GameData.blackList.inputId,0,0); - GameUI.setTextSpid(3212,GameData.blackList.inputId,GameData.blackList.idWidth); - }else{ + GameUI.setTextSpid(3212, GameData.blackList.inputId, GameData.blackList.idWidth); + } else { //set_self(3212,7,"点击输入玩家ID",0,0); - GameUI.setTextSpid(3212,"点击输入玩家ID",GameData.blackList.idWidth); + GameUI.setTextSpid(3212, "点击输入玩家ID", GameData.blackList.idWidth); } - GameUI.adaptPositionSpid(3212,3205); - }else{ - GameUI.OpenTips("玩家id长度为6位!",ConstVal.Tips.time); + GameUI.adaptPositionSpid(3212, 3205); + } else { + GameUI.OpenTips("玩家id长度为6位!", ConstVal.Tips.time); } } -GameUI.createBlackList = function(){ +GameUI.createBlackList = function () { GameUI.removeBlackList(); - set_self(ConstVal.blackList.f_spid,18,ConstVal.blackList.clip_x,0,0); - var space = get_self(ConstVal.blackList.bg_spid,21,0,0,0) + ConstVal.blackList.space; + set_self(ConstVal.blackList.f_spid, 18, ConstVal.blackList.clip_x, 0, 0); + var space = get_self(ConstVal.blackList.bg_spid, 21, 0, 0, 0) + ConstVal.blackList.space; var listLength = GameData.blackList.data.length; - set_self(ConstVal.blackList.f_spid,21,listLength*space,0,0); - for(var i=0;i