Core/DB: Haaleshi Altar

- Prevent crash due to spamming GossipHello
- Convert core script to SAI
- Solves #8220
This commit is contained in:
Gacko committed 2012-12-31 15:03:19 +01:00
1 parent 4186c3cef7
commit edb90f957b
2 files changed
+14 -20

No files matched your search

@@ -0,0 +1,13 @@
-- Assign SmartGameObjectAI
UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI',`ScriptName`='' WHERE `entry`=181606;
-- SmartGameObjectAI for summoning Aeranas at Haaleshi Altar
DELETE FROM `smart_scripts` WHERE `entryorguid`=181606 AND `source_type`=1;
INSERT INTO `smart_scripts`(`entryorguid`,`source_type`,`id`,`event_type`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`target_type`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(181606,1,0,64,12,17085,4,60000,8,-1321.79,4043.8,116.24,1.25,'Haaleshi Altar - On gossip hello - Summon Aeranas');
-- Aeranas should only be summonened if there is not already one in range
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=181606 AND `SourceId`=1;
INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`NegativeCondition`,`Comment`) VALUES
(22,1,181606,1,29,1,17085,50,1,'Haaleshi Altar - Only summon Aeranas if there is not already one in range'),
(22,1,181606,1,28,0,9418,0,0,'Haaleshi Altar - Only summon Aeranas if invoker has completed quest Avruus Orb (Is auto-completed)');
@@ -53,9 +53,7 @@ enum eAeranas
FACTION_FRIENDLY = 35,
SPELL_ENVELOPING_WINDS = 15535,
SPELL_SHOCK = 12553,
C_AERANAS = 17085
SPELL_SHOCK = 12553
};
class npc_aeranas : public CreatureScript
@@ -204,22 +202,6 @@ public:
};
};
/*######
## go_haaleshi_altar
######*/
class go_haaleshi_altar : public GameObjectScript
{
public:
go_haaleshi_altar() : GameObjectScript("go_haaleshi_altar") { }
bool OnGossipHello(Player* /*player*/, GameObject* go)
{
go->SummonCreature(C_AERANAS, -1321.79f, 4043.80f, 116.24f, 1.25f, TEMPSUMMON_TIMED_DESPAWN, 180000);
return false;
}
};
/*######
## npc_naladu
######*/
@@ -532,7 +514,6 @@ void AddSC_hellfire_peninsula()
{
new npc_aeranas();
new npc_ancestral_wolf();
new go_haaleshi_altar();
new npc_naladu();
new npc_tracy_proudwell();
new npc_trollbane();