From 01ef119703ed9ce8276e9a899d3260ec05495d0a Mon Sep 17 00:00:00 2001 From: stfx Date: Sat, 24 Nov 2012 14:37:01 +0100 Subject: [PATCH 1/5] Fix receiving whispers while being dnd Signed-off-by: Nay --- src/server/game/Entities/Player/Player.cpp | 33 +++++++--------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index bca94517ef4..7dab5e15788 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -20089,42 +20089,29 @@ void Player::Whisper(const std::string& text, uint32 language, uint64 receiver) std::string _text(text); sScriptMgr->OnPlayerChat(this, CHAT_MSG_WHISPER, language, _text, rPlayer); - // when player you are whispering to is dnd, he cannot receive your message, unless you are in gm mode - if (!rPlayer->isDND() || isGameMaster()) - { - WorldPacket data(SMSG_MESSAGECHAT, 200); - BuildPlayerChat(&data, CHAT_MSG_WHISPER, _text, language); - rPlayer->GetSession()->SendPacket(&data); - - // not send confirmation for addon messages - if (!isAddonMessage) - { - data.Initialize(SMSG_MESSAGECHAT, 200); - rPlayer->BuildPlayerChat(&data, CHAT_MSG_WHISPER_INFORM, _text, language); - GetSession()->SendPacket(&data); - } - } - else if (!isAddonMessage) - // announce to player that player he is whispering to is dnd and cannot receive his message - ChatHandler(GetSession()).PSendSysMessage(LANG_PLAYER_DND, rPlayer->GetName().c_str(), rPlayer->dndMsg.c_str()); + WorldPacket data(SMSG_MESSAGECHAT, 200); + BuildPlayerChat(&data, CHAT_MSG_WHISPER, _text, language); + rPlayer->GetSession()->SendPacket(&data); // rest stuff shouldn't happen in case of addon message if (isAddonMessage) return; + data.Initialize(SMSG_MESSAGECHAT, 200); + rPlayer->BuildPlayerChat(&data, CHAT_MSG_WHISPER_INFORM, _text, language); + GetSession()->SendPacket(&data); + if (!isAcceptWhispers() && !isGameMaster() && !rPlayer->isGameMaster()) { SetAcceptWhispers(true); ChatHandler(GetSession()).SendSysMessage(LANG_COMMAND_WHISPERON); } - // announce to player that player he is whispering to is afk + // announce afk or dnd message if (rPlayer->isAFK()) ChatHandler(GetSession()).PSendSysMessage(LANG_PLAYER_AFK, rPlayer->GetName().c_str(), rPlayer->afkMsg.c_str()); - - // if player whisper someone, auto turn of dnd to be able to receive an answer - if (isDND() && !rPlayer->isGameMaster()) - ToggleDND(); + else if (rPlayer->isDND()) + ChatHandler(GetSession()).PSendSysMessage(LANG_PLAYER_DND, rPlayer->GetName().c_str(), rPlayer->dndMsg.c_str()); } void Player::PetSpellInitialize() From 51fadb57e0f0071064599509caab34c6b883b17b Mon Sep 17 00:00:00 2001 From: stfx Date: Sat, 24 Nov 2012 14:54:52 +0100 Subject: [PATCH 2/5] Allow setting afk/dnd message in afk/dnd state Also use the same variable to store the message for AFK and DND Signed-off-by: Nay --- src/server/game/Entities/Player/Player.cpp | 16 +++---- src/server/game/Entities/Player/Player.h | 7 ++- src/server/game/Handlers/ChatHandler.cpp | 51 +++++++++++++--------- 3 files changed, 39 insertions(+), 35 deletions(-) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 7dab5e15788..87a7b2e6277 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -2031,24 +2031,18 @@ bool Player::BuildEnumData(PreparedQueryResult result, WorldPacket* data) return true; } -bool Player::ToggleAFK() +void Player::ToggleAFK() { ToggleFlag(PLAYER_FLAGS, PLAYER_FLAGS_AFK); - bool state = HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_AFK); - // afk player not allowed in battleground - if (state && InBattleground() && !InArena()) + if (isAFK() && InBattleground() && !InArena()) LeaveBattleground(); - - return state; } -bool Player::ToggleDND() +void Player::ToggleDND() { ToggleFlag(PLAYER_FLAGS, PLAYER_FLAGS_DND); - - return HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_DND); } uint8 Player::GetChatTag() const @@ -20109,9 +20103,9 @@ void Player::Whisper(const std::string& text, uint32 language, uint64 receiver) // announce afk or dnd message if (rPlayer->isAFK()) - ChatHandler(GetSession()).PSendSysMessage(LANG_PLAYER_AFK, rPlayer->GetName().c_str(), rPlayer->afkMsg.c_str()); + ChatHandler(GetSession()).PSendSysMessage(LANG_PLAYER_AFK, rPlayer->GetName().c_str(), rPlayer->autoReplyMsg.c_str()); else if (rPlayer->isDND()) - ChatHandler(GetSession()).PSendSysMessage(LANG_PLAYER_DND, rPlayer->GetName().c_str(), rPlayer->dndMsg.c_str()); + ChatHandler(GetSession()).PSendSysMessage(LANG_PLAYER_DND, rPlayer->GetName().c_str(), rPlayer->autoReplyMsg.c_str()); } void Player::PetSpellInitialize() diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 1e8b6aedb3e..8fc13e1dda9 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1108,13 +1108,12 @@ class Player : public Unit, public GridObject Creature* GetNPCIfCanInteractWith(uint64 guid, uint32 npcflagmask); GameObject* GetGameObjectIfCanInteractWith(uint64 guid, GameobjectTypes type) const; - bool ToggleAFK(); - bool ToggleDND(); + void ToggleAFK(); + void ToggleDND(); bool isAFK() const { return HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_AFK); } bool isDND() const { return HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_DND); } uint8 GetChatTag() const; - std::string afkMsg; - std::string dndMsg; + std::string autoReplyMsg; uint32 GetBarberShopCost(uint8 newhairstyle, uint8 newhaircolor, uint8 newfacialhair, BarberShopStyleEntry const* newSkin=NULL); diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp index e4989816998..560cc904974 100644 --- a/src/server/game/Handlers/ChatHandler.cpp +++ b/src/server/game/Handlers/ChatHandler.cpp @@ -440,40 +440,51 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData) } break; case CHAT_MSG_AFK: { - if ((msg.empty() || !_player->isAFK()) && !_player->isInCombat()) + if (!_player->isInCombat()) { - if (!_player->isAFK()) + if (_player->isAFK()) // Already AFK { if (msg.empty()) - msg = GetTrinityString(LANG_PLAYER_AFK_DEFAULT); - _player->afkMsg = msg; + _player->ToggleAFK(); // Remove AFK + else + _player->autoReplyMsg = msg; // Update message + } + else // New AFK mode + { + _player->autoReplyMsg = msg.empty() ? GetTrinityString(LANG_PLAYER_AFK_DEFAULT) : msg; + + if (_player->isDND()) + _player->ToggleDND(); + + _player->ToggleAFK(); } sScriptMgr->OnPlayerChat(_player, type, lang, msg); - - _player->ToggleAFK(); - if (_player->isAFK() && _player->isDND()) - _player->ToggleDND(); } - } break; + break; + } case CHAT_MSG_DND: { - if (msg.empty() || !_player->isDND()) + if (_player->isDND()) // Already DND { - if (!_player->isDND()) - { - if (msg.empty()) - msg = GetTrinityString(LANG_PLAYER_DND_DEFAULT); - _player->dndMsg = msg; - } + if (msg.empty()) + _player->ToggleDND(); // Remove DND + else + _player->autoReplyMsg = msg; // Update message + } + else // New DND mode + { + _player->autoReplyMsg = msg.empty() ? GetTrinityString(LANG_PLAYER_DND_DEFAULT) : msg; - sScriptMgr->OnPlayerChat(_player, type, lang, msg); + if (_player->isAFK()) + _player->ToggleAFK(); _player->ToggleDND(); - if (_player->isDND() && _player->isAFK()) - _player->ToggleAFK(); } - } break; + + sScriptMgr->OnPlayerChat(_player, type, lang, msg); + break; + } default: sLog->outError(LOG_FILTER_NETWORKIO, "CHAT: unknown message type %u, lang: %u", type, lang); break; From 368e7113ceb2f5f9ca4ea58095c6504f49ae5168 Mon Sep 17 00:00:00 2001 From: Nay Date: Sun, 23 Dec 2012 17:54:19 +0000 Subject: [PATCH 3/5] DB/Players: Fix message sent when DND is enabled Closes #8428 Also update some sql file names --- ...rld_conditions.sql => 2012_12_20_00_world_conditions (2).sql} | 0 ...0_creature_text.sql => 2012_12_23_00_world_creature_text.sql} | 0 ...1_creature_text.sql => 2012_12_23_01_world_creature_text.sql} | 0 sql/updates/world/2012_12_23_02_world_trinity_string.sql | 1 + 4 files changed, 1 insertion(+) rename sql/updates/world/{2012_12_20_0_world_conditions.sql => 2012_12_20_00_world_conditions (2).sql} (100%) rename sql/updates/world/{2012_12_23_00_creature_text.sql => 2012_12_23_00_world_creature_text.sql} (100%) rename sql/updates/world/{2012_12_23_01_creature_text.sql => 2012_12_23_01_world_creature_text.sql} (100%) create mode 100644 sql/updates/world/2012_12_23_02_world_trinity_string.sql diff --git a/sql/updates/world/2012_12_20_0_world_conditions.sql b/sql/updates/world/2012_12_20_00_world_conditions (2).sql similarity index 100% rename from sql/updates/world/2012_12_20_0_world_conditions.sql rename to sql/updates/world/2012_12_20_00_world_conditions (2).sql diff --git a/sql/updates/world/2012_12_23_00_creature_text.sql b/sql/updates/world/2012_12_23_00_world_creature_text.sql similarity index 100% rename from sql/updates/world/2012_12_23_00_creature_text.sql rename to sql/updates/world/2012_12_23_00_world_creature_text.sql diff --git a/sql/updates/world/2012_12_23_01_creature_text.sql b/sql/updates/world/2012_12_23_01_world_creature_text.sql similarity index 100% rename from sql/updates/world/2012_12_23_01_creature_text.sql rename to sql/updates/world/2012_12_23_01_world_creature_text.sql diff --git a/sql/updates/world/2012_12_23_02_world_trinity_string.sql b/sql/updates/world/2012_12_23_02_world_trinity_string.sql new file mode 100644 index 00000000000..ac99945d5a5 --- /dev/null +++ b/sql/updates/world/2012_12_23_02_world_trinity_string.sql @@ -0,0 +1 @@ +UPDATE `trinity_string` SET `content_default` = '%s does not wish to be disturbed: %s' WHERE `entry`=707; From bdd625fda358d72d7987925cd091c6a8c980ff6a Mon Sep 17 00:00:00 2001 From: Pitcrawler Date: Sun, 23 Dec 2012 19:02:08 +0100 Subject: [PATCH 4/5] DB/SAI: Fixes quest: Hell Hath a Fury --- .../world/2012_12_23_03_world_misc.sql | 121 ++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 sql/updates/world/2012_12_23_03_world_misc.sql diff --git a/sql/updates/world/2012_12_23_03_world_misc.sql b/sql/updates/world/2012_12_23_03_world_misc.sql new file mode 100644 index 00000000000..c9a42df10dd --- /dev/null +++ b/sql/updates/world/2012_12_23_03_world_misc.sql @@ -0,0 +1,121 @@ +SET @NPC_QUETZLUN := 28030; +SET @NPC_MUFUNU := 28752; +SET @NPC_MUFUNU_KC := 28753; +SET @NPC_TUATUA := 28754; +SET @NPC_TUATUA_KC := 28755; +SET @NPC_HAWINNI := 28756; +SET @NPC_HAWINNI_KC := 28757; +SET @SPELL_HIGH_PRIEST_IMMUNITY := 4309; +SET @SPELL_HEX_OF_AIR_KNOCKBACK := 41909; +SET @SPELL_RANDOM_CIRCUMFERENCE_1 := 42267; +SET @SPELL_RANDOM_CIRCUMFERENCE_2 := 42274; +SET @SPELL_SUICIDE := 45254; +SET @SPELL_HEX := 52250; +SET @SPELL_HEXXING_STICK := 52251; +SET @SPELL_HEX_OF_AIR := 52249; +SET @SPELL_HEX_OF_FIRE := 52278; +SET @SPELL_TUATUA_ON_BURN := 52279; +SET @SPELL_HEX_OF_FROST := 52287; +SET @SPELL_HAWINNI_ON_FROZEN := 52303; +SET @SPELL_RANDOM_CIRCUMFERENCE := 52320; + +DELETE FROM `creature_text` WHERE `entry` IN (@NPC_QUETZLUN,@NPC_MUFUNU,@NPC_TUATUA,@NPC_HAWINNI); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@NPC_QUETZLUN,0,0,'There is no escape. There is only my wrath!',14,0,100,0,0,0,'Quetz''lun'), +(@NPC_QUETZLUN,0,1,'Eternal damnation is your future.',14,0,100,0,0,0,'Quetz''lun'), +(@NPC_QUETZLUN,0,2,'My judgment is final.',14,0,100,0,0,0,'Quetz''lun'), +(@NPC_QUETZLUN,0,3,'Beg for your life. Plead. It will do you no good!',14,0,100,0,0,0,'Quetz''lun'), +(@NPC_QUETZLUN,0,4,'Burn in the fires of my fury!',14,0,100,0,0,0,'Quetz''lun'), +(@NPC_QUETZLUN,0,5,'Die!',14,0,100,0,0,0,'Quetz''lun'), +(@NPC_QUETZLUN,0,6,'You killed me and now I will kill you... over and over!',14,0,100,0,0,0,'Quetz''lun'), +(@NPC_QUETZLUN,0,7,'I find you wanting.',14,0,100,0,0,0,'Quetz''lun'), +(@NPC_MUFUNU,0,0,'NOOOOOOOOOoooooooo.......!',12,0,100,0,0,0,'Mu''funu'), +(@NPC_TUATUA,0,0,'FIRE! AHHHHHHHH!',12,0,100,0,0,0,'Tua-tua'), +(@NPC_TUATUA,1,0,'The high priestess is reduced to charcoal.',16,0,100,0,0,0,'Tua-Tua'), +(@NPC_HAWINNI,0,0,'%s becomes enraged!',16,0,100,0,0,0,'Hawinni'), +(@NPC_HAWINNI,1,0,'BRRRRRR!',12,0,100,0,0,0,'Hawinni'), +(@NPC_HAWINNI,2,0,'%s explodes!',16,0,100,0,0,0,'Hawinni'); + +UPDATE `creature_model_info` SET `bounding_radius`=0.875, `combat_reach`=1.75 WHERE `modelid`=25669; +UPDATE `creature_model_info` SET `bounding_radius`=1.5, `combat_reach`=3 WHERE `modelid`=25672; + +DELETE FROM `conditions` WHERE `SourceEntry`=@SPELL_HEXXING_STICK AND `SourceTypeOrReferenceId`=17; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry` IN (@NPC_MUFUNU,@NPC_TUATUA); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(17,0,@SPELL_HEXXING_STICK,0,0,31,1,3,@NPC_MUFUNU,0,0,0,'','Spell Quetz''lun''s Hexxing Stick can only be casted on High Priest Mu''funu'), +(17,0,@SPELL_HEXXING_STICK,0,1,31,1,3,@NPC_TUATUA,0,0,0,'','Spell Quetz''lun''s Hexxing Stick can only be casted on High Priestess Tua-Tua'), +(17,0,@SPELL_HEXXING_STICK,0,2,31,1,3,@NPC_HAWINNI,0,0,0,'','Spell Quetz''lun''s Hexxing Stick can only be casted on High Priest Hawinni'), +(22,2,@NPC_MUFUNU,0,0,1,1,@SPELL_HEX_OF_AIR,0,0,1,0,'','SAI High Priest Mu''funu cast Shadow Channeling if aura Hex is not applied'), +(22,2,@NPC_TUATUA,0,0,1,1,@SPELL_HEX_OF_FIRE,0,0,1,0,'','SAI High Priestess Tua-tua remove Shadow Form and cast Shadow Channeling if aura Hex is not applied'); + +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (-@SPELL_HEX_OF_AIR_KNOCKBACK,@SPELL_TUATUA_ON_BURN,@SPELL_HEX_OF_FROST,@SPELL_HAWINNI_ON_FROZEN); +INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES +(-@SPELL_HEX_OF_AIR_KNOCKBACK,@SPELL_SUICIDE,0,'On spellfade Hex of Air Knockback - Spellcast Suicide'), +(@SPELL_TUATUA_ON_BURN,@SPELL_SUICIDE,1,'On spellhit Tua-Tua on Burn - Spellcast Suicide'), +(@SPELL_HEX_OF_FROST,@SPELL_HIGH_PRIEST_IMMUNITY,2,'On aura Hex of Frost - Apply High Priest Immunity'), +(@SPELL_HAWINNI_ON_FROZEN,@SPELL_SUICIDE,1,'On spellhit Hawinni on Frozen - Spellcast Suicide'); + +-- SmartAIs +UPDATE `smart_scripts` SET `link`=1 WHERE `entryorguid`=@NPC_QUETZLUN; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC_QUETZLUN AND `source_type`=0 AND `id`=1; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC_MUFUNU AND `source_type`=0 AND `id` IN (11,12,13); +DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC_TUATUA AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@NPC_HAWINNI AND `source_type`=0 AND `id` IN (3,4,5); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_MUFUNU*100,@NPC_TUATUA*100,@NPC_HAWINNI*100) AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@NPC_QUETZLUN,0,1,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,21,100,0,0,0,0,0,0, 'Quetz''lun - On update OOC - Say line'), + +(@NPC_MUFUNU,0,11,0,8,0,100,0,@SPELL_HEX,0,0,0,42,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Mu''funu - On spellhit Hex - Set invincibility 1 HP'), +(@NPC_MUFUNU,0,12,13,2,0,100,1,0,0.1,0,0,33,@NPC_MUFUNU_KC,0,0,0,0,0,16,0,0,0,0,0,0,0, 'High Priest Mu''funu - On health below 0.1% - Quest credit'), +(@NPC_MUFUNU,0,13,0,61,0,100,0,0,0,0,0,80,@NPC_MUFUNU*100,2,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Mu''funu - On health below 0.1% - Run script'), +(@NPC_MUFUNU*100,9,0,0,0,0,100,0,0,0,0,0,101,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Mu''funu script - Set homeposition'), +(@NPC_MUFUNU*100,9,1,0,0,0,100,0,0,0,0,0,102,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Mu''funu script - Stop health regen'), +(@NPC_MUFUNU*100,9,2,0,0,0,100,0,0,0,0,0,18,256,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Mu''funu script - Set unit_flags IMMUNE_TO_PC'), +(@NPC_MUFUNU*100,9,3,0,0,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Mu''funu script - Evade'), +(@NPC_MUFUNU*100,9,4,0,0,0,100,0,0,0,0,0,42,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Mu''funu script - Remove invincibility'), +(@NPC_MUFUNU*100,9,5,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'High Priest Mu''funu script - Say line'), +(@NPC_MUFUNU*100,9,6,0,0,0,100,0,0,0,0,0,11,@SPELL_HEX_OF_AIR,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Mu''funu script - Spellcast Hex of Air'), +(@NPC_MUFUNU*100,9,7,0,0,0,100,0,10000,10000,0,0,11,@SPELL_HEX_OF_AIR_KNOCKBACK,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Mu''funu script - Spellcast Knockback'), +(@NPC_MUFUNU*100,9,8,0,0,0,100,0,0,0,0,0,19,256,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Mu''funu script - Remove unit_flags IMMUNE_TO_PC'), + +(@NPC_TUATUA,0,0,0,11,0,100,0,0,0,0,0,11,51733,0,0,0,0,0,1,0,0,0,0,0,0,0,'High Priestess Tua-Tua - On spawn - Spellcast Shadow Channelling'), +(@NPC_TUATUA,0,1,2,21,0,100,0,0,0,0,0,28,29406,0,0,0,0,0,1,0,0,0,0,0,0,0,'High Priestess Tua-Tua - On homeposition reached - Spellcast Shadow Channelling'), +(@NPC_TUATUA,0,2,0,61,0,100,0,0,0,0,0,11,51733,0,0,0,0,0,1,0,0,0,0,0,0,0,'High Priestess Tua-Tua - On homeposition reached - Remove aura Shadowform'), +(@NPC_TUATUA,0,3,0,4,0,100,0,0,0,0,0,11,29406,0,0,0,0,0,1,0,0,0,0,0,0,0,'High Priestess Tua-Tua - On aggro - Spellcast Shadowform'), +(@NPC_TUATUA,0,4,0,0,0,100,0,2000,3000,15000,20000,11,51818,0,0,0,0,0,2,0,0,0,0,0,0,0,'High Priestess Tua-Tua - On update IC - Spellcast Shadow Word: Death'), +(@NPC_TUATUA,0,5,0,0,0,100,0,4000,5000,3000,5000,11,13860,0,0,0,0,0,2,0,0,0,0,0,0,0,'High Priestess Tua-Tua - On update IC - Spellcast Mind Blast'), +(@NPC_TUATUA,0,6,0,8,0,100,0,@SPELL_HEX,0,0,0,42,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priestess Tua-tua - On spellhit Hex - Set invincibility 1 HP'), +(@NPC_TUATUA,0,7,8,2,0,100,1,0,0.1,0,0,33,@NPC_TUATUA_KC,0,0,0,0,0,16,0,0,0,0,0,0,0, 'High Priestess Tua-tua - On health below 0.1% - Quest credit'), +(@NPC_TUATUA,0,8,0,61,0,100,0,0,0,0,0,80,@NPC_TUATUA*100,2,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priestess Tua-tua - On health below 0.1% - Run script'), +(@NPC_TUATUA*100,9,0,0,0,0,100,0,0,0,0,0,101,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priestess Tua-tua script - Set homeposition'), +(@NPC_TUATUA*100,9,1,0,0,0,100,0,0,0,0,0,102,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priestess Tua-tua script - Stop health regen'), +(@NPC_TUATUA*100,9,2,0,0,0,100,0,0,0,0,0,18,256,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priestess Tua-tua script - Set unit_flags IMMUNE_TO_PC'), +(@NPC_TUATUA*100,9,3,0,0,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priestess Tua-tua script - Evade'), +(@NPC_TUATUA*100,9,4,0,0,0,100,0,0,0,0,0,42,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priestess Tua-tua script - Remove invincibility'), +(@NPC_TUATUA*100,9,5,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'High Priestess Tua-tua script - Say line'), +(@NPC_TUATUA*100,9,6,0,0,0,100,0,0,0,0,0,11,@SPELL_HEX_OF_FIRE,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priestess Tua-tua script - Spellcast Hex of Fire'), +(@NPC_TUATUA*100,9,7,0,0,0,100,0,10000,10000,0,0,11,@SPELL_TUATUA_ON_BURN,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priestess Tua-tua script - Spellcast Tua-tua on Burn'), +(@NPC_TUATUA*100,9,8,0,0,0,100,0,0,0,0,0,3,0,25669,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priestess Tua-tua script - Change modelid'), +(@NPC_TUATUA*100,9,9,0,0,0,100,0,0,0,0,0,19,256,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priestess Tua-tua script - Remove unit_flags IMMUNE_TO_PC'), +(@NPC_TUATUA*100,9,10,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,7,0,0,0,0,0,0,0, 'High Priestess Tua-tua script - Say line'), + +(@NPC_HAWINNI,0,3,0,8,0,100,0,@SPELL_HEX,0,0,0,42,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Hawinni - On spellhit Hex - Set invincibility 1 HP'), +(@NPC_HAWINNI,0,4,5,2,0,100,1,0,0.1,0,0,33,@NPC_HAWINNI_KC,0,0,0,0,0,16,0,0,0,0,0,0,0, 'High Priest Hawinni - On health below 0.1% - Quest credit'), +(@NPC_HAWINNI,0,5,0,61,0,100,0,0,0,0,0,80,@NPC_HAWINNI*100,2,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Hawinni - On health below 0.1% - Run script'), +(@NPC_HAWINNI*100,9,0,0,0,0,100,0,0,0,0,0,11,@SPELL_HEX_OF_FROST,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Hawinni script - Spellcast Hex of Frost'), +(@NPC_HAWINNI*100,9,1,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Hawinni script - Say line'), +(@NPC_HAWINNI*100,9,2,0,0,0,100,0,10000,10000,0,0,11,@SPELL_RANDOM_CIRCUMFERENCE_1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Hawinni script - Spellcast Random Circumference Point Bone'), +(@NPC_HAWINNI*100,9,3,0,0,0,100,0,0,0,0,0,11,@SPELL_RANDOM_CIRCUMFERENCE_2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Hawinni script - Spellcast Random Circumference Point Bone 2'), +(@NPC_HAWINNI*100,9,4,0,0,0,100,0,0,0,0,0,11,@SPELL_RANDOM_CIRCUMFERENCE_1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Hawinni script - Spellcast Random Circumference Point Bone'), +(@NPC_HAWINNI*100,9,5,0,0,0,100,0,0,0,0,0,11,@SPELL_RANDOM_CIRCUMFERENCE_2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Hawinni script - Spellcast Random Circumference Point Bone 2'), +(@NPC_HAWINNI*100,9,6,0,0,0,100,0,0,0,0,0,11,@SPELL_RANDOM_CIRCUMFERENCE,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Hawinni script - Spellcast Random Circumference Ice Chunk'), +(@NPC_HAWINNI*100,9,7,0,0,0,100,0,0,0,0,0,11,@SPELL_RANDOM_CIRCUMFERENCE_1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Hawinni script - Spellcast Random Circumference Point Bone'), +(@NPC_HAWINNI*100,9,8,0,0,0,100,0,0,0,0,0,11,@SPELL_RANDOM_CIRCUMFERENCE_2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Hawinni script - Spellcast Random Circumference Point Bone 2'), +(@NPC_HAWINNI*100,9,9,0,0,0,100,0,0,0,0,0,11,@SPELL_RANDOM_CIRCUMFERENCE,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Hawinni script - Spellcast Random Circumference Ice Chunk'), +(@NPC_HAWINNI*100,9,10,0,0,0,100,0,0,0,0,0,11,@SPELL_RANDOM_CIRCUMFERENCE,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Hawinni script - Spellcast Random Circumference Ice Chunk'), +(@NPC_HAWINNI*100,9,11,0,0,0,100,0,0,0,0,0,11,@SPELL_RANDOM_CIRCUMFERENCE,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Hawinni script - Spellcast Random Circumference Ice Chunk'), +(@NPC_HAWINNI*100,9,12,0,0,0,100,0,0,0,0,0,11,@SPELL_RANDOM_CIRCUMFERENCE,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Hawinni script - Spellcast Random Circumference Ice Chunk'), +(@NPC_HAWINNI*100,9,13,0,0,0,100,0,0,0,0,0,1,2,0,0,0,0,0,7,0,0,0,0,0,0,0, 'High Priest Hawinni script - Say line'), +(@NPC_HAWINNI*100,9,14,0,0,0,100,0,0,0,0,0,42,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Hawinni script - Remove invincibility'), +(@NPC_HAWINNI*100,9,15,0,0,0,100,0,50,50,0,0,11,@SPELL_HAWINNI_ON_FROZEN,0,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Hawinni script - Spellcast Hawinni on Frozen'), +(@NPC_HAWINNI*100,9,16,0,0,0,100,0,0,0,0,0,3,0,25672,0,0,0,0,1,0,0,0,0,0,0,0, 'High Priest Hawinni script - Change modelid'); From c33a1724ae96de3759d299038b1eabd7b93a631f Mon Sep 17 00:00:00 2001 From: Subv Date: Sun, 23 Dec 2012 13:21:00 -0500 Subject: [PATCH 5/5] Core/Spells: Spells that are usable while stunned should no longer have problems with stun auras that don't apply any mechanic. --- src/server/game/Spells/Spell.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index bb51d9d0e34..3cee51949bc 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -5615,7 +5615,7 @@ SpellCastResult Spell::CheckCasterAuras() const Unit::AuraEffectList const& stunAuras = m_caster->GetAuraEffectsByType(SPELL_AURA_MOD_STUN); for (Unit::AuraEffectList::const_iterator i = stunAuras.begin(); i != stunAuras.end(); ++i) { - if (!((*i)->GetSpellInfo()->GetAllEffectsMechanicMask() & (1<GetSpellInfo()->GetAllEffectsMechanicMask() && !((*i)->GetSpellInfo()->GetAllEffectsMechanicMask() & (1<