Created
April 14, 2012 23:37
-
-
Save eilo/2388669 to your computer and use it in GitHub Desktop.
Forbidding chat to espectators (there are 2 patch files inside)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From ba90ed38389fc1042455446900333e51c8e25012 Mon Sep 17 00:00:00 2001 | |
From: Eilo <[email protected]> | |
Date: Wed, 28 Mar 2012 03:14:30 -0500 | |
Subject: [PATCH] =?UTF-8?q?Arena=20Espectador:=20A=C3=B1adiendo=20el=20LANG=20?= | |
=?UTF-8?q?de=20lo=20del=20chat=20:S=20q=20askito=20tengo=20al=20final=20he=20?= | |
=?UTF-8?q?tenido=20q=20usarlo=20jaja?= | |
MIME-Version: 1.0 | |
Content-Type: text/plain; charset=UTF-8 | |
Content-Transfer-Encoding: 8bit | |
--- | |
.../2012_01_27_100_world_arena_espectador.sql | 7 ++++++- | |
src/server/game/Miscellaneous/Language.h | 3 +++ | |
2 files changed, 9 insertions(+), 1 deletions(-) | |
diff --git a/sql/updates/world/custom/2012_01_27_100_world_arena_espectador.sql b/sql/updates/world/custom/2012_01_27_100_world_arena_espectador.sql | |
index b84aaeb..f53f027 100644 | |
--- a/sql/updates/world/custom/2012_01_27_100_world_arena_espectador.sql | |
+++ b/sql/updates/world/custom/2012_01_27_100_world_arena_espectador.sql | |
@@ -1,4 +1,9 @@ | |
--- Arena Watcher | |
+-- Eilo (https://github.com/eilo) | |
+-- Arena Espectador WowRean | |
DELETE FROM `creature_template` WHERE `entry`=700000; | |
INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `WDBVerified`) VALUES | |
('700000','0','0','0','0','0','729','0','0','0','Arena Espectador','WowRean','','0','75','78','0','35','35','0','1','1.14286','1','0','387','543','0','528','1','2000','0','1','768','8','0','0','0','0','0','324','480','88','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','0','3','1','1','1','0','0','0','0','0','0','0','0','1','0','0','0','npc_arena_espectador','12340'); | |
+ | |
+DELETE FROM `trinity_string` WHERE `entry` = 999; | |
+INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES | |
+('999', 'No puedes usar el chat mientras eres espectador. WowRean'); | |
diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h | |
index 36bd010..747ee4f 100755 | |
--- a/src/server/game/Miscellaneous/Language.h | |
+++ b/src/server/game/Miscellaneous/Language.h | |
@@ -793,6 +793,9 @@ enum TrinityStrings | |
LANG_CHANNEL_CITY = 819, | |
// Room for in-game strings 820-999 not used | |
+ // Lang para el ArenaEspectador | |
+ LANG_SPEC_CAN_NOT_CHAT = 999, | |
+ | |
// Level 4 (CLI only commands) | |
LANG_COMMAND_EXIT = 1000, | |
LANG_ACCOUNT_DELETED = 1001, | |
-- | |
1.7.8.msysgit.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 95e08a32faec888c3bf61dadf1f5c6c9dacac38a Mon Sep 17 00:00:00 2001 | |
From: Eilo <[email protected]> | |
Date: Tue, 27 Mar 2012 10:25:07 -0500 | |
Subject: [PATCH] =?UTF-8?q?Arena=20Espectador:=20Apa=C3=B1ando=20el=20tema=20?= | |
=?UTF-8?q?del=20chat=20para=20que=20no=20puedan=20hablar=20ni=20por=20nada=20?= | |
=?UTF-8?q?del=20mundo=20xD?= | |
MIME-Version: 1.0 | |
Content-Type: text/plain; charset=UTF-8 | |
Content-Transfer-Encoding: 8bit | |
--- | |
.../game/Server/Protocol/Handlers/ChatHandler.cpp | 7 +++++++ | |
1 files changed, 7 insertions(+), 0 deletions(-) | |
diff --git a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp b/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp | |
index 852549b..d25271e 100755 | |
--- a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp | |
+++ b/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp | |
@@ -78,6 +78,13 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data) | |
return; | |
} | |
+ // Esta parte es del arena espectador | |
+ if (GetPlayer()->IsEspectador()) | |
+ { | |
+ SendNotification(LANG_SPEC_CAN_NOT_CHAT); // Para que no pueda chatear jeje :) | |
+ return; | |
+ } | |
+ | |
Player* sender = GetPlayer(); | |
//sLog->outDebug("CHAT: packet received. type %u, lang %u", type, lang); | |
-- | |
1.7.8.msysgit.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment