aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2013_03_15_02_world_trinity_strings.sql (renamed from sql/updates/world/2013_03_15_01_world_trinity_strings.sql)2
-rw-r--r--sql/updates/world/2013_03_16_00_world_conditions.sql10
-rw-r--r--sql/updates/world/2013_03_17_00_world_misc.sql21
-rw-r--r--sql/updates/world/2013_03_17_01_world_creature_template_addon.sql3
-rw-r--r--sql/updates/world/2013_03_17_02_world_sai.sql16
-rw-r--r--src/server/game/Grids/ObjectGridLoader.cpp5
-rw-r--r--src/server/game/Handlers/ChatHandler.cpp2
-rw-r--r--src/server/scripts/Commands/cs_message.cpp4
-rw-r--r--src/server/scripts/World/npcs_special.cpp26
9 files changed, 57 insertions, 32 deletions
diff --git a/sql/updates/world/2013_03_15_01_world_trinity_strings.sql b/sql/updates/world/2013_03_15_02_world_trinity_strings.sql
index 0ae44b1ae53..b81c22711c4 100644
--- a/sql/updates/world/2013_03_15_01_world_trinity_strings.sql
+++ b/sql/updates/world/2013_03_15_02_world_trinity_strings.sql
@@ -1,3 +1,3 @@
-DELETE FROM `trinity_string` where `entry`=363;
+DELETE FROM `trinity_string` WHERE `entry`=363;
INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES
(363, 'Player %s cannot whisper you any longer.');
diff --git a/sql/updates/world/2013_03_16_00_world_conditions.sql b/sql/updates/world/2013_03_16_00_world_conditions.sql
new file mode 100644
index 00000000000..0a8f347ac35
--- /dev/null
+++ b/sql/updates/world/2013_03_16_00_world_conditions.sql
@@ -0,0 +1,10 @@
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (48619,48620,52812);
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceGroup`=1 AND `SourceEntry`=48738;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,1,48619,0,0,31,0,3,27377,0,0,'','Spell Flame Breath effect0 targets Thane Torvald Eriksson'),
+(13,2,48619,0,0,31,0,3,27377,0,0,'','Spell Flame Breath effect1 targets Thane Torvald Eriksson'),
+(13,1,48620,0,0,31,0,3,27377,0,0,'','Spell Wing Buffet targets Thane Torvald Eriksson'),
+(13,1,52812,0,0,31,0,3,27377,0,0,'','Spell Molten Fury effect0 targets Thane Torvald Eriksson'),
+(13,2,52812,0,0,31,0,3,27377,0,0,'','Spell Molten Fury effect1 targets Thane Torvald Eriksson');
+
+UPDATE `smart_scripts` SET `event_type`=1, `event_flags`=1 WHERE `entryorguid`=21633 AND `source_type`=0 AND `id`=0;
diff --git a/sql/updates/world/2013_03_17_00_world_misc.sql b/sql/updates/world/2013_03_17_00_world_misc.sql
new file mode 100644
index 00000000000..f2f05eb6671
--- /dev/null
+++ b/sql/updates/world/2013_03_17_00_world_misc.sql
@@ -0,0 +1,21 @@
+SET @HARPOON := 30066;
+SET @HAYSTACK := 30096;
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (55896,55934);
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=@HAYSTACK;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,4,55896,0,0,31,0,3,@HAYSTACK,0,0,0,'','Spell Explosion effect2 targets Dry Haystack'),
+(13,2,55934,0,0,31,0,3,30103,0,0,0,'','Spell Valkyrion Fire effect1 targets Valkyrion Fire Bunny'),
+(22,1,@HAYSTACK,0,0,1,1,55934,0,0,1,0,'','SAI Dry Haystack triggers only if Dry Haystack has no aura of spell Valkyrion Fire');
+
+UPDATE `creature_template` SET `npcflag`=16777216, `ScriptName`='' WHERE `entry`=@HARPOON;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@HARPOON,@HAYSTACK);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@HARPOON,@HAYSTACK) AND `source_type`=0;
+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
+(@HARPOON,0,0,0,11,0,100,0,0,0,0,0,103,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Valkyrion Harpoon Gun - On spawn - Root'),
+
+(@HAYSTACK,0,0,1,8,0,100,0,55896,0,0,0,11,55934,0,0,0,0,0,0,0,0,0,0,0,0,0, 'Dry Haystack - On spellhit Explosion - Spellcast Valkyrion Fire'),
+(@HAYSTACK,0,1,2,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Dry Haystack - Linked - Set event phase 1'),
+(@HAYSTACK,0,2,0,61,0,100,0,0,0,0,0,33,@HAYSTACK,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Dry Haystack - Linked - Quest credit'),
+(@HAYSTACK,0,3,4,23,1,100,0,55934,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Dry Haystack - On spellfade Valkyrion Fire (phase 1) - Set event phase 0'),
+(@HAYSTACK,0,4,0,61,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Dry Haystack - Linked - Despawn');
diff --git a/sql/updates/world/2013_03_17_01_world_creature_template_addon.sql b/sql/updates/world/2013_03_17_01_world_creature_template_addon.sql
new file mode 100644
index 00000000000..3942ee46d34
--- /dev/null
+++ b/sql/updates/world/2013_03_17_01_world_creature_template_addon.sql
@@ -0,0 +1,3 @@
+DELETE FROM `creature_template_addon` WHERE `entry`=29570;
+INSERT INTO `creature_template_addon` (`entry`,`bytes1`,`bytes2`) VALUES
+(29570,50331648,1);
diff --git a/sql/updates/world/2013_03_17_02_world_sai.sql b/sql/updates/world/2013_03_17_02_world_sai.sql
new file mode 100644
index 00000000000..f75d4455a45
--- /dev/null
+++ b/sql/updates/world/2013_03_17_02_world_sai.sql
@@ -0,0 +1,16 @@
+SET @MULE := 23977;
+
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@MULE;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@MULE AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@MULE*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
+(@MULE,0,0,0,22,0,100,0,125,0,0,0,11,43572,0,0,0,0,0,7,0,0,0,0,0,0,0,'Abandoned Pack Mule - On emote receive - Spellcast Send Them Packing: On /Raise Emote Dummy to Player'),
+(@MULE,0,1,2,31,0,100,0,43572,0,0,0,11,42721,0,0,0,0,0,7,0,0,0,0,0,0,0,'Abandoned Pack Mule - On target spellhit Send Them Packing: On /Raise Emote Dummy to Player - Spellcast Send Them Packing: On Successful Dummy Spell Kill Credit'),
+(@MULE,0,2,0,61,0,100,0,0,0,0,0,80,@MULE*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Abandoned Pack Mule - On target spellhit Send Them Packing: On /Raise Emote Dummy to Player - Run script'),
+
+(@MULE*100,9,0,0,0,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Abandoned Pack Mule script - Stop movement'),
+(@MULE*100,9,1,0,0,0,100,0,500,500,0,0,5,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'Abandoned Pack Mule script - Play emote'),
+(@MULE*100,9,2,0,0,0,100,0,0,0,0,0,4,727,0,0,0,0,0,1,0,0,0,0,0,0,0,'Abandoned Pack Mule script - Play sound'),
+(@MULE*100,9,3,0,0,0,100,0,0,0,0,0,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Abandoned Pack Mule script - Set run'),
+(@MULE*100,9,4,0,0,0,100,0,2000,2000,0,0,69,0,0,0,0,0,0,8,0,0,0,1561.824,-3709.441,147.7268,0,'Abandoned Pack Mule script - Move to position'),
+(@MULE*100,9,5,0,0,0,100,0,15000,15000,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Abandoned Pack Mule script - Despawn');
diff --git a/src/server/game/Grids/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp
index dd54836edee..5de63d91649 100644
--- a/src/server/game/Grids/ObjectGridLoader.cpp
+++ b/src/server/game/Grids/ObjectGridLoader.cpp
@@ -210,14 +210,15 @@ void ObjectGridUnloader::Visit(GridRefManager<T> &m)
void ObjectGridStoper::Visit(CreatureMapType &m)
{
// stop any fights at grid de-activation and remove dynobjects created at cast by creatures
- for (CreatureMapType::iterator iter=m.begin(); iter != m.end(); ++iter)
+ for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
{
iter->getSource()->RemoveAllDynObjects();
if (iter->getSource()->isInCombat())
{
iter->getSource()->CombatStop();
iter->getSource()->DeleteThreatList();
- iter->getSource()->AI()->EnterEvadeMode();
+ if (iter->getSource()->IsAIEnabled)
+ iter->getSource()->AI()->EnterEvadeMode();
}
}
}
diff --git a/src/server/game/Handlers/ChatHandler.cpp b/src/server/game/Handlers/ChatHandler.cpp
index ca79c1c350a..2c41f6175d0 100644
--- a/src/server/game/Handlers/ChatHandler.cpp
+++ b/src/server/game/Handlers/ChatHandler.cpp
@@ -321,7 +321,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
}
Player* receiver = sObjectAccessor->FindPlayerByName(to);
- if (!receiver)
+ if (!receiver || (!receiver->isAcceptWhispers() && receiver->GetSession()->HasPermission(RBAC_PERM_CAN_FILTER_WHISPERS) && !receiver->IsInWhisperWhiteList(sender->GetGUID())))
{
SendPlayerNotFoundNotice(to);
return;
diff --git a/src/server/scripts/Commands/cs_message.cpp b/src/server/scripts/Commands/cs_message.cpp
index 66f55b85c1c..218d16d8b68 100644
--- a/src/server/scripts/Commands/cs_message.cpp
+++ b/src/server/scripts/Commands/cs_message.cpp
@@ -213,12 +213,12 @@ public:
if (Player* player = sObjectAccessor->FindPlayerByName(name))
{
handler->GetSession()->GetPlayer()->RemoveFromWhisperWhiteList(player->GetGUID());
- handler->PSendSysMessage(LANG_COMMAND_WHISPEROFFPLAYER, name);
+ handler->PSendSysMessage(LANG_COMMAND_WHISPEROFFPLAYER, name.c_str());
return true;
}
else
{
- handler->PSendSysMessage(LANG_PLAYER_NOT_FOUND, name);
+ handler->PSendSysMessage(LANG_PLAYER_NOT_FOUND, name.c_str());
handler->SetSentErrorMessage(true);
return false;
}
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index 43dbe778d6d..4c913d8c42e 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -2951,31 +2951,6 @@ public:
};
};
-/*######
-## npc_generic_harpoon_cannon
-######*/
-
-class npc_generic_harpoon_cannon : public CreatureScript
-{
-public:
- npc_generic_harpoon_cannon() : CreatureScript("npc_generic_harpoon_cannon") { }
-
- struct npc_generic_harpoon_cannonAI : public ScriptedAI
- {
- npc_generic_harpoon_cannonAI(Creature* creature) : ScriptedAI(creature) {}
-
- void Reset()
- {
- me->SetUnitMovementFlags(MOVEMENTFLAG_ROOT);
- }
- };
-
- CreatureAI* GetAI(Creature* creature) const
- {
- return new npc_generic_harpoon_cannonAI(creature);
- }
-};
-
void AddSC_npcs_special()
{
new npc_air_force_bots();
@@ -3007,5 +2982,4 @@ void AddSC_npcs_special()
new npc_earth_elemental();
new npc_firework();
new npc_spring_rabbit();
- new npc_generic_harpoon_cannon();
}