From b6ad37f35c0d10b7d88d048ded582c07068eca69 Mon Sep 17 00:00:00 2001 From: AFROM Date: Tue, 11 Sep 2012 17:12:32 -0500 Subject: Update src/server/game/Events/GameEventMgr.cpp Change name ot the table (wrong name) --- src/server/game/Events/GameEventMgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp index bead65bbfdd..704bdde740e 100755 --- a/src/server/game/Events/GameEventMgr.cpp +++ b/src/server/game/Events/GameEventMgr.cpp @@ -860,7 +860,7 @@ void GameEventMgr::LoadFromDB() if (!result) { - sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 battleground holidays in game events. DB table `game_event_condition` is empty."); + sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 battleground holidays in game events. DB table `game_event_battleground_holiday` is empty."); } else { -- cgit v1.2.3 From b62ad5a955dfee690b7971b991e5ca692b7c2635 Mon Sep 17 00:00:00 2001 From: w1sht0l1v3 Date: Wed, 12 Sep 2012 06:15:50 +0300 Subject: Core/ToCr: Several fixes. Fix floor animation when destroyed. Add spawns for Highlord Tirion Fordring,Argent Mage and Portal to Dalaran. Remove Db spawn of Highlord Tirion Fordring. Correct tribute chest spawn location. Fix sql names for last commits. --- sql/updates/world/2012_09_10_14_world_misc.sql | 11 ----------- sql/updates/world/2012_09_10_15_world_misc.sql | 9 --------- sql/updates/world/2012_09_11_00_world_misc.sql | 11 +++++++++++ sql/updates/world/2012_09_12_00_world_misc.sql | 9 +++++++++ sql/updates/world/2012_09_12_01_world_creature.sql | 1 + .../TrialOfTheCrusader/instance_trial_of_the_crusader.cpp | 3 ++- .../TrialOfTheCrusader/trial_of_the_crusader.cpp | 9 +++++---- .../TrialOfTheCrusader/trial_of_the_crusader.h | 9 +++++++++ 8 files changed, 37 insertions(+), 25 deletions(-) delete mode 100644 sql/updates/world/2012_09_10_14_world_misc.sql delete mode 100644 sql/updates/world/2012_09_10_15_world_misc.sql create mode 100644 sql/updates/world/2012_09_11_00_world_misc.sql create mode 100644 sql/updates/world/2012_09_12_00_world_misc.sql create mode 100644 sql/updates/world/2012_09_12_01_world_creature.sql (limited to 'src') diff --git a/sql/updates/world/2012_09_10_14_world_misc.sql b/sql/updates/world/2012_09_10_14_world_misc.sql deleted file mode 100644 index 0f47f1bf2e9..00000000000 --- a/sql/updates/world/2012_09_10_14_world_misc.sql +++ /dev/null @@ -1,11 +0,0 @@ --- ToCr orbs - -SET @NPC_ORB1 := 34606; -- Frost Sphere -SET @NPC_ORB2 := 34649; -- Frost Sphere - -UPDATE `creature_template` SET `speed_walk`=1.2,`speed_run`=1.42,`InhabitType`=7 WHERE `entry` IN (@NPC_ORB1,@NPC_ORB2); - -DELETE FROM `creature_template_addon` WHERE `entry` IN (@NPC_ORB1,@NPC_ORB2); -INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`auras`) VALUES -(@NPC_ORB1,0,0x3000000,0x1,''), -(@NPC_ORB2,0,0x3000000,0x1,''); diff --git a/sql/updates/world/2012_09_10_15_world_misc.sql b/sql/updates/world/2012_09_10_15_world_misc.sql deleted file mode 100644 index 50896ce414c..00000000000 --- a/sql/updates/world/2012_09_10_15_world_misc.sql +++ /dev/null @@ -1,9 +0,0 @@ --- East Porticullis(195648): close and corrections -UPDATE `gameobject` SET `phaseMask`=1,`rotation2`=0.7071065,`rotation3`=0.707107,`spawntimesecs`=7200,`animprogress`=255,`state`=0 WHERE `guid`=151176; - --- North Portcullis(195650): delete extra spawn and corrections -DELETE FROM `gameobject` WHERE `guid`=150080; -UPDATE `gameobject` SET `phaseMask`=1,`rotation2`=0.7071065,`rotation3`=0.707107,`spawntimesecs`=7200,`animprogress`=255,`state`=1 WHERE `guid`=151178; - --- Web Door(195485): corrections -UPDATE `gameobject` SET `spawnMask`=15,`rotation2`=0.7071067,`rotation3`=0.7071068,`spawntimesecs`=7200,`animprogress`=255 WHERE `guid`=151192; diff --git a/sql/updates/world/2012_09_11_00_world_misc.sql b/sql/updates/world/2012_09_11_00_world_misc.sql new file mode 100644 index 00000000000..0f47f1bf2e9 --- /dev/null +++ b/sql/updates/world/2012_09_11_00_world_misc.sql @@ -0,0 +1,11 @@ +-- ToCr orbs + +SET @NPC_ORB1 := 34606; -- Frost Sphere +SET @NPC_ORB2 := 34649; -- Frost Sphere + +UPDATE `creature_template` SET `speed_walk`=1.2,`speed_run`=1.42,`InhabitType`=7 WHERE `entry` IN (@NPC_ORB1,@NPC_ORB2); + +DELETE FROM `creature_template_addon` WHERE `entry` IN (@NPC_ORB1,@NPC_ORB2); +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`auras`) VALUES +(@NPC_ORB1,0,0x3000000,0x1,''), +(@NPC_ORB2,0,0x3000000,0x1,''); diff --git a/sql/updates/world/2012_09_12_00_world_misc.sql b/sql/updates/world/2012_09_12_00_world_misc.sql new file mode 100644 index 00000000000..50896ce414c --- /dev/null +++ b/sql/updates/world/2012_09_12_00_world_misc.sql @@ -0,0 +1,9 @@ +-- East Porticullis(195648): close and corrections +UPDATE `gameobject` SET `phaseMask`=1,`rotation2`=0.7071065,`rotation3`=0.707107,`spawntimesecs`=7200,`animprogress`=255,`state`=0 WHERE `guid`=151176; + +-- North Portcullis(195650): delete extra spawn and corrections +DELETE FROM `gameobject` WHERE `guid`=150080; +UPDATE `gameobject` SET `phaseMask`=1,`rotation2`=0.7071065,`rotation3`=0.707107,`spawntimesecs`=7200,`animprogress`=255,`state`=1 WHERE `guid`=151178; + +-- Web Door(195485): corrections +UPDATE `gameobject` SET `spawnMask`=15,`rotation2`=0.7071067,`rotation3`=0.7071068,`spawntimesecs`=7200,`animprogress`=255 WHERE `guid`=151192; diff --git a/sql/updates/world/2012_09_12_01_world_creature.sql b/sql/updates/world/2012_09_12_01_world_creature.sql new file mode 100644 index 00000000000..1b7fa2d78ef --- /dev/null +++ b/sql/updates/world/2012_09_12_01_world_creature.sql @@ -0,0 +1 @@ +DELETE FROM `creature` WHERE `id`=36095; diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp index 9767126371b..af6104008ff 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp @@ -332,7 +332,8 @@ class instance_trial_of_the_crusader : public InstanceMapScript } if (tributeChest) if (Creature* tirion = instance->GetCreature(TirionGUID)) - if (GameObject* chest = tirion->SummonGameObject(tributeChest, 805.62f, 134.87f, 142.16f, 3.27f, 0, 0, 0, 0, 90000000)) + // need proper location.this one is guessed based on videos + if (GameObject* chest = tirion->SummonGameObject(tributeChest, 643.814f, 136.027f, 141.295f, 0, 0, 0, 0, 0, 90000000)) chest->SetRespawnTime(chest->GetRespawnDelay()); break; } diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp index 37d08484f0b..4792a9c4e58 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp @@ -25,7 +25,6 @@ EndScriptData */ //Known Bugs: // - Need better implementation of Gossip and correct gossip text and option -// - Misses Dalaran Teleport at the end. #include "ScriptMgr.h" #include "ScriptedCreature.h" @@ -219,7 +218,7 @@ class npc_announcer_toc10 : public CreatureScript return true; if (GameObject* floor = GameObject::GetGameObject(*player, instanceScript->GetData64(GO_ARGENT_COLISEUM_FLOOR))) - floor->SetDestructibleState(GO_DESTRUCTIBLE_DESTROYED); + floor->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED); creature->CastSpell(creature, 69016, false); @@ -337,7 +336,7 @@ class boss_lich_king_toc : public CreatureScript break; case 5080: if (GameObject* go = instance->instance->GetGameObject(instance->GetData64(GO_ARGENT_COLISEUM_FLOOR))) - go->SetDestructibleState(GO_DESTRUCTIBLE_DESTROYED); + go->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED); me->CastSpell(me, 69016, false); if (instance) { @@ -797,7 +796,9 @@ class npc_tirion_toc : public CreatureScript instance->SetData(TYPE_EVENT, 0); break; case 6000: - me->NearTeleportTo(AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 4.0f); + me->SummonCreature(NPC_TIRION_FORDRING, EndSpawnLoc[0].GetPositionX(), EndSpawnLoc[0].GetPositionY(), EndSpawnLoc[0].GetPositionZ()); + me->SummonCreature(NPC_ARGENT_MAGE, EndSpawnLoc[1].GetPositionX(), EndSpawnLoc[1].GetPositionY(), EndSpawnLoc[1].GetPositionZ()); + me->SummonGameObject(GO_PORTAL_TO_DALARAN, EndSpawnLoc[2].GetPositionX(), EndSpawnLoc[2].GetPositionY(), EndSpawnLoc[2].GetPositionZ(), 5, 0, 0, 0, 0, 0); m_uiUpdateTimer = 20000; instance->SetData(TYPE_EVENT, 6005); break; diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h index ba230551b24..58cbd727963 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.h @@ -129,6 +129,13 @@ const Position AnubarakLoc[]= {740.184509f, 193.443390f, 142.117584f, 0}, // 4 - Nerub Spawn }; +const Position EndSpawnLoc[]= +{ + {648.9167f, 131.0208f, 141.6161f, 0}, // 0 - Highlord Tirion Fordring + {649.1614f, 142.0399f, 141.3057f ,0}, // 1 - Argent Mage + {644.6250f, 149.2743f, 140.6015f ,0}, // 2 - Portal to Dalaran +}; + enum euiWorldStates { UPDATE_STATE_UI_SHOW = 4390, @@ -163,6 +170,7 @@ enum eCreature NPC_BARRENT = 34816, NPC_TIRION = 34996, NPC_TIRION_FORDRING = 36095, + NPC_ARGENT_MAGE = 36097, NPC_FIZZLEBANG = 35458, NPC_GARROSH = 34995, NPC_VARIAN = 34990, @@ -245,6 +253,7 @@ enum eGameObject GO_MAIN_GATE_DOOR = 195647, GO_EAST_PORTCULLIS = 195648, GO_WEB_DOOR = 195485, + GO_PORTAL_TO_DALARAN = 195682, }; enum eAchievementData -- cgit v1.2.3 From 2ff0910d670f05e68eb1168ff6569b6330ad738e Mon Sep 17 00:00:00 2001 From: w1sht0l1v3 Date: Thu, 13 Sep 2012 03:40:17 +0300 Subject: Core/Scripts: Reliquary of Souls: fix encounter start and essence phases. --- .../Outland/BlackTemple/boss_reliquary_of_souls.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src') diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp index 44c37fc9753..ec9e4e116bf 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp @@ -181,6 +181,23 @@ public: me->RemoveAurasDueToSpell(SPELL_SUBMERGE); } + void MoveInLineOfSight(Unit* who) + { + if (!who) + return; + + if (me->isInCombat()) + return; + + if (who->GetTypeId() != TYPEID_PLAYER) + return; + + if (me->GetDistance(who) > 50.0f) + return; + + AttackStartNoMove(who); + } + void EnterCombat(Unit* who) { me->AddThreat(who, 10000.0f); @@ -412,6 +429,7 @@ public: me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->Yell(SUFF_SAY_RECAP, LANG_UNIVERSAL, 0); DoScriptText(SUFF_SAY_RECAP, me); + me->SetReactState(REACT_PASSIVE); } } @@ -532,6 +550,7 @@ public: damage = 0; me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); DoScriptText(SUFF_SAY_RECAP, me); + me->SetReactState(REACT_PASSIVE); } else { -- cgit v1.2.3 From 5b14848a10d9eba087a96c195f670faec821eaa3 Mon Sep 17 00:00:00 2001 From: Elron103 Date: Thu, 13 Sep 2012 03:15:22 +0200 Subject: Core/Mail: Fix merging of items taken from mail leading to invalid entries in item_instance --- src/server/game/Handlers/MailHandler.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/server/game/Handlers/MailHandler.cpp b/src/server/game/Handlers/MailHandler.cpp index ae04444a118..8702b939ca8 100755 --- a/src/server/game/Handlers/MailHandler.cpp +++ b/src/server/game/Handlers/MailHandler.cpp @@ -500,6 +500,7 @@ void WorldSession::HandleMailTakeItem(WorldPacket & recv_data) player->RemoveMItem(it->GetGUIDLow()); uint32 count = it->GetCount(); // save counts before store and possible merge with deleting + it->SetState(ITEM_UNCHANGED); // need to set this state, otherwise item cannot be removed later, if neccessary player->MoveItemToInventory(dest, it, true); player->SaveInventoryAndGoldToDB(trans); -- cgit v1.2.3 From f746c2d975477e1f84a11f3c06e8f1175ebe5106 Mon Sep 17 00:00:00 2001 From: kaelima Date: Thu, 13 Sep 2012 11:38:27 +0200 Subject: Core/ItemTemplate: Rename unk0 column. Weapons have special sounds on impact. This column is used to override these sounds by specifying another subclass. For example an item with misc subclass can sound like a stave on impact by overriding the subclass here. --- sql/updates/world/2012_09_13_00_world_item_template.sql | 1 + src/server/game/DataStores/DBCStructure.h | 2 +- src/server/game/Entities/Item/ItemPrototype.h | 2 +- src/server/game/Globals/ObjectMgr.cpp | 12 ++++++------ src/server/game/Handlers/ItemHandler.cpp | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 sql/updates/world/2012_09_13_00_world_item_template.sql (limited to 'src') diff --git a/sql/updates/world/2012_09_13_00_world_item_template.sql b/sql/updates/world/2012_09_13_00_world_item_template.sql new file mode 100644 index 00000000000..48b9d3a107f --- /dev/null +++ b/sql/updates/world/2012_09_13_00_world_item_template.sql @@ -0,0 +1 @@ +ALTER TABLE `item_template` CHANGE unk0 SoundOverrideSubclass tinyint(3) NOT NULL DEFAULT '-1'; diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index fdec06f6f48..ef949f43f49 100755 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -1092,7 +1092,7 @@ struct ItemEntry uint32 ID; // 0 uint32 Class; // 1 uint32 SubClass; // 2 some items have strange subclasses - int32 Unk0; // 3 + int32 SoundOverrideSubclass; // 3 int32 Material; // 4 uint32 DisplayId; // 5 uint32 InventoryType; // 6 diff --git a/src/server/game/Entities/Item/ItemPrototype.h b/src/server/game/Entities/Item/ItemPrototype.h index 4aadf134f6e..f2f41d6a8b9 100755 --- a/src/server/game/Entities/Item/ItemPrototype.h +++ b/src/server/game/Entities/Item/ItemPrototype.h @@ -588,7 +588,7 @@ struct ItemTemplate uint32 ItemId; uint32 Class; // id from ItemClass.dbc uint32 SubClass; // id from ItemSubClass.dbc - int32 Unk0; + int32 SoundOverrideSubclass; // < 0: id from ItemSubClass.dbc, used to override weapon sound from actual SubClass std::string Name1; uint32 DisplayInfoID; // id from ItemDisplayInfo.dbc uint32 Quality; diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 369f481116a..20044004b48 100755 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -2001,8 +2001,8 @@ void ObjectMgr::LoadItemTemplates() { uint32 oldMSTime = getMSTime(); - // 0 1 2 3 4 5 6 7 8 9 10 11 12 - QueryResult result = WorldDatabase.Query("SELECT entry, class, subclass, unk0, name, displayid, Quality, Flags, FlagsExtra, BuyCount, BuyPrice, SellPrice, InventoryType, " + // 0 1 2 3 4 5 6 7 8 9 10 11 12 + QueryResult result = WorldDatabase.Query("SELECT entry, class, subclass, SoundOverrideSubclass, name, displayid, Quality, Flags, FlagsExtra, BuyCount, BuyPrice, SellPrice, InventoryType, " // 13 14 15 16 17 18 19 20 "AllowableClass, AllowableRace, ItemLevel, RequiredLevel, RequiredSkill, RequiredSkillRank, requiredspell, requiredhonorrank, " // 21 22 23 24 25 26 27 28 @@ -2055,7 +2055,7 @@ void ObjectMgr::LoadItemTemplates() itemTemplate.ItemId = entry; itemTemplate.Class = uint32(fields[1].GetUInt8()); itemTemplate.SubClass = uint32(fields[2].GetUInt8()); - itemTemplate.Unk0 = fields[3].GetInt32(); + itemTemplate.SoundOverrideSubclass = int32(fields[3].GetInt8()); itemTemplate.Name1 = fields[4].GetString(); itemTemplate.DisplayInfoID = fields[5].GetUInt32(); itemTemplate.Quality = uint32(fields[6].GetUInt8()); @@ -2171,11 +2171,11 @@ void ObjectMgr::LoadItemTemplates() itemTemplate.Class = dbcitem->Class; } - if (itemTemplate.Unk0 != dbcitem->Unk0) + if (itemTemplate.SoundOverrideSubclass != dbcitem->SoundOverrideSubclass) { - sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) does not have a correct Unk0 (%i), must be %i .", entry, itemTemplate.Unk0, dbcitem->Unk0); + sLog->outError(LOG_FILTER_SQL, "Item (Entry: %u) does not have a correct Unk0 (%i), must be %i .", entry, itemTemplate.SoundOverrideSubclass, dbcitem->SoundOverrideSubclass); if (enforceDBCAttributes) - itemTemplate.Unk0 = dbcitem->Unk0; + itemTemplate.SoundOverrideSubclass = dbcitem->SoundOverrideSubclass; } if (itemTemplate.Material != dbcitem->Material) { diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp index 260220bb8d5..76c719443bb 100755 --- a/src/server/game/Handlers/ItemHandler.cpp +++ b/src/server/game/Handlers/ItemHandler.cpp @@ -306,7 +306,7 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket & recv_data) data << pProto->ItemId; data << pProto->Class; data << pProto->SubClass; - data << int32(pProto->Unk0); // new 2.0.3, not exist in wdb cache? + data << pProto->SoundOverrideSubclass; data << Name; data << uint8(0x00); //pProto->Name2; // blizz not send name there, just uint8(0x00); <-- \0 = empty string = empty name... data << uint8(0x00); //pProto->Name3; // blizz not send name there, just uint8(0x00); -- cgit v1.2.3 From 9b76acbd3a0745f8eef6af77d80320cb74103a20 Mon Sep 17 00:00:00 2001 From: Faq Date: Thu, 13 Sep 2012 15:19:52 +0300 Subject: Core/Spells Scroll of Recall --- .../world/2012_09_13_01_world_spell_target_position.sql | 15 +++++++++++++++ src/server/game/Spells/SpellEffects.cpp | 8 ++++++++ 2 files changed, 23 insertions(+) create mode 100644 sql/updates/world/2012_09_13_01_world_spell_target_position.sql (limited to 'src') diff --git a/sql/updates/world/2012_09_13_01_world_spell_target_position.sql b/sql/updates/world/2012_09_13_01_world_spell_target_position.sql new file mode 100644 index 00000000000..0879dbbbda0 --- /dev/null +++ b/sql/updates/world/2012_09_13_01_world_spell_target_position.sql @@ -0,0 +1,15 @@ +DELETE FROM `spell_target_position` WHERE `id` IN (60323,60324,60325,60326,60327,60328,60329,60330,60331,60332,60333,60334,60335); +INSERT INTO `spell_target_position` (`id`, `target_map`, `target_position_x`, `target_position_y`, `target_position_z`, `target_orientation`) VALUES +(60323,0,-5506.339,-704.348,392.686,0.595), -- Steelgrills Depot +(60324,0,-9470.760,3.909,49.794,4.802), -- Lions Pride Inn, Goldshire +(60325,1,-3721.306,-4411.906,25.247,0.831), -- Theramore isle, Dustwallow Marsh +(60326,0,286.314,-2184.086,122.612,2.271), -- Aerie Peak, The Hinterlands +(60327,1,6395.708,433.256,33.260,0.566), -- Auberdine, Darkshore +(60328,0,-14412.923,692.017,22.248,1.231), -- Boote Bay +(60329,1,-7135.717,-3787.769,8.799,5.992), -- Tanaris, Gadgetzan +(60330,0,-10336.138,-2934.057,116.723,4.523), -- Swamp of Sorrows, Z coord is intended +(60331,0,-10446.900,-3261.909,20.179,5.875), -- Stonard, Swamp of Sorrows +(60332,0,-103.988,-902.795,55.534,5.924), -- Tarren Mill, Hillsbrad Foothils +(60333,0,1804.836,196.322,70.399,1.572), -- Undercity +(60334,1,-1060.266,23.137,141.455,5.967), -- Thunder Bluff +(60335,1,-506.224,-2590.084,113.150,2.445); -- Barrens, The Crossroads diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 75cf7e82b25..dcbd1888b03 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -1153,6 +1153,14 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/) if (unitTarget->getLevel() > uiMaxSafeLevel) { unitTarget->AddAura(60444, unitTarget); //Apply Lost! Aura + + // ALLIANCE from 60323 to 60330 - HORDE from 60328 to 60335 + uint32 spellId = 60323; + if (m_caster->ToPlayer()->GetTeam() == HORDE) + spellId += 5; + + spellId += urand(0, 7); + m_caster->CastSpell(m_caster, spellId, true); return; } break; -- cgit v1.2.3 From 54fe4489a31fa134397cca5e3ba32cb47af604b7 Mon Sep 17 00:00:00 2001 From: thesensei Date: Thu, 13 Sep 2012 12:27:27 +0300 Subject: Scripts/Ogri'La: Add support for quest "Bomb Them Again" and all related * Sniffed spell support for Knockdown Fel Cannon: Choose Loc, Knockdown Fel Cannon: The Aggro Check, Knockdown Fel Cannon: The Aggro Burst, Knockdown Fel Cannon: The Aggro Check Aura, Trhow Bomb and Fel Flak Fire * Sniffed spawns support, but only for quest related creatures and gos, no area patrols/spawns involved * Achievement support for Blade's Edge Bomberman and Fa-la-la-la-Ogri'la * Full DB support based on sniffs, all that can be done in SAI and not in *cpp is converted Credits: The SAI script is based on Warpen work, thanks to Subv for proposing fix for Fel Flak Fire /and helping/ and DDuarte for helping with conditions Closes: Signed-off-by: Nay --- sql/updates/world/2012_09_13_00_world_ogrila.sql | 160 ++++++++++++++++++ .../2012_09_13_00_world_spell_script_name.sql | 4 + .../2012_09_13_01_world_spell_script_name.sql | 4 + .../2012_09_13_02_world_spell_script_name.sql | 4 + .../2012_09_13_03_world_spell_script_name.sql | 4 + .../2012_09_13_04_world_spell_script_name.sql | 4 + src/server/game/Spells/SpellInfo.cpp | 2 +- src/server/scripts/Spells/spell_quest.cpp | 182 ++++++++++++++++++++- 8 files changed, 362 insertions(+), 2 deletions(-) create mode 100644 sql/updates/world/2012_09_13_00_world_ogrila.sql create mode 100644 sql/updates/world/2012_09_13_00_world_spell_script_name.sql create mode 100644 sql/updates/world/2012_09_13_01_world_spell_script_name.sql create mode 100644 sql/updates/world/2012_09_13_02_world_spell_script_name.sql create mode 100644 sql/updates/world/2012_09_13_03_world_spell_script_name.sql create mode 100644 sql/updates/world/2012_09_13_04_world_spell_script_name.sql (limited to 'src') diff --git a/sql/updates/world/2012_09_13_00_world_ogrila.sql b/sql/updates/world/2012_09_13_00_world_ogrila.sql new file mode 100644 index 00000000000..9838435de94 --- /dev/null +++ b/sql/updates/world/2012_09_13_00_world_ogrila.sql @@ -0,0 +1,160 @@ +-- Quest support for http://www.wowhead.com/quest=11010 "Bombing Run", http://www.wowhead.com/quest=11102 "Bombing Run" /druid/ and http://www.wowhead.com/quest=11023 "Bomb Them Again!" +-- Achievement support for http://www.wowhead.com/achievement=1282 and http://www.wowhead.com/achievement=1276, +-- Based on Warpten Script +SET @SKYGUARD_BOMB := 32456; +SET @Run_Dummy := 23118; +SET @Script := 2311800; +SET @Explosion_Bunny := 23119; +SET @Flak_Cannon := 23076; +SET @Flak_Cannon2 := 23082; +SET @Fel_Cannon_Dummy := 23077; +SET @RUN_MARK := 40196; +SET @THROW_BOMB := 40160; +SET @EXPLOSION_VISUAL := 40162; +SET @See_Invisibility := 40195; +SET @Invisibility := 40194; +SET @CANNONBALL_STACK := 185861; +-- Add class requirements for druid version of "Bombing Run" +UPDATE `quest_template` SET `RequiredClasses`=1024 WHERE `Id`=11102; +-- Add SAI support for Bombing Run Target Dummy +UPDATE `creature_template` SET `AIName`='SmartAI',`flags_extra`=`flags_extra`|128 WHERE `entry`=@Run_Dummy; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@Run_Dummy; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Run_Dummy; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script; +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 +(@Run_Dummy,0,0,1,8,0,100,0,@THROW_BOMB,0,1000,1000,33,23118,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Run Target Dummy - On spell Throw Bomb hit - Give kill credit'), +(@Run_Dummy,0,1,2,61,0,100,0,0,0,0,0,28,@RUN_MARK,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Run Target Dummy - Linked with previous event - Remove auras from hunter mark'), +(@Run_Dummy,0,2,3,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,20,@CANNONBALL_STACK,3,0,0,0,0,0, 'Run Target Dummy - Linked with previous event - Data set 0 1 on Cannonball Stack'), +(@Run_Dummy,0,3,4,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,19,@Explosion_Bunny,3,0,0,0,0,0, 'Run Target Dummy - Linked with previous event - Data set 0 1 on Explosion Bunny'), +(@Run_Dummy,0,4,0,61,0,100,0,0,0,0,0,80,@Script,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Run Target Dummy - Linked with previous event - Start script 0'), +-- Script 0 +(@Script,9,0,0,0,0,100,0,29000,29000,0,0,11,@RUN_MARK,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Run Target Dummy - Action 0 - Cast run mark on self'); +-- Add SAI for Cannonball Stack +UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@CANNONBALL_STACK; +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=@CANNONBALL_STACK; +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 +(@CANNONBALL_STACK,1,0,0,38,0,100,0,0,1,0,0,70,30,0,0,0,0,0,1,0,0,0,0,0,0,0,' Cannonball Stack - On data set 0 1 - Respawn object /make it reappear after 30 secs/'); +-- Add SAI support for Bombing Run Fel Cannon Dummy +UPDATE `creature_template` SET `AIName`='SmartAI',`unit_flags`=4,`flags_extra`=`flags_extra`|128 WHERE `entry`=@Fel_Cannon_Dummy; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Fel_Cannon_Dummy; +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 +(@Fel_Cannon_Dummy,0,0,0,8,0,100,0,40110,0,4350,5000,11,40119,0,0,0,0,0,19,@Flak_Cannon,5,0,0,0,0,0, 'Fel Cannon Dummy - On spell hit by Cannon trigger - Cast Aggro Burst on Flak Cannon'); +-- Add SAI support for Bombing Run Flak Cannon +UPDATE `creature_template` SET `AIName`='SmartAI',`unit_flags`=`unit_flags`|4|256|131072,`flags_extra`=`flags_extra`|2 WHERE `entry`=@Flak_Cannon; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Flak_Cannon; +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 +(@Flak_Cannon,0,0,0,25,0,100,0,0,0,0,0,11,40111,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Flak Cannon - On reset - Cast The Aggro Bunnies'), +(@Flak_Cannon,0,1,2,8,0,100,0,41598,0,0,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Flak Cannon - On hit by Bolt Pair - Set orientation to invoker'), +(@Flak_Cannon,0,2,0,61,0,100,0,0,0,0,0,11,40109,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Flak Cannon - Linked with previous event - Cast spell The Bolt'); +-- Add SAI support for Bombing Run Flak Cannon 2 /target bunny/ +UPDATE `creature_template` SET `AIName`='SmartAI',`flags_extra`=`flags_extra`|128,`InhabitType`=4 WHERE `entry`=@Flak_Cannon2; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Flak_Cannon2; +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 +(@Flak_Cannon2,0,0,0,54,0,100,0,0,0,0,0,11,41598,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Flak Cannon 2 - On just summoned - Cast The Bolt Pair on invoker'), +(@Flak_Cannon2,0,1,2,8,0,100,0,40109,0,0,0,11,40075,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Flak Cannon 2 - On spell hit Cannon Bolt - Cast on self Fel Flak Fire'), +(@Flak_Cannon2,0,2,0,61,0,100,0,0,0,0,0,41,5000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Flak Cannon 2 - Linked with previous event - Despawn in 5 sec'); +-- Add SAI support for Explosion Bunny +UPDATE `creature_template` SET `AIName`='SmartAI',`flags_extra`=`flags_extra`|128,`unit_flags`=0 WHERE `entry`=@Explosion_Bunny; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Explosion_Bunny; +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 +(@Explosion_Bunny,0,0,0,38,0,100,0,0,1,0,0,11,@EXPLOSION_VISUAL,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Explosion Bunny - On data set 0 1 - Cast Explosion Visual on self'); +-- Add conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (@THROW_BOMB,40110,40112,40075); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry` IN (@THROW_BOMB,40200,41598,40111); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=@Fel_Cannon_Dummy; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`Comment`) VALUES +(17,0,@THROW_BOMB,0,29,0,@Run_Dummy,35,0,0,0,'Throw Bomb requires Run Target Dummy within 35y'), +(13,1,@THROW_BOMB,0,31,0,3,@Run_Dummy,0,0,0,'Throw Bomb implicit effect 0 can hit only Run Target Dummy'), +(13,1,@THROW_BOMB,0,1,0,@RUN_MARK,0,0,0,0,'Throw Bomb can hit only targets under the aura of 40196'), +(17,0,40200,0,9,0,11010,0,0,1,0,'To cast remove see invisibility player must not be on quest 11010'), +(17,0,40200,0,9,0,11102,0,0,1,0,'To cast remove see invisibility player must not be on quest 11102'), +(17,0,40200,0,9,0,11023,0,0,1,0,'To cast remove see invisibility player must not be on quest 11023'), +(13,1,40110,0,31,0,3,23077,0,0,0,'Cannon Trigger implicit targets can be only Fel Cannon Dummies'), +(13,1,40110,0,35,0,1,65,2,0,0,'Cannon Trigger implicit hit can happen only on targets under 65 yards range'), +(17,0,40111,0,29,0,@Fel_Cannon_Dummy,10,0,1,0,'The Aggro Bunnies caster should not be around Fel Cannon Dummies to cast'), +(13,1,40112,0,31,0,4,0,0,0,0,'Bombing Run Dummy aggro check can hit players'), +(13,3,40075,0,31,0,4,0,0,0,0,'Fel Flak Fire effect 2 can hit only players'), +(22,1,@Fel_Cannon_Dummy,0,1,1,40119,0,0,1,0,'Fel Cannon Dummy event 0 will happen only if target is missing aura from aggro burst'); +-- Insert addon data +DELETE FROM `creature_template_addon` WHERE `entry` IN (@Run_Dummy,@Explosion_Bunny,@Fel_Cannon_Dummy); +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(@Run_Dummy,0,0,0,0,'40196 40194 40195'), -- Mark, See Invisibility, Invisibility +(@Explosion_Bunny,0,0,0,0,'40194 40195'), -- See Invisibility, Invisibility +(@Fel_Cannon_Dummy,0,0,0,0,'40113'); -- The Aggro Check Aura +-- Remove achievement from disabled +DELETE FROM `disables` WHERE `sourceType`=4 AND `entry`=3923; +-- Add missing spell from dbc +DELETE FROM `spell_dbc` WHERE `Id`=40200; +INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`Attributes`,`AttributesEx`,`AttributesEx2`,`AttributesEx3`,`AttributesEx4`,`AttributesEx5`,`AttributesEx6`,`AttributesEx7`,`Stances`,`StancesNot`,`Targets`,`CastingTimeIndex`,`AuraInterruptFlags`,`ProcFlags`,`ProcChance`,`ProcCharges`,`MaxLevel`,`BaseLevel`,`SpellLevel`,`DurationIndex`,`RangeIndex`,`StackAmount`,`EquippedItemClass`,`EquippedItemSubClassMask`,`EquippedItemInventoryTypeMask`,`Effect1`,`Effect2`,`Effect3`,`EffectDieSides1`,`EffectDieSides2`,`EffectDieSides3`,`EffectRealPointsPerLevel1`,`EffectRealPointsPerLevel2`,`EffectRealPointsPerLevel3`,`EffectBasePoints1`,`EffectBasePoints2`,`EffectBasePoints3`,`EffectMechanic1`,`EffectMechanic2`,`EffectMechanic3`,`EffectImplicitTargetA1`,`EffectImplicitTargetA2`,`EffectImplicitTargetA3`,`EffectImplicitTargetB1`,`EffectImplicitTargetB2`,`EffectImplicitTargetB3`,`EffectRadiusIndex1`,`EffectRadiusIndex2`,`EffectRadiusIndex3`,`EffectApplyAuraName1`,`EffectApplyAuraName2`,`EffectApplyAuraName3`,`EffectAmplitude1`,`EffectAmplitude2`,`EffectAmplitude3`,`EffectMultipleValue1`,`EffectMultipleValue2`,`EffectMultipleValue3`,`EffectMiscValue1`,`EffectMiscValue2`,`EffectMiscValue3`,`EffectMiscValueB1`,`EffectMiscValueB2`,`EffectMiscValueB3`,`EffectTriggerSpell1`,`EffectTriggerSpell2`,`EffectTriggerSpell3`,`EffectSpellClassMaskA1`,`EffectSpellClassMaskA2`,`EffectSpellClassMaskA3`,`EffectSpellClassMaskB1`,`EffectSpellClassMaskB2`,`EffectSpellClassMaskB3`,`EffectSpellClassMaskC1`,`EffectSpellClassMaskC2`,`EffectSpellClassMaskC3`,`MaxTargetLevel`,`SpellFamilyName`,`SpellFamilyFlags1`,`SpellFamilyFlags2`,`SpellFamilyFlags3`,`MaxAffectedTargets`,`DmgClass`,`PreventionType`,`DmgMultiplier1`,`DmgMultiplier2`,`DmgMultiplier3`,`AreaGroupId`,`SchoolMask`,`Comment`) VALUES +(40200,0,0,256,0,0,0,0,0,0,0,0,0,0,1,0,0,101,0,0,0,0,26,1,0,-1,0,0,164,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,'Bombing Run: See Invisibility Aura Remover'); +-- Spell area - Check to cast remove aura /against see invisibility aura/, if having it and not on quest +DELETE FROM `spell_area` WHERE `spell`=40200; +INSERT INTO `spell_area` (`spell`,`area`,`quest_start`,`quest_start_active`,`quest_end`,`aura_spell`,`racemask`,`gender`,`autocast`) VALUES +(40200,3522,0,0,0,@See_Invisibility,0,2,1); +-- Insert cannonballs spawns /based on sniffs/ +SET @guid := 164235; -- Free slot on trinity clean core marked on 12.09.2012 +DELETE FROM `gameobject` WHERE `guid` IN (@guid+0,@guid+1,@guid+2,@guid+3,@guid+4,@guid+5,@guid+6,@guid+7,@guid+8,@guid+9,@guid+10,@guid+11,@guid+12,@guid+13); +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(@guid+0,185861,530,1,1,2825.11,7024.05,369.982,5.69617,0,0,0.289313,-0.957235,300,0,1), +(@guid+1,185861,530,1,1,2938.26,7094.72,369.413,2.78314,0,0,0.983982,0.178267,300,0,1), +(@guid+2,185861,530,1,1,2924.84,7031.46,367.857,4.26205,0,0,0.847134,-0.53138,300,0,1), +(@guid+3,185861,530,1,1,2938.02,7015.59,365.75,3.65778,0,0,0.966879,-0.255237,300,0,1), +(@guid+4,185861,530,1,1,2998.57,7043.55,368.539,5.91266,0,0,0.184206,-0.982888,300,0,1), +(@guid+5,185861,530,1,1,2982,7054.94,368.32,4.99766,0,0,0.599411,-0.800442,300,0,1), +(@guid+6,185861,530,1,1,2978.73,6889.19,369.701,0.689745,0,0,0.338077,0.941119,300,0,1), +(@guid+7,185861,530,1,1,2941.56,6827.17,367.3,4.08109,0,0,0.891683,-0.452661,300,0,1), +(@guid+8,185861,530,1,1,2953.55,6859.3,369.954,6.14433,0,0,0.0693712,-0.997591,300,0,1), +(@guid+9,185861,530,1,1,3023.13,6799.74,374.46,1.58666,0,0,0.712695,0.701474,300,0,1), +(@guid+10,185861,530,1,1,3028.3,6824.84,373.591,5.0275,0,0,0.587401,-0.809296,300,0,1), +(@guid+11,185861,530,1,1,3022.15,6859.05,369.546,3.44885,0,0,0.988222,-0.153025,300,0,1), +(@guid+12,185861,530,1,1,3016.28,6876.11,370.188,3.47791,0,0,0.985895,-0.167365,300,0,1), +(@guid+13,185861,530,1,1,2940.6,7106.65,370.123,0.88561,0,0,0.428475,0.903553,300,0,1); +-- Insert spawns for Fel Flak Cannons, Run Target Dummies and Explosion Bunnies /based on sniffs/ +SET @guid := 209183; -- Free slot on trinity clean core marked on 12.09.2012 +DELETE FROM `creature` WHERE `guid` IN (@guid+0,@guid+1,@guid+2,@guid+3,@guid+4,@guid+5,@guid+6,@guid+7,@guid+8,@guid+9,@guid+10,@guid+11,@guid+12,@guid+13,@guid+14,@guid+15,@guid+16,@guid+17,@guid+18,@guid+19,@guid+20,@guid+21,@guid+22,@guid+23,@guid+24,@guid+25,@guid+26,@guid+27,@guid+28,@guid+29,@guid+30,@guid+31,@guid+32,@guid+33,@guid+34,@guid+35,@guid+36,@guid+37,@guid+38,@guid+39,@guid+40,@guid+41,@guid+42,@guid+43,@guid+44); +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES +(@guid+0,23118,530,1,1,0,0,2764.71,7024.45,370.203,0,300,0,0,42,0,0,0,33554432,0), +(@guid+1,23119,530,1,1,0,0,2764.71,7024.45,370.203,0,300,0,0,6986,0,0,0,33554432,0), +(@guid+2,23118,530,1,1,0,0,2786.61,7036.28,370.686,0,300,0,0,42,0,0,0,33554432,0), +(@guid+3,23119,530,1,1,0,0,2786.61,7036.28,370.686,0,300,0,0,6986,0,0,0,33554432,0), +(@guid+4,23118,530,1,1,0,0,2824.71,7044.79,369.877,0,300,0,0,42,0,0,0,33554432,0), +(@guid+5,23119,530,1,1,0,0,2824.71,7044.79,369.877,0,300,0,0,6986,0,0,0,33554432,0), +(@guid+6,23076,530,1,1,0,0,2775.81,7030.75,370.337,1.85606,300,0,0,22140,0,0,0,0,0), +(@guid+7,23076,530,1,1,0,0,2933.28,7103.93,369.209,2.58129,300,0,0,21543,0,0,0,0,0), +(@guid+8,23119,530,1,1,0,0,2940.82,7107.17,370.115,4.65944,300,0,0,6986,0,0,0,33554432,0), +(@guid+9,23118,530,1,1,0,0,2940.82,7107.17,370.115,4.65944,300,0,0,42,0,0,0,33554432,0), +(@guid+10,23118,530,1,1,0,0,2825.11,7024.05,369.982,5.69617,300,0,0,42,0,0,0,33554432,0), +(@guid+11,23119,530,1,1,0,0,2825.11,7024.05,369.982,5.69617,300,0,0,6986,0,0,0,33554432,0), +(@guid+12,23076,530,1,1,0,0,2834.14,7018.43,368.459,5.42992,300,0,0,21543,0,0,0,0,0), +(@guid+13,23119,530,1,1,0,0,2938.84,7094.48,371.493,0.242375,300,0,0,6986,0,0,0,33554432,0), +(@guid+14,23118,530,1,1,0,0,2938.84,7094.48,371.493,0.242375,300,0,0,42,0,0,0,33554432,0), +(@guid+15,23076,530,1,1,0,0,2925.49,7021.72,367.007,3.59446,300,0,0,22140,0,0,0,0,0), +(@guid+16,23119,530,1,1,0,0,2924.84,7031.46,367.857,4.26205,300,0,0,6986,0,0,0,33554432,0), +(@guid+17,23118,530,1,1,0,0,2924.84,7031.46,367.857,4.26205,300,0,0,42,0,0,0,33554432,0), +(@guid+18,23119,530,1,1,0,0,2938.02,7015.59,366.54,3.65778,300,0,0,6986,0,0,0,33554432,0), +(@guid+19,23118,530,1,1,0,0,2938.02,7015.59,366.54,3.65778,300,0,0,42,0,0,0,33554432,0), +(@guid+20,23076,530,1,1,0,0,2994.48,7039.91,369.42,5.26077,300,0,0,22140,0,0,0,0,0), +(@guid+21,23119,530,1,1,0,0,2998.57,7043.55,368.539,5.91266,300,0,0,6986,0,0,0,33554432,0), +(@guid+22,23118,530,1,1,0,0,2998.57,7043.55,368.539,5.91266,300,0,0,42,0,0,0,33554432,0), +(@guid+23,23119,530,1,1,0,0,2982,7054.94,368.82,4.99766,300,0,0,6986,0,0,0,33554432,0), +(@guid+24,23118,530,1,1,0,0,2982,7054.94,368.82,4.99766,300,0,0,42,0,0,0,33554432,0), +(@guid+25,23076,530,1,1,0,0,2982.59,6886.5,370.082,0.831123,300,0,0,22140,0,0,0,0,0), +(@guid+26,23118,530,1,1,0,0,2978.74,6889.12,371.288,0.897875,300,0,0,42,0,0,0,33554432,0), +(@guid+27,23119,530,1,1,0,0,2978.74,6889.12,371.288,0.897875,300,0,0,6986,0,0,0,33554432,0), +(@guid+28,23118,530,1,1,0,0,2941.56,6827.17,367.3,4.54054,300,0,0,42,0,0,0,33554432,0), +(@guid+29,23119,530,1,1,0,0,2941.56,6827.17,367.3,4.54054,300,0,0,6986,0,0,0,33554432,0), +(@guid+30,23076,530,1,1,0,0,2938.19,6818.01,366.959,3.31926,300,0,0,21543,0,0,0,0,0), +(@guid+31,23076,530,1,1,0,0,2946.3,6875.71,370.04,3.2148,300,0,0,22140,0,0,0,0,0), +(@guid+32,23118,530,1,1,0,0,2953.55,6859.3,369.954,6.14433,300,0,0,42,0,0,0,33554432,0), +(@guid+33,23119,530,1,1,0,0,2953.55,6859.3,369.954,6.14433,300,0,0,6986,0,0,0,33554432,0), +(@guid+34,23119,530,1,1,0,0,3023.13,6799.74,374.46,1.58666,300,0,0,6986,0,0,0,33554432,0), +(@guid+35,23118,530,1,1,0,0,3023.13,6799.74,374.46,1.58666,300,0,0,42,0,0,0,33554432,0), +(@guid+36,23076,530,1,1,0,0,3028.22,6807.09,374.075,5.94641,300,0,0,22140,0,0,0,0,0), +(@guid+37,23118,530,1,1,0,0,3028.3,6824.84,373.591,5.0275,300,0,0,42,0,0,0,33554432,0), +(@guid+38,23119,530,1,1,0,0,3028.3,6824.84,373.591,5.0275,300,0,0,6986,0,0,0,33554432,0), +(@guid+39,23119,530,1,1,0,0,3022.15,6859.05,369.546,3.44885,300,0,0,6986,0,0,0,33554432,0), +(@guid+40,23118,530,1,1,0,0,3022.15,6859.05,369.546,3.44885,300,0,0,42,0,0,0,33554432,0), +(@guid+41,23076,530,1,1,0,0,3022.21,6864.61,369.93,0.100696,300,0,0,22140,0,0,0,0,0), +(@guid+42,23118,530,1,1,0,0,3016.28,6876.11,370.188,3.47791,300,0,0,42,0,0,0,33554432,0), +(@guid+43,23119,530,1,1,0,0,3016.28,6876.11,370.188,3.47791,300,0,0,6986,0,0,0,33554432,0), +(@guid+44,23076,530,1,1,0,0,2816.74,7057.61,369.779,1.4555,300,0,0,21543,0,0,0,0,0); \ No newline at end of file diff --git a/sql/updates/world/2012_09_13_00_world_spell_script_name.sql b/sql/updates/world/2012_09_13_00_world_spell_script_name.sql new file mode 100644 index 00000000000..e987a1a30a0 --- /dev/null +++ b/sql/updates/world/2012_09_13_00_world_spell_script_name.sql @@ -0,0 +1,4 @@ +-- Add spell script name for Knockdown Fel Cannon: Choose Loc +DELETE FROM `spell_script_names` WHERE `spell_id`=40056; +INSERT INTO `spell_script_names` VALUES +(40056,'spell_q11010_q11102_q11023_choose_loc'); \ No newline at end of file diff --git a/sql/updates/world/2012_09_13_01_world_spell_script_name.sql b/sql/updates/world/2012_09_13_01_world_spell_script_name.sql new file mode 100644 index 00000000000..0a6074716a6 --- /dev/null +++ b/sql/updates/world/2012_09_13_01_world_spell_script_name.sql @@ -0,0 +1,4 @@ +-- Add spell script name for Knockdown Fel Cannon: The Aggro Check +DELETE FROM `spell_script_names` WHERE `spell_id`=40112; +INSERT INTO `spell_script_names` VALUES +(40112,'spell_q11010_q11102_q11023_aggro_check'); \ No newline at end of file diff --git a/sql/updates/world/2012_09_13_02_world_spell_script_name.sql b/sql/updates/world/2012_09_13_02_world_spell_script_name.sql new file mode 100644 index 00000000000..a9ac55b8ac4 --- /dev/null +++ b/sql/updates/world/2012_09_13_02_world_spell_script_name.sql @@ -0,0 +1,4 @@ +-- Add spell script name for Knockdown Fel Cannon: The Aggro Burst +DELETE FROM `spell_script_names` WHERE `spell_id`=40119; +INSERT INTO `spell_script_names` VALUES +(40119,'spell_q11010_q11102_q11023_aggro_burst'); \ No newline at end of file diff --git a/sql/updates/world/2012_09_13_03_world_spell_script_name.sql b/sql/updates/world/2012_09_13_03_world_spell_script_name.sql new file mode 100644 index 00000000000..ea55a199f4c --- /dev/null +++ b/sql/updates/world/2012_09_13_03_world_spell_script_name.sql @@ -0,0 +1,4 @@ +-- Add spell script name for Knockdown Fel Cannon: The Aggro Check Aura +DELETE FROM `spell_script_names` WHERE `spell_id`=40113; +INSERT INTO `spell_script_names` VALUES +(40113,'spell_q11010_q11102_q11023_aggro_check_aura'); \ No newline at end of file diff --git a/sql/updates/world/2012_09_13_04_world_spell_script_name.sql b/sql/updates/world/2012_09_13_04_world_spell_script_name.sql new file mode 100644 index 00000000000..0a0cf3f610b --- /dev/null +++ b/sql/updates/world/2012_09_13_04_world_spell_script_name.sql @@ -0,0 +1,4 @@ +-- Add spell script name for Trhow Bomb +DELETE FROM `spell_script_names` WHERE `spell_id`=40160; +INSERT INTO `spell_script_names` VALUES +(40160,'spell_q11010_q11102_q11023_throw_bomb'); \ No newline at end of file diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 1141517bfe8..0531549cbd3 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -1020,7 +1020,7 @@ bool SpellInfo::IsPassiveStackableWithRanks() const bool SpellInfo::IsMultiSlotAura() const { - return IsPassive() || Id == 44413; + return IsPassive() || Id == 40075 || Id == 44413; // No other way to make 40075 have more than 1 copy of aura } bool SpellInfo::IsDeathPersistent() const diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index cbf45910495..a0b1f54b2a0 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -25,6 +25,7 @@ #include "ScriptedCreature.h" #include "SpellScript.h" #include "Vehicle.h" +#include "GridNotifiers.h" class spell_generic_quest_update_entry_SpellScript : public SpellScript { @@ -1314,6 +1315,180 @@ class spell_q12372_destabilize_azure_dragonshrine_dummy : public SpellScriptLoad } }; +// http://www.wowhead.com/quest=11010 "Bombing Run", http://www.wowhead.com/quest=11102 "Bombing Run" /druid/ and http://www.wowhead.com/quest=11023 "Bomb Them Again!" +enum Quest11010_11102_11023Data +{ + // Spell + SPELL_FLAK_CANNON_TRIGGER = 40110, + SPELL_CHOOSE_LOC = 40056, + SPELL_AGGRO_CHECK = 40112, + // NPCs + NPC_FEL_CANNON2 = 23082 +}; + +// 40113 Knockdown Fel Cannon: The Aggro Check Aura +class spell_q11010_q11102_q11023_aggro_check_aura : public SpellScriptLoader +{ + public: + spell_q11010_q11102_q11023_aggro_check_aura() : SpellScriptLoader("spell_q11010_q11102_q11023_aggro_check_aura") { } + + class spell_q11010_q11102_q11023_aggro_check_aura_AuraScript : public AuraScript + { + PrepareAuraScript(spell_q11010_q11102_q11023_aggro_check_aura_AuraScript); + + void HandleTriggerSpell(AuraEffect const* /*aurEff*/) + { + if (Unit* target = GetTarget()) + { + // On trigger proccing + target->CastSpell(target, SPELL_AGGRO_CHECK); + } + } + + void Register() + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_q11010_q11102_q11023_aggro_check_aura_AuraScript::HandleTriggerSpell, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const + { + return new spell_q11010_q11102_q11023_aggro_check_aura_AuraScript(); + } +}; + +// 40112 Knockdown Fel Cannon: The Aggro Check +class spell_q11010_q11102_q11023_aggro_check : public SpellScriptLoader +{ + public: + spell_q11010_q11102_q11023_aggro_check() : SpellScriptLoader("spell_q11010_q11102_q11023_aggro_check") { } + + class spell_q11010_q11102_q11023_aggro_check_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q11010_q11102_q11023_aggro_check_SpellScript); + + void HandleDummy(SpellEffIndex /*effIndex*/) + { + if (Player* playerTarget = GetHitPlayer()) + // Check if found player target is on fly mount or using flying form + if (playerTarget->HasAuraType(SPELL_AURA_FLY) || playerTarget->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED)) + { + playerTarget->CastSpell(playerTarget, SPELL_FLAK_CANNON_TRIGGER, TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE); + } + } + + void Register() + { + OnEffectHitTarget += SpellEffectFn(spell_q11010_q11102_q11023_aggro_check_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_q11010_q11102_q11023_aggro_check_SpellScript(); + } +}; + +// 40119 Knockdown Fel Cannon: The Aggro Burst +class spell_q11010_q11102_q11023_aggro_burst : public SpellScriptLoader +{ + public: + spell_q11010_q11102_q11023_aggro_burst() : SpellScriptLoader("spell_q11010_q11102_q11023_aggro_burst") { } + + class spell_q11010_q11102_q11023_aggro_burst_AuraScript : public AuraScript + { + PrepareAuraScript(spell_q11010_q11102_q11023_aggro_burst_AuraScript); + + void HandleEffectPeriodic(AuraEffect const* /*aurEff*/) + { + if (Unit* target = GetTarget()) + { + // On each tick cast Choose Loc to trigger summon + target->CastSpell(target, SPELL_CHOOSE_LOC); + } + } + + void Register() + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_q11010_q11102_q11023_aggro_burst_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); + } + }; + + AuraScript* GetAuraScript() const + { + return new spell_q11010_q11102_q11023_aggro_burst_AuraScript(); + } +}; + +// 40056 Knockdown Fel Cannon: Choose Loc +class spell_q11010_q11102_q11023_choose_loc : public SpellScriptLoader +{ + public: + spell_q11010_q11102_q11023_choose_loc() : SpellScriptLoader("spell_q11010_q11102_q11023_choose_loc") { } + + class spell_q11010_q11102_q11023_choose_loc_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q11010_q11102_q11023_choose_loc_SpellScript); + + void HandleDummy(SpellEffIndex /*effIndex*/) + { + Unit* caster = GetCaster(); + // Check for player that is in 65 y range + std::list PlayerList; + Trinity::AnyPlayerInObjectRangeCheck checker(caster, 765.0f); + Trinity::PlayerListSearcher searcher(caster, PlayerList, checker); + caster->VisitNearbyWorldObject(65.0f, searcher); + for (std::list::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr) + // Check if found player target is on fly mount or using flying form + if ((*itr)->HasAuraType(SPELL_AURA_FLY) || (*itr)->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED)) + { + // Summom Fel Cannon (bunny version) at found player + caster->SummonCreature(NPC_FEL_CANNON2, (*itr)->GetPositionX(), (*itr)->GetPositionY(), (*itr)->GetPositionZ()); + } + } + + void Register() + { + OnEffectHit += SpellEffectFn(spell_q11010_q11102_q11023_choose_loc_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_q11010_q11102_q11023_choose_loc_SpellScript(); + } +}; + +class spell_q11010_q11102_q11023_throw_bomb : public SpellScriptLoader +{ + public: + spell_q11010_q11102_q11023_throw_bomb() : SpellScriptLoader("spell_q11010_q11102_q11023_throw_bomb") { } + + class spell_q11010_q11102_q11023_throw_bomb_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q11010_q11102_q11023_throw_bomb_SpellScript); + + SpellCastResult CheckRequirement() + { + Unit* caster = GetCaster(); + // This spell will be casted only if caster has one of these auras + if (!(caster->HasAuraType(SPELL_AURA_FLY) || caster->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED))) + return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW; + return SPELL_CAST_OK; + } + + void Register() + { + OnCheckCast += SpellCheckCastFn(spell_q11010_q11102_q11023_throw_bomb_SpellScript::CheckRequirement); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_q11010_q11102_q11023_throw_bomb_SpellScript(); + } +}; + void AddSC_quest_spell_scripts() { new spell_q55_sacred_cleansing(); @@ -1345,4 +1520,9 @@ void AddSC_quest_spell_scripts() new spell_q12735_song_of_cleansing(); new spell_q12372_cast_from_gossip_trigger(); new spell_q12372_destabilize_azure_dragonshrine_dummy(); -} + new spell_q11010_q11102_q11023_aggro_check_aura(); + new spell_q11010_q11102_q11023_aggro_check(); + new spell_q11010_q11102_q11023_aggro_burst(); + new spell_q11010_q11102_q11023_choose_loc(); + new spell_q11010_q11102_q11023_throw_bomb(); +} \ No newline at end of file -- cgit v1.2.3 From f106273cfa626ec8ffb97921483c12b51f6cd9eb Mon Sep 17 00:00:00 2001 From: thesensei Date: Thu, 13 Sep 2012 15:41:16 +0300 Subject: Scripts/Skettis: Fires Over Skettis quest support * Include SAI/Spawn and spell support, also achievement support for "Bombs Away" Credits: Based on Warpten script and Nelegalno/shlomi1515 updates Signed-off-by: Nay --- .../world/2012_09_13_00_fires_over_skettis.sql | 93 ++++++++++++++++++++++ .../2012_09_13_05_world_spell_script_name.sql | 4 + src/server/scripts/Spells/spell_quest.cpp | 33 ++++++++ 3 files changed, 130 insertions(+) create mode 100644 sql/updates/world/2012_09_13_00_fires_over_skettis.sql create mode 100644 sql/updates/world/2012_09_13_05_world_spell_script_name.sql (limited to 'src') diff --git a/sql/updates/world/2012_09_13_00_fires_over_skettis.sql b/sql/updates/world/2012_09_13_00_fires_over_skettis.sql new file mode 100644 index 00000000000..538cda81fad --- /dev/null +++ b/sql/updates/world/2012_09_13_00_fires_over_skettis.sql @@ -0,0 +1,93 @@ +-- Add support for quest ID: 11008 - "Fires Over Skettis" based on Warpten fix and Nelegalno/shlomi1515 updates +-- Also add support for achievement - http://www.wowhead.com/achievement=1275/bombs-away +SET @TRIGGER := 22991; +SET @Script := 2299100; +SET @EGG := 185549; +SET @SKYBLAST := 39844; +SET @SUMMEGG := 39843; +-- Adds SAI support for Monstrous Kaliri Egg Trigger and the GO +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@TRIGGER; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@TRIGGER AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@Script 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 +(@TRIGGER,0,0,0,25,0,100,0,0,0,0,0,11,@SUMMEGG,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - On spawn/reset - Summon Monstrous Kaliri Egg (object wild)'), +(@TRIGGER,0,1,2,8,0,100,0,@SKYBLAST,0,0,0,33,@TRIGGER,0,0,0,0,0,16,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - On Skyguard Blasting Charge hit - Give kill credit to invoker party'), +(@TRIGGER,0,2,3,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,20,@EGG,1,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - Linked with previous event - Despawn'), +(@TRIGGER,0,3,0,61,0,100,0,0,0,0,0,80,@Script,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - Linked with previous event - Start script 0'), +-- Script 0 +(@Script,9,0,0,0,0,100,0,44000,44000,0,0,11,@SUMMEGG,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger /On actionlist/ - Action 0 - Cast Summon Monstrous Kaliri Egg'); +-- Add SAI for Cannonball Stack +UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@EGG; +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=@EGG; +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 +(@EGG,1,0,0,38,0,100,0,0,1,0,0,70,45,0,0,0,0,0,1,0,0,0,0,0,0,0,' Monstrous Kaliri Egg - On data set 0 1 - Respawn object /make it reappear after 45 secs/'); +-- Remove achievement from disabled +DELETE FROM `disables` WHERE `sourceType`=4 AND `entry`=3922; +-- Insert GO spawns taken directly from already spawned triggers coordinates = no need to sniff them +SET @guid := 164249; -- this is taken from clean trinity next free slot at 13.09.2012 +DELETE FROM `gameobject` WHERE `id`=@EGG; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`) VALUES +(@guid+0,@EGG,530,1,1,-3857.69,3426.25,363.733,-0.087267,180), +(@guid+1,@EGG,530,1,1,-3845.16,3332.2,338.59,2.9147,180), +(@guid+2,@EGG,530,1,1,-3965.16,3232.7,347.552,-0.122173,180), +(@guid+3,@EGG,530,1,1,-3955.86,3222.16,347.503,0.244346,180), +(@guid+4,@EGG,530,1,1,-3953.3,3227.94,347.564,-0.244346,180), +(@guid+5,@EGG,530,1,1,-4044.66,3287.29,348.362,0.349066,180), +(@guid+6,@EGG,530,1,1,-4041.39,3271,346.642,-2.09439,180), +(@guid+7,@EGG,530,1,1,-4049.31,3285.9,348.335,1.43117,180), +(@guid+8,@EGG,530,1,1,-4076.99,3415.22,334.008,-2.33874,180), +(@guid+9,@EGG,530,1,1,-4076.79,3412.91,334.617,-1.0821,180), +(@guid+10,@EGG,530,1,1,-4077.92,3412.57,334.768,-0.733038,180), +(@guid+11,@EGG,530,1,1,-4107.93,3121.5,357.427,1.01229,180), +(@guid+12,@EGG,530,1,1,-4108.31,3123.66,357.633,-0.680679,180), +(@guid+13,@EGG,530,1,1,-4110.19,3122.64,358.083,-0.034907,180), +(@guid+14,@EGG,530,1,1,-3996.89,3142.12,372.729,3.05433,180), +(@guid+15,@EGG,530,1,1,-4109.06,3019.1,352.24,0.261799,180), +(@guid+16,@EGG,530,1,1,-4018.35,3076.7,375.29,-0.733038,180), +(@guid+17,@EGG,530,1,1,-4184.98,3044.71,352.394,1.81514,180), +(@guid+18,@EGG,530,1,1,-4187.52,3040.39,352.071,-0.017453,180), +(@guid+19,@EGG,530,1,1,-4189.67,3039.9,352.247,-0.785398,180), +(@guid+20,@EGG,530,1,1,-4192.61,3045.1,352.096,3.14159,180), +(@guid+21,@EGG,530,1,1,-4192.02,3046.91,352.297,2.46091,180), +(@guid+22,@EGG,530,1,1,-4186.47,3047.19,352.316,2.60054,180), +(@guid+23,@EGG,530,1,1,-3915.67,2983.4,396.957,-1.91986,180), +(@guid+24,@EGG,530,1,1,-3883.21,3004.11,399.738,-1.64061,180), +(@guid+25,@EGG,530,1,1,-3883.26,3001.55,399.431,-2.3911,180), +(@guid+26,@EGG,530,1,1,-3884.29,3003.3,400.063,-1.88496,180), +(@guid+27,@EGG,530,1,1,-3903.02,3095.85,383.783,-2.28638,180), +(@guid+28,@EGG,530,1,1,-3898.45,3093.06,383.667,2.53073,180), +(@guid+29,@EGG,530,1,1,-3900.75,3100.75,383.795,-0.436333,180), +(@guid+30,@EGG,530,1,1,-4107.81,3023.42,352.142,1.06465,180), +(@guid+31,@EGG,530,1,1,-4113.58,3022.4,352.157,-0.645772,180), +(@guid+32,@EGG,530,1,1,-3893.09,3677.17,374.516,-1.23918,180), +(@guid+33,@EGG,530,1,1,-3892.47,3674,374.478,-2.14675,180), +(@guid+34,@EGG,530,1,1,-4198.53,3168.91,355.847,-0.383972,180), +(@guid+35,@EGG,530,1,1,-4197.01,3170.04,356.117,-1.15192,180), +(@guid+36,@EGG,530,1,1,-4196.54,3167.69,356.348,-0.541052,180), +(@guid+37,@EGG,530,1,1,-4020.07,3077.84,374.391,1.53589,180), +(@guid+38,@EGG,530,1,1,-4019.32,3079.74,375.109,-1.25664,180), +(@guid+39,@EGG,530,1,1,-3917.21,2981.62,396.483,0.733038,180), +(@guid+40,@EGG,530,1,1,-3918.45,2982.44,397.24,-1.72788,180), +(@guid+41,@EGG,530,1,1,-3839.35,3344.85,337.834,2.75762,180), +(@guid+42,@EGG,530,1,1,-3835.3,3344.77,338.155,-0.767945,180), +(@guid+43,@EGG,530,1,1,-3846.43,3430.29,363.729,0.488692,180), +(@guid+44,@EGG,530,1,1,-3864.13,3439.06,363.679,-0.05236,180), +(@guid+45,@EGG,530,1,1,-3863.24,3440.42,363.655,0.349066,180), +(@guid+46,@EGG,530,1,1,-3846.35,3439.34,363.628,-0.122173,180), +(@guid+47,@EGG,530,1,1,-3847.32,3441.39,363.648,0.453786,180), +(@guid+48,@EGG,530,1,1,-3686.21,3301,320.513,0.837758,180), +(@guid+49,@EGG,530,1,1,-3687.77,3299.85,320.307,2.75762,180), +(@guid+50,@EGG,530,1,1,-3692.64,3302.07,320.396,-0.226893,180), +(@guid+51,@EGG,530,1,1,-3661.91,3379.15,320.377,0.890118,180), +(@guid+52,@EGG,530,1,1,-3660.65,3381.9,320.182,1.18682,180), +(@guid+53,@EGG,530,1,1,-3665.48,3380.11,320.365,-0.471239,180), +(@guid+54,@EGG,530,1,1,-3685.07,3305.97,320.198,-2.87979,180), +(@guid+55,@EGG,530,1,1,-3688.3,3308.93,320.337,1.65806,180), +(@guid+56,@EGG,530,1,1,-3690.65,3306.77,320.43,-2.79253,180), +(@guid+57,@EGG,530,1,1,-3879.37,3665.22,374.393,-2.30383,180), +(@guid+58,@EGG,530,1,1,-3990.42,3139.13,372.878,-2.61799,180), +(@guid+59,@EGG,530,1,1,-3991.59,3134.33,372.703,-0.017453,180), +(@guid+60,@EGG,530,1,1,-3884.89,3684.98,374.492,-2.53073,180), +(@guid+61,@EGG,530,1,1,-3800.8,3789.62,314,6.0912,180), +(@guid+62,@EGG,530,1,1,-3799.02,3788.06,314.158,3.19395,180), +(@guid+63,@EGG,530,1,1,-3798.91,3790.61,313.852,3.63029,180); \ No newline at end of file diff --git a/sql/updates/world/2012_09_13_05_world_spell_script_name.sql b/sql/updates/world/2012_09_13_05_world_spell_script_name.sql new file mode 100644 index 00000000000..1d2d73eccdd --- /dev/null +++ b/sql/updates/world/2012_09_13_05_world_spell_script_name.sql @@ -0,0 +1,4 @@ +-- Add spell script name for Skyguard Blasting Charge +DELETE FROM `spell_script_names` WHERE `spell_id`=39844; +INSERT INTO `spell_script_names` VALUES +(39844,'spell_q11008_blasting_charge'); \ No newline at end of file diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index a0b1f54b2a0..1ab1cd05771 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -1489,6 +1489,38 @@ class spell_q11010_q11102_q11023_throw_bomb : public SpellScriptLoader } }; +// http://www.wowhead.com/quest=11008 "Fires Over Skettis" +// 39844 - Skyguard Blasting Charge +class spell_q11008_blasting_charge : public SpellScriptLoader +{ + public: + spell_q11008_blasting_charge() : SpellScriptLoader("spell_q11008_blasting_charge") { } + + class spell_q11008_blasting_charge_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q11008_blasting_charge_SpellScript); + + SpellCastResult CheckRequirement() + { + Unit* caster = GetCaster(); + // This spell will be casted only if caster has one of these auras + if (!(caster->HasAuraType(SPELL_AURA_FLY) || caster->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED))) + return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW; + return SPELL_CAST_OK; + } + + void Register() + { + OnCheckCast += SpellCheckCastFn(spell_q11008_blasting_charge_SpellScript::CheckRequirement); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_q11008_blasting_charge_SpellScript(); + } +}; + void AddSC_quest_spell_scripts() { new spell_q55_sacred_cleansing(); @@ -1525,4 +1557,5 @@ void AddSC_quest_spell_scripts() new spell_q11010_q11102_q11023_aggro_burst(); new spell_q11010_q11102_q11023_choose_loc(); new spell_q11010_q11102_q11023_throw_bomb(); + new spell_q11008_blasting_charge(); } \ No newline at end of file -- cgit v1.2.3 From b34d6f5784ef72df4d38df380053059ff0b35ffe Mon Sep 17 00:00:00 2001 From: Nay Date: Thu, 13 Sep 2012 15:01:19 +0100 Subject: DB&Scripts: Corrections to pull request #7750 Closes ##7750 --- .../world/2012_09_13_00_fires_over_skettis.sql | 93 ------------ sql/updates/world/2012_09_13_00_world_ogrila.sql | 160 --------------------- .../2012_09_13_00_world_spell_script_name.sql | 4 - .../2012_09_13_01_world_fires_over_skettis.sql | 91 ++++++++++++ sql/updates/world/2012_09_13_01_world_ogrila.sql | 158 ++++++++++++++++++++ .../2012_09_13_01_world_spell_script_name.sql | 14 +- .../2012_09_13_02_world_spell_script_name.sql | 4 - .../2012_09_13_03_world_spell_script_name.sql | 4 - .../2012_09_13_04_world_spell_script_name.sql | 4 - .../2012_09_13_05_world_spell_script_name.sql | 4 - src/server/scripts/Spells/spell_quest.cpp | 75 +++------- 11 files changed, 279 insertions(+), 332 deletions(-) delete mode 100644 sql/updates/world/2012_09_13_00_fires_over_skettis.sql delete mode 100644 sql/updates/world/2012_09_13_00_world_ogrila.sql delete mode 100644 sql/updates/world/2012_09_13_00_world_spell_script_name.sql create mode 100644 sql/updates/world/2012_09_13_01_world_fires_over_skettis.sql create mode 100644 sql/updates/world/2012_09_13_01_world_ogrila.sql delete mode 100644 sql/updates/world/2012_09_13_02_world_spell_script_name.sql delete mode 100644 sql/updates/world/2012_09_13_03_world_spell_script_name.sql delete mode 100644 sql/updates/world/2012_09_13_04_world_spell_script_name.sql delete mode 100644 sql/updates/world/2012_09_13_05_world_spell_script_name.sql (limited to 'src') diff --git a/sql/updates/world/2012_09_13_00_fires_over_skettis.sql b/sql/updates/world/2012_09_13_00_fires_over_skettis.sql deleted file mode 100644 index 538cda81fad..00000000000 --- a/sql/updates/world/2012_09_13_00_fires_over_skettis.sql +++ /dev/null @@ -1,93 +0,0 @@ --- Add support for quest ID: 11008 - "Fires Over Skettis" based on Warpten fix and Nelegalno/shlomi1515 updates --- Also add support for achievement - http://www.wowhead.com/achievement=1275/bombs-away -SET @TRIGGER := 22991; -SET @Script := 2299100; -SET @EGG := 185549; -SET @SKYBLAST := 39844; -SET @SUMMEGG := 39843; --- Adds SAI support for Monstrous Kaliri Egg Trigger and the GO -UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@TRIGGER; -DELETE FROM `smart_scripts` WHERE `entryorguid`=@TRIGGER AND `source_type`=0; -DELETE FROM `smart_scripts` WHERE `entryorguid`=@Script 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 -(@TRIGGER,0,0,0,25,0,100,0,0,0,0,0,11,@SUMMEGG,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - On spawn/reset - Summon Monstrous Kaliri Egg (object wild)'), -(@TRIGGER,0,1,2,8,0,100,0,@SKYBLAST,0,0,0,33,@TRIGGER,0,0,0,0,0,16,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - On Skyguard Blasting Charge hit - Give kill credit to invoker party'), -(@TRIGGER,0,2,3,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,20,@EGG,1,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - Linked with previous event - Despawn'), -(@TRIGGER,0,3,0,61,0,100,0,0,0,0,0,80,@Script,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - Linked with previous event - Start script 0'), --- Script 0 -(@Script,9,0,0,0,0,100,0,44000,44000,0,0,11,@SUMMEGG,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger /On actionlist/ - Action 0 - Cast Summon Monstrous Kaliri Egg'); --- Add SAI for Cannonball Stack -UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@EGG; -DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=@EGG; -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 -(@EGG,1,0,0,38,0,100,0,0,1,0,0,70,45,0,0,0,0,0,1,0,0,0,0,0,0,0,' Monstrous Kaliri Egg - On data set 0 1 - Respawn object /make it reappear after 45 secs/'); --- Remove achievement from disabled -DELETE FROM `disables` WHERE `sourceType`=4 AND `entry`=3922; --- Insert GO spawns taken directly from already spawned triggers coordinates = no need to sniff them -SET @guid := 164249; -- this is taken from clean trinity next free slot at 13.09.2012 -DELETE FROM `gameobject` WHERE `id`=@EGG; -INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`) VALUES -(@guid+0,@EGG,530,1,1,-3857.69,3426.25,363.733,-0.087267,180), -(@guid+1,@EGG,530,1,1,-3845.16,3332.2,338.59,2.9147,180), -(@guid+2,@EGG,530,1,1,-3965.16,3232.7,347.552,-0.122173,180), -(@guid+3,@EGG,530,1,1,-3955.86,3222.16,347.503,0.244346,180), -(@guid+4,@EGG,530,1,1,-3953.3,3227.94,347.564,-0.244346,180), -(@guid+5,@EGG,530,1,1,-4044.66,3287.29,348.362,0.349066,180), -(@guid+6,@EGG,530,1,1,-4041.39,3271,346.642,-2.09439,180), -(@guid+7,@EGG,530,1,1,-4049.31,3285.9,348.335,1.43117,180), -(@guid+8,@EGG,530,1,1,-4076.99,3415.22,334.008,-2.33874,180), -(@guid+9,@EGG,530,1,1,-4076.79,3412.91,334.617,-1.0821,180), -(@guid+10,@EGG,530,1,1,-4077.92,3412.57,334.768,-0.733038,180), -(@guid+11,@EGG,530,1,1,-4107.93,3121.5,357.427,1.01229,180), -(@guid+12,@EGG,530,1,1,-4108.31,3123.66,357.633,-0.680679,180), -(@guid+13,@EGG,530,1,1,-4110.19,3122.64,358.083,-0.034907,180), -(@guid+14,@EGG,530,1,1,-3996.89,3142.12,372.729,3.05433,180), -(@guid+15,@EGG,530,1,1,-4109.06,3019.1,352.24,0.261799,180), -(@guid+16,@EGG,530,1,1,-4018.35,3076.7,375.29,-0.733038,180), -(@guid+17,@EGG,530,1,1,-4184.98,3044.71,352.394,1.81514,180), -(@guid+18,@EGG,530,1,1,-4187.52,3040.39,352.071,-0.017453,180), -(@guid+19,@EGG,530,1,1,-4189.67,3039.9,352.247,-0.785398,180), -(@guid+20,@EGG,530,1,1,-4192.61,3045.1,352.096,3.14159,180), -(@guid+21,@EGG,530,1,1,-4192.02,3046.91,352.297,2.46091,180), -(@guid+22,@EGG,530,1,1,-4186.47,3047.19,352.316,2.60054,180), -(@guid+23,@EGG,530,1,1,-3915.67,2983.4,396.957,-1.91986,180), -(@guid+24,@EGG,530,1,1,-3883.21,3004.11,399.738,-1.64061,180), -(@guid+25,@EGG,530,1,1,-3883.26,3001.55,399.431,-2.3911,180), -(@guid+26,@EGG,530,1,1,-3884.29,3003.3,400.063,-1.88496,180), -(@guid+27,@EGG,530,1,1,-3903.02,3095.85,383.783,-2.28638,180), -(@guid+28,@EGG,530,1,1,-3898.45,3093.06,383.667,2.53073,180), -(@guid+29,@EGG,530,1,1,-3900.75,3100.75,383.795,-0.436333,180), -(@guid+30,@EGG,530,1,1,-4107.81,3023.42,352.142,1.06465,180), -(@guid+31,@EGG,530,1,1,-4113.58,3022.4,352.157,-0.645772,180), -(@guid+32,@EGG,530,1,1,-3893.09,3677.17,374.516,-1.23918,180), -(@guid+33,@EGG,530,1,1,-3892.47,3674,374.478,-2.14675,180), -(@guid+34,@EGG,530,1,1,-4198.53,3168.91,355.847,-0.383972,180), -(@guid+35,@EGG,530,1,1,-4197.01,3170.04,356.117,-1.15192,180), -(@guid+36,@EGG,530,1,1,-4196.54,3167.69,356.348,-0.541052,180), -(@guid+37,@EGG,530,1,1,-4020.07,3077.84,374.391,1.53589,180), -(@guid+38,@EGG,530,1,1,-4019.32,3079.74,375.109,-1.25664,180), -(@guid+39,@EGG,530,1,1,-3917.21,2981.62,396.483,0.733038,180), -(@guid+40,@EGG,530,1,1,-3918.45,2982.44,397.24,-1.72788,180), -(@guid+41,@EGG,530,1,1,-3839.35,3344.85,337.834,2.75762,180), -(@guid+42,@EGG,530,1,1,-3835.3,3344.77,338.155,-0.767945,180), -(@guid+43,@EGG,530,1,1,-3846.43,3430.29,363.729,0.488692,180), -(@guid+44,@EGG,530,1,1,-3864.13,3439.06,363.679,-0.05236,180), -(@guid+45,@EGG,530,1,1,-3863.24,3440.42,363.655,0.349066,180), -(@guid+46,@EGG,530,1,1,-3846.35,3439.34,363.628,-0.122173,180), -(@guid+47,@EGG,530,1,1,-3847.32,3441.39,363.648,0.453786,180), -(@guid+48,@EGG,530,1,1,-3686.21,3301,320.513,0.837758,180), -(@guid+49,@EGG,530,1,1,-3687.77,3299.85,320.307,2.75762,180), -(@guid+50,@EGG,530,1,1,-3692.64,3302.07,320.396,-0.226893,180), -(@guid+51,@EGG,530,1,1,-3661.91,3379.15,320.377,0.890118,180), -(@guid+52,@EGG,530,1,1,-3660.65,3381.9,320.182,1.18682,180), -(@guid+53,@EGG,530,1,1,-3665.48,3380.11,320.365,-0.471239,180), -(@guid+54,@EGG,530,1,1,-3685.07,3305.97,320.198,-2.87979,180), -(@guid+55,@EGG,530,1,1,-3688.3,3308.93,320.337,1.65806,180), -(@guid+56,@EGG,530,1,1,-3690.65,3306.77,320.43,-2.79253,180), -(@guid+57,@EGG,530,1,1,-3879.37,3665.22,374.393,-2.30383,180), -(@guid+58,@EGG,530,1,1,-3990.42,3139.13,372.878,-2.61799,180), -(@guid+59,@EGG,530,1,1,-3991.59,3134.33,372.703,-0.017453,180), -(@guid+60,@EGG,530,1,1,-3884.89,3684.98,374.492,-2.53073,180), -(@guid+61,@EGG,530,1,1,-3800.8,3789.62,314,6.0912,180), -(@guid+62,@EGG,530,1,1,-3799.02,3788.06,314.158,3.19395,180), -(@guid+63,@EGG,530,1,1,-3798.91,3790.61,313.852,3.63029,180); \ No newline at end of file diff --git a/sql/updates/world/2012_09_13_00_world_ogrila.sql b/sql/updates/world/2012_09_13_00_world_ogrila.sql deleted file mode 100644 index 763ade3a894..00000000000 --- a/sql/updates/world/2012_09_13_00_world_ogrila.sql +++ /dev/null @@ -1,160 +0,0 @@ --- Quest support for http://www.wowhead.com/quest=11010 "Bombing Run", http://www.wowhead.com/quest=11102 "Bombing Run" /druid/ and http://www.wowhead.com/quest=11023 "Bomb Them Again!" --- Achievement support for http://www.wowhead.com/achievement=1282 and http://www.wowhead.com/achievement=1276, --- Based on Warpten Script -SET @SKYGUARD_BOMB := 32456; -SET @Run_Dummy := 23118; -SET @Script := 2311800; -SET @Explosion_Bunny := 23119; -SET @Flak_Cannon := 23076; -SET @Flak_Cannon2 := 23082; -SET @Fel_Cannon_Dummy := 23077; -SET @RUN_MARK := 40196; -SET @THROW_BOMB := 40160; -SET @EXPLOSION_VISUAL := 40162; -SET @See_Invisibility := 40195; -SET @Invisibility := 40194; -SET @CANNONBALL_STACK := 185861; --- Add class requirements for druid version of "Bombing Run" -UPDATE `quest_template` SET `RequiredClasses`=1024 WHERE `Id`=11102; --- Add SAI support for Bombing Run Target Dummy -UPDATE `creature_template` SET `AIName`='SmartAI',`flags_extra`=`flags_extra`|128 WHERE `entry`=@Run_Dummy; -DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@Run_Dummy; -DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Run_Dummy; -DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script; -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 -(@Run_Dummy,0,0,1,8,0,100,0,@THROW_BOMB,0,1000,1000,33,23118,0,0,0,0,0,16,0,0,0,0,0,0,0, 'Run Target Dummy - On spell Throw Bomb hit - Give kill credit to invoker party'), -(@Run_Dummy,0,1,2,61,0,100,0,0,0,0,0,28,@RUN_MARK,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Run Target Dummy - Linked with previous event - Remove auras from hunter mark'), -(@Run_Dummy,0,2,3,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,20,@CANNONBALL_STACK,3,0,0,0,0,0, 'Run Target Dummy - Linked with previous event - Data set 0 1 on Cannonball Stack'), -(@Run_Dummy,0,3,4,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,19,@Explosion_Bunny,3,0,0,0,0,0, 'Run Target Dummy - Linked with previous event - Data set 0 1 on Explosion Bunny'), -(@Run_Dummy,0,4,0,61,0,100,0,0,0,0,0,80,@Script,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Run Target Dummy - Linked with previous event - Start script 0'), --- Script 0 -(@Script,9,0,0,0,0,100,0,29000,29000,0,0,11,@RUN_MARK,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Run Target Dummy - Action 0 - Cast run mark on self'); --- Add SAI for Cannonball Stack -UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@CANNONBALL_STACK; -DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=@CANNONBALL_STACK; -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 -(@CANNONBALL_STACK,1,0,0,38,0,100,0,0,1,0,0,70,30,0,0,0,0,0,1,0,0,0,0,0,0,0,' Cannonball Stack - On data set 0 1 - Respawn object /make it reappear after 30 secs/'); --- Add SAI support for Bombing Run Fel Cannon Dummy -UPDATE `creature_template` SET `AIName`='SmartAI',`unit_flags`=4,`flags_extra`=`flags_extra`|128 WHERE `entry`=@Fel_Cannon_Dummy; -DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Fel_Cannon_Dummy; -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 -(@Fel_Cannon_Dummy,0,0,0,8,0,100,0,40110,0,4350,5000,11,40119,0,0,0,0,0,19,@Flak_Cannon,5,0,0,0,0,0, 'Fel Cannon Dummy - On spell hit by Cannon trigger - Cast Aggro Burst on Flak Cannon'); --- Add SAI support for Bombing Run Flak Cannon -UPDATE `creature_template` SET `AIName`='SmartAI',`unit_flags`=`unit_flags`|4|256|131072,`flags_extra`=`flags_extra`|2 WHERE `entry`=@Flak_Cannon; -DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Flak_Cannon; -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 -(@Flak_Cannon,0,0,0,25,0,100,0,0,0,0,0,11,40111,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Flak Cannon - On reset - Cast The Aggro Bunnies'), -(@Flak_Cannon,0,1,2,8,0,100,0,41598,0,0,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Flak Cannon - On hit by Bolt Pair - Set orientation to invoker'), -(@Flak_Cannon,0,2,0,61,0,100,0,0,0,0,0,11,40109,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Flak Cannon - Linked with previous event - Cast spell The Bolt'); --- Add SAI support for Bombing Run Flak Cannon 2 /target bunny/ -UPDATE `creature_template` SET `AIName`='SmartAI',`flags_extra`=`flags_extra`|128,`InhabitType`=4 WHERE `entry`=@Flak_Cannon2; -DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Flak_Cannon2; -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 -(@Flak_Cannon2,0,0,0,54,0,100,0,0,0,0,0,11,41598,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Flak Cannon 2 - On just summoned - Cast The Bolt Pair on invoker'), -(@Flak_Cannon2,0,1,2,8,0,100,0,40109,0,0,0,11,40075,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Flak Cannon 2 - On spell hit Cannon Bolt - Cast on self Fel Flak Fire'), -(@Flak_Cannon2,0,2,0,61,0,100,0,0,0,0,0,41,5000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Flak Cannon 2 - Linked with previous event - Despawn in 5 sec'); --- Add SAI support for Explosion Bunny -UPDATE `creature_template` SET `AIName`='SmartAI',`flags_extra`=`flags_extra`|128,`unit_flags`=0 WHERE `entry`=@Explosion_Bunny; -DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Explosion_Bunny; -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 -(@Explosion_Bunny,0,0,0,38,0,100,0,0,1,0,0,11,@EXPLOSION_VISUAL,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Explosion Bunny - On data set 0 1 - Cast Explosion Visual on self'); --- Add conditions -DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (@THROW_BOMB,40110,40112,40075); -DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry` IN (@THROW_BOMB,40200,41598,40111); -DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=@Fel_Cannon_Dummy; -INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`Comment`) VALUES -(17,0,@THROW_BOMB,0,29,0,@Run_Dummy,35,0,0,0,'Throw Bomb requires Run Target Dummy within 35y'), -(13,1,@THROW_BOMB,0,31,0,3,@Run_Dummy,0,0,0,'Throw Bomb implicit effect 0 can hit only Run Target Dummy'), -(13,1,@THROW_BOMB,0,1,0,@RUN_MARK,0,0,0,0,'Throw Bomb can hit only targets under the aura of 40196'), -(17,0,40200,0,9,0,11010,0,0,1,0,'To cast remove see invisibility player must not be on quest 11010'), -(17,0,40200,0,9,0,11102,0,0,1,0,'To cast remove see invisibility player must not be on quest 11102'), -(17,0,40200,0,9,0,11023,0,0,1,0,'To cast remove see invisibility player must not be on quest 11023'), -(13,1,40110,0,31,0,3,23077,0,0,0,'Cannon Trigger implicit targets can be only Fel Cannon Dummies'), -(13,1,40110,0,35,0,1,65,2,0,0,'Cannon Trigger implicit hit can happen only on targets under 65 yards range'), -(17,0,40111,0,29,0,@Fel_Cannon_Dummy,10,0,1,0,'The Aggro Bunnies caster should not be around Fel Cannon Dummies to cast'), -(13,1,40112,0,31,0,4,0,0,0,0,'Bombing Run Dummy aggro check can hit players'), -(13,3,40075,0,31,0,4,0,0,0,0,'Fel Flak Fire effect 2 can hit only players'), -(22,1,@Fel_Cannon_Dummy,0,1,1,40119,0,0,1,0,'Fel Cannon Dummy event 0 will happen only if target is missing aura from aggro burst'); --- Insert addon data -DELETE FROM `creature_template_addon` WHERE `entry` IN (@Run_Dummy,@Explosion_Bunny,@Fel_Cannon_Dummy); -INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES -(@Run_Dummy,0,0,0,0,'40196 40194 40195'), -- Mark, See Invisibility, Invisibility -(@Explosion_Bunny,0,0,0,0,'40194 40195'), -- See Invisibility, Invisibility -(@Fel_Cannon_Dummy,0,0,0,0,'40113'); -- The Aggro Check Aura --- Remove achievement from disabled -DELETE FROM `disables` WHERE `sourceType`=4 AND `entry`=3923; --- Add missing spell from dbc -DELETE FROM `spell_dbc` WHERE `Id`=40200; -INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`Attributes`,`AttributesEx`,`AttributesEx2`,`AttributesEx3`,`AttributesEx4`,`AttributesEx5`,`AttributesEx6`,`AttributesEx7`,`Stances`,`StancesNot`,`Targets`,`CastingTimeIndex`,`AuraInterruptFlags`,`ProcFlags`,`ProcChance`,`ProcCharges`,`MaxLevel`,`BaseLevel`,`SpellLevel`,`DurationIndex`,`RangeIndex`,`StackAmount`,`EquippedItemClass`,`EquippedItemSubClassMask`,`EquippedItemInventoryTypeMask`,`Effect1`,`Effect2`,`Effect3`,`EffectDieSides1`,`EffectDieSides2`,`EffectDieSides3`,`EffectRealPointsPerLevel1`,`EffectRealPointsPerLevel2`,`EffectRealPointsPerLevel3`,`EffectBasePoints1`,`EffectBasePoints2`,`EffectBasePoints3`,`EffectMechanic1`,`EffectMechanic2`,`EffectMechanic3`,`EffectImplicitTargetA1`,`EffectImplicitTargetA2`,`EffectImplicitTargetA3`,`EffectImplicitTargetB1`,`EffectImplicitTargetB2`,`EffectImplicitTargetB3`,`EffectRadiusIndex1`,`EffectRadiusIndex2`,`EffectRadiusIndex3`,`EffectApplyAuraName1`,`EffectApplyAuraName2`,`EffectApplyAuraName3`,`EffectAmplitude1`,`EffectAmplitude2`,`EffectAmplitude3`,`EffectMultipleValue1`,`EffectMultipleValue2`,`EffectMultipleValue3`,`EffectMiscValue1`,`EffectMiscValue2`,`EffectMiscValue3`,`EffectMiscValueB1`,`EffectMiscValueB2`,`EffectMiscValueB3`,`EffectTriggerSpell1`,`EffectTriggerSpell2`,`EffectTriggerSpell3`,`EffectSpellClassMaskA1`,`EffectSpellClassMaskA2`,`EffectSpellClassMaskA3`,`EffectSpellClassMaskB1`,`EffectSpellClassMaskB2`,`EffectSpellClassMaskB3`,`EffectSpellClassMaskC1`,`EffectSpellClassMaskC2`,`EffectSpellClassMaskC3`,`MaxTargetLevel`,`SpellFamilyName`,`SpellFamilyFlags1`,`SpellFamilyFlags2`,`SpellFamilyFlags3`,`MaxAffectedTargets`,`DmgClass`,`PreventionType`,`DmgMultiplier1`,`DmgMultiplier2`,`DmgMultiplier3`,`AreaGroupId`,`SchoolMask`,`Comment`) VALUES -(40200,0,0,256,0,0,0,0,0,0,0,0,0,0,1,0,0,101,0,0,0,0,26,1,0,-1,0,0,164,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,'Bombing Run: See Invisibility Aura Remover'); --- Spell area - Check to cast remove aura /against see invisibility aura/, if having it and not on quest -DELETE FROM `spell_area` WHERE `spell`=40200; -INSERT INTO `spell_area` (`spell`,`area`,`quest_start`,`quest_start_active`,`quest_end`,`aura_spell`,`racemask`,`gender`,`autocast`) VALUES -(40200,3522,0,0,0,@See_Invisibility,0,2,1); --- Insert cannonballs spawns /based on sniffs/ -SET @guid := 164235; -- Free slot on trinity clean core marked on 12.09.2012 -DELETE FROM `gameobject` WHERE `guid` IN (@guid+0,@guid+1,@guid+2,@guid+3,@guid+4,@guid+5,@guid+6,@guid+7,@guid+8,@guid+9,@guid+10,@guid+11,@guid+12,@guid+13); -INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES -(@guid+0,185861,530,1,1,2825.11,7024.05,369.982,5.69617,0,0,0.289313,-0.957235,300,0,1), -(@guid+1,185861,530,1,1,2938.26,7094.72,369.413,2.78314,0,0,0.983982,0.178267,300,0,1), -(@guid+2,185861,530,1,1,2924.84,7031.46,367.857,4.26205,0,0,0.847134,-0.53138,300,0,1), -(@guid+3,185861,530,1,1,2938.02,7015.59,365.75,3.65778,0,0,0.966879,-0.255237,300,0,1), -(@guid+4,185861,530,1,1,2998.57,7043.55,368.539,5.91266,0,0,0.184206,-0.982888,300,0,1), -(@guid+5,185861,530,1,1,2982,7054.94,368.32,4.99766,0,0,0.599411,-0.800442,300,0,1), -(@guid+6,185861,530,1,1,2978.73,6889.19,369.701,0.689745,0,0,0.338077,0.941119,300,0,1), -(@guid+7,185861,530,1,1,2941.56,6827.17,367.3,4.08109,0,0,0.891683,-0.452661,300,0,1), -(@guid+8,185861,530,1,1,2953.55,6859.3,369.954,6.14433,0,0,0.0693712,-0.997591,300,0,1), -(@guid+9,185861,530,1,1,3023.13,6799.74,374.46,1.58666,0,0,0.712695,0.701474,300,0,1), -(@guid+10,185861,530,1,1,3028.3,6824.84,373.591,5.0275,0,0,0.587401,-0.809296,300,0,1), -(@guid+11,185861,530,1,1,3022.15,6859.05,369.546,3.44885,0,0,0.988222,-0.153025,300,0,1), -(@guid+12,185861,530,1,1,3016.28,6876.11,370.188,3.47791,0,0,0.985895,-0.167365,300,0,1), -(@guid+13,185861,530,1,1,2940.6,7106.65,370.123,0.88561,0,0,0.428475,0.903553,300,0,1); --- Insert spawns for Fel Flak Cannons, Run Target Dummies and Explosion Bunnies /based on sniffs/ -SET @guid := 209183; -- Free slot on trinity clean core marked on 12.09.2012 -DELETE FROM `creature` WHERE `guid` IN (@guid+0,@guid+1,@guid+2,@guid+3,@guid+4,@guid+5,@guid+6,@guid+7,@guid+8,@guid+9,@guid+10,@guid+11,@guid+12,@guid+13,@guid+14,@guid+15,@guid+16,@guid+17,@guid+18,@guid+19,@guid+20,@guid+21,@guid+22,@guid+23,@guid+24,@guid+25,@guid+26,@guid+27,@guid+28,@guid+29,@guid+30,@guid+31,@guid+32,@guid+33,@guid+34,@guid+35,@guid+36,@guid+37,@guid+38,@guid+39,@guid+40,@guid+41,@guid+42,@guid+43,@guid+44); -INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES -(@guid+0,23118,530,1,1,0,0,2764.71,7024.45,370.203,0,300,0,0,42,0,0,0,33554432,0), -(@guid+1,23119,530,1,1,0,0,2764.71,7024.45,370.203,0,300,0,0,6986,0,0,0,33554432,0), -(@guid+2,23118,530,1,1,0,0,2786.61,7036.28,370.686,0,300,0,0,42,0,0,0,33554432,0), -(@guid+3,23119,530,1,1,0,0,2786.61,7036.28,370.686,0,300,0,0,6986,0,0,0,33554432,0), -(@guid+4,23118,530,1,1,0,0,2824.71,7044.79,369.877,0,300,0,0,42,0,0,0,33554432,0), -(@guid+5,23119,530,1,1,0,0,2824.71,7044.79,369.877,0,300,0,0,6986,0,0,0,33554432,0), -(@guid+6,23076,530,1,1,0,0,2775.81,7030.75,370.337,1.85606,300,0,0,22140,0,0,0,0,0), -(@guid+7,23076,530,1,1,0,0,2933.28,7103.93,369.209,2.58129,300,0,0,21543,0,0,0,0,0), -(@guid+8,23119,530,1,1,0,0,2940.82,7107.17,370.115,4.65944,300,0,0,6986,0,0,0,33554432,0), -(@guid+9,23118,530,1,1,0,0,2940.82,7107.17,370.115,4.65944,300,0,0,42,0,0,0,33554432,0), -(@guid+10,23118,530,1,1,0,0,2825.11,7024.05,369.982,5.69617,300,0,0,42,0,0,0,33554432,0), -(@guid+11,23119,530,1,1,0,0,2825.11,7024.05,369.982,5.69617,300,0,0,6986,0,0,0,33554432,0), -(@guid+12,23076,530,1,1,0,0,2834.14,7018.43,368.459,5.42992,300,0,0,21543,0,0,0,0,0), -(@guid+13,23119,530,1,1,0,0,2938.84,7094.48,371.493,0.242375,300,0,0,6986,0,0,0,33554432,0), -(@guid+14,23118,530,1,1,0,0,2938.84,7094.48,371.493,0.242375,300,0,0,42,0,0,0,33554432,0), -(@guid+15,23076,530,1,1,0,0,2925.49,7021.72,367.007,3.59446,300,0,0,22140,0,0,0,0,0), -(@guid+16,23119,530,1,1,0,0,2924.84,7031.46,367.857,4.26205,300,0,0,6986,0,0,0,33554432,0), -(@guid+17,23118,530,1,1,0,0,2924.84,7031.46,367.857,4.26205,300,0,0,42,0,0,0,33554432,0), -(@guid+18,23119,530,1,1,0,0,2938.02,7015.59,366.54,3.65778,300,0,0,6986,0,0,0,33554432,0), -(@guid+19,23118,530,1,1,0,0,2938.02,7015.59,366.54,3.65778,300,0,0,42,0,0,0,33554432,0), -(@guid+20,23076,530,1,1,0,0,2994.48,7039.91,369.42,5.26077,300,0,0,22140,0,0,0,0,0), -(@guid+21,23119,530,1,1,0,0,2998.57,7043.55,368.539,5.91266,300,0,0,6986,0,0,0,33554432,0), -(@guid+22,23118,530,1,1,0,0,2998.57,7043.55,368.539,5.91266,300,0,0,42,0,0,0,33554432,0), -(@guid+23,23119,530,1,1,0,0,2982,7054.94,368.82,4.99766,300,0,0,6986,0,0,0,33554432,0), -(@guid+24,23118,530,1,1,0,0,2982,7054.94,368.82,4.99766,300,0,0,42,0,0,0,33554432,0), -(@guid+25,23076,530,1,1,0,0,2982.59,6886.5,370.082,0.831123,300,0,0,22140,0,0,0,0,0), -(@guid+26,23118,530,1,1,0,0,2978.74,6889.12,371.288,0.897875,300,0,0,42,0,0,0,33554432,0), -(@guid+27,23119,530,1,1,0,0,2978.74,6889.12,371.288,0.897875,300,0,0,6986,0,0,0,33554432,0), -(@guid+28,23118,530,1,1,0,0,2941.56,6827.17,367.3,4.54054,300,0,0,42,0,0,0,33554432,0), -(@guid+29,23119,530,1,1,0,0,2941.56,6827.17,367.3,4.54054,300,0,0,6986,0,0,0,33554432,0), -(@guid+30,23076,530,1,1,0,0,2938.19,6818.01,366.959,3.31926,300,0,0,21543,0,0,0,0,0), -(@guid+31,23076,530,1,1,0,0,2946.3,6875.71,370.04,3.2148,300,0,0,22140,0,0,0,0,0), -(@guid+32,23118,530,1,1,0,0,2953.55,6859.3,369.954,6.14433,300,0,0,42,0,0,0,33554432,0), -(@guid+33,23119,530,1,1,0,0,2953.55,6859.3,369.954,6.14433,300,0,0,6986,0,0,0,33554432,0), -(@guid+34,23119,530,1,1,0,0,3023.13,6799.74,374.46,1.58666,300,0,0,6986,0,0,0,33554432,0), -(@guid+35,23118,530,1,1,0,0,3023.13,6799.74,374.46,1.58666,300,0,0,42,0,0,0,33554432,0), -(@guid+36,23076,530,1,1,0,0,3028.22,6807.09,374.075,5.94641,300,0,0,22140,0,0,0,0,0), -(@guid+37,23118,530,1,1,0,0,3028.3,6824.84,373.591,5.0275,300,0,0,42,0,0,0,33554432,0), -(@guid+38,23119,530,1,1,0,0,3028.3,6824.84,373.591,5.0275,300,0,0,6986,0,0,0,33554432,0), -(@guid+39,23119,530,1,1,0,0,3022.15,6859.05,369.546,3.44885,300,0,0,6986,0,0,0,33554432,0), -(@guid+40,23118,530,1,1,0,0,3022.15,6859.05,369.546,3.44885,300,0,0,42,0,0,0,33554432,0), -(@guid+41,23076,530,1,1,0,0,3022.21,6864.61,369.93,0.100696,300,0,0,22140,0,0,0,0,0), -(@guid+42,23118,530,1,1,0,0,3016.28,6876.11,370.188,3.47791,300,0,0,42,0,0,0,33554432,0), -(@guid+43,23119,530,1,1,0,0,3016.28,6876.11,370.188,3.47791,300,0,0,6986,0,0,0,33554432,0), -(@guid+44,23076,530,1,1,0,0,2816.74,7057.61,369.779,1.4555,300,0,0,21543,0,0,0,0,0); \ No newline at end of file diff --git a/sql/updates/world/2012_09_13_00_world_spell_script_name.sql b/sql/updates/world/2012_09_13_00_world_spell_script_name.sql deleted file mode 100644 index e987a1a30a0..00000000000 --- a/sql/updates/world/2012_09_13_00_world_spell_script_name.sql +++ /dev/null @@ -1,4 +0,0 @@ --- Add spell script name for Knockdown Fel Cannon: Choose Loc -DELETE FROM `spell_script_names` WHERE `spell_id`=40056; -INSERT INTO `spell_script_names` VALUES -(40056,'spell_q11010_q11102_q11023_choose_loc'); \ No newline at end of file diff --git a/sql/updates/world/2012_09_13_01_world_fires_over_skettis.sql b/sql/updates/world/2012_09_13_01_world_fires_over_skettis.sql new file mode 100644 index 00000000000..de9ba5a78fe --- /dev/null +++ b/sql/updates/world/2012_09_13_01_world_fires_over_skettis.sql @@ -0,0 +1,91 @@ +-- Add support for quest ID: 11008 - "Fires Over Skettis" based on Warpten fix and Nelegalno/shlomi1515 updates +-- Also add support for achievement - http://www.wowhead.com/achievement=1275/bombs-away +SET @TRIGGER := 22991; +SET @EGG := 185549; +SET @SKYBLAST := 39844; +SET @SUMMEGG := 39843; +-- Adds SAI support for Monstrous Kaliri Egg Trigger and the GO +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@TRIGGER; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@TRIGGER AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@TRIGGER*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 +(@TRIGGER,0,0,0,25,0,100,0,0,0,0,0,11,@SUMMEGG,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - On spawn/reset - Summon Monstrous Kaliri Egg (object wild)'), +(@TRIGGER,0,1,2,8,0,100,0,@SKYBLAST,0,0,0,33,@TRIGGER,0,0,0,0,0,16,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - On Skyguard Blasting Charge hit - Give kill credit to invoker party'), +(@TRIGGER,0,2,3,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,20,@EGG,1,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - Linked with previous event - Despawn'), +(@TRIGGER,0,3,0,61,0,100,0,0,0,0,0,80,@TRIGGER*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - Linked with previous event - Start script 0'), +(@TRIGGER*100,9,0,0,0,0,100,0,44000,44000,0,0,11,@SUMMEGG,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger /On actionlist/ - Action 0 - Cast Summon Monstrous Kaliri Egg'); +-- Add SAI for Cannonball Stack +UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@EGG; +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=@EGG; +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 +(@EGG,1,0,0,38,0,100,0,0,1,0,0,70,45,0,0,0,0,0,1,0,0,0,0,0,0,0,' Monstrous Kaliri Egg - On data set 0 1 - Respawn object /make it reappear after 45 secs/'); +-- Remove achievement from disabled +DELETE FROM `disables` WHERE `sourceType`=4 AND `entry`=3922; +-- Insert GO spawns taken directly from already spawned triggers coordinates = no need to sniff them +SET @guid := 74685; +DELETE FROM `gameobject` WHERE `id`=@EGG; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`) VALUES +(@guid+0,@EGG,530,1,1,-3857.69,3426.25,363.733,-0.087267,180), +(@guid+1,@EGG,530,1,1,-3845.16,3332.2,338.59,2.9147,180), +(@guid+2,@EGG,530,1,1,-3965.16,3232.7,347.552,-0.122173,180), +(@guid+3,@EGG,530,1,1,-3955.86,3222.16,347.503,0.244346,180), +(@guid+4,@EGG,530,1,1,-3953.3,3227.94,347.564,-0.244346,180), +(@guid+5,@EGG,530,1,1,-4044.66,3287.29,348.362,0.349066,180), +(@guid+6,@EGG,530,1,1,-4041.39,3271,346.642,-2.09439,180), +(@guid+7,@EGG,530,1,1,-4049.31,3285.9,348.335,1.43117,180), +(@guid+8,@EGG,530,1,1,-4076.99,3415.22,334.008,-2.33874,180), +(@guid+9,@EGG,530,1,1,-4076.79,3412.91,334.617,-1.0821,180), +(@guid+10,@EGG,530,1,1,-4077.92,3412.57,334.768,-0.733038,180), +(@guid+11,@EGG,530,1,1,-4107.93,3121.5,357.427,1.01229,180), +(@guid+12,@EGG,530,1,1,-4108.31,3123.66,357.633,-0.680679,180), +(@guid+13,@EGG,530,1,1,-4110.19,3122.64,358.083,-0.034907,180), +(@guid+14,@EGG,530,1,1,-3996.89,3142.12,372.729,3.05433,180), +(@guid+15,@EGG,530,1,1,-4109.06,3019.1,352.24,0.261799,180), +(@guid+16,@EGG,530,1,1,-4018.35,3076.7,375.29,-0.733038,180), +(@guid+17,@EGG,530,1,1,-4184.98,3044.71,352.394,1.81514,180), +(@guid+18,@EGG,530,1,1,-4187.52,3040.39,352.071,-0.017453,180), +(@guid+19,@EGG,530,1,1,-4189.67,3039.9,352.247,-0.785398,180), +(@guid+20,@EGG,530,1,1,-4192.61,3045.1,352.096,3.14159,180), +(@guid+21,@EGG,530,1,1,-4192.02,3046.91,352.297,2.46091,180), +(@guid+22,@EGG,530,1,1,-4186.47,3047.19,352.316,2.60054,180), +(@guid+23,@EGG,530,1,1,-3915.67,2983.4,396.957,-1.91986,180), +(@guid+24,@EGG,530,1,1,-3883.21,3004.11,399.738,-1.64061,180), +(@guid+25,@EGG,530,1,1,-3883.26,3001.55,399.431,-2.3911,180), +(@guid+26,@EGG,530,1,1,-3884.29,3003.3,400.063,-1.88496,180), +(@guid+27,@EGG,530,1,1,-3903.02,3095.85,383.783,-2.28638,180), +(@guid+28,@EGG,530,1,1,-3898.45,3093.06,383.667,2.53073,180), +(@guid+29,@EGG,530,1,1,-3900.75,3100.75,383.795,-0.436333,180), +(@guid+30,@EGG,530,1,1,-4107.81,3023.42,352.142,1.06465,180), +(@guid+31,@EGG,530,1,1,-4113.58,3022.4,352.157,-0.645772,180), +(@guid+32,@EGG,530,1,1,-3893.09,3677.17,374.516,-1.23918,180), +(@guid+33,@EGG,530,1,1,-3892.47,3674,374.478,-2.14675,180), +(@guid+34,@EGG,530,1,1,-4198.53,3168.91,355.847,-0.383972,180), +(@guid+35,@EGG,530,1,1,-4197.01,3170.04,356.117,-1.15192,180), +(@guid+36,@EGG,530,1,1,-4196.54,3167.69,356.348,-0.541052,180), +(@guid+37,@EGG,530,1,1,-4020.07,3077.84,374.391,1.53589,180), +(@guid+38,@EGG,530,1,1,-4019.32,3079.74,375.109,-1.25664,180), +(@guid+39,@EGG,530,1,1,-3917.21,2981.62,396.483,0.733038,180), +(@guid+40,@EGG,530,1,1,-3918.45,2982.44,397.24,-1.72788,180), +(@guid+41,@EGG,530,1,1,-3839.35,3344.85,337.834,2.75762,180), +(@guid+42,@EGG,530,1,1,-3835.3,3344.77,338.155,-0.767945,180), +(@guid+43,@EGG,530,1,1,-3846.43,3430.29,363.729,0.488692,180), +(@guid+44,@EGG,530,1,1,-3864.13,3439.06,363.679,-0.05236,180), +(@guid+45,@EGG,530,1,1,-3863.24,3440.42,363.655,0.349066,180), +(@guid+46,@EGG,530,1,1,-3846.35,3439.34,363.628,-0.122173,180), +(@guid+47,@EGG,530,1,1,-3847.32,3441.39,363.648,0.453786,180), +(@guid+48,@EGG,530,1,1,-3686.21,3301,320.513,0.837758,180), +(@guid+49,@EGG,530,1,1,-3687.77,3299.85,320.307,2.75762,180), +(@guid+50,@EGG,530,1,1,-3692.64,3302.07,320.396,-0.226893,180), +(@guid+51,@EGG,530,1,1,-3661.91,3379.15,320.377,0.890118,180), +(@guid+52,@EGG,530,1,1,-3660.65,3381.9,320.182,1.18682,180), +(@guid+53,@EGG,530,1,1,-3665.48,3380.11,320.365,-0.471239,180), +(@guid+54,@EGG,530,1,1,-3685.07,3305.97,320.198,-2.87979,180), +(@guid+55,@EGG,530,1,1,-3688.3,3308.93,320.337,1.65806,180), +(@guid+56,@EGG,530,1,1,-3690.65,3306.77,320.43,-2.79253,180), +(@guid+57,@EGG,530,1,1,-3879.37,3665.22,374.393,-2.30383,180), +(@guid+58,@EGG,530,1,1,-3990.42,3139.13,372.878,-2.61799,180), +(@guid+59,@EGG,530,1,1,-3991.59,3134.33,372.703,-0.017453,180), +(@guid+60,@EGG,530,1,1,-3884.89,3684.98,374.492,-2.53073,180), +(@guid+61,@EGG,530,1,1,-3800.8,3789.62,314,6.0912,180), +(@guid+62,@EGG,530,1,1,-3799.02,3788.06,314.158,3.19395,180), +(@guid+63,@EGG,530,1,1,-3798.91,3790.61,313.852,3.63029,180); diff --git a/sql/updates/world/2012_09_13_01_world_ogrila.sql b/sql/updates/world/2012_09_13_01_world_ogrila.sql new file mode 100644 index 00000000000..4ccb02e02e5 --- /dev/null +++ b/sql/updates/world/2012_09_13_01_world_ogrila.sql @@ -0,0 +1,158 @@ +-- Quest support for http://www.wowhead.com/quest=11010 "Bombing Run", http://www.wowhead.com/quest=11102 "Bombing Run" /druid/ and http://www.wowhead.com/quest=11023 "Bomb Them Again!" +-- Achievement support for http://www.wowhead.com/achievement=1282 and http://www.wowhead.com/achievement=1276, +-- Based on Warpten Script +SET @SKYGUARD_BOMB := 32456; +SET @Run_Dummy := 23118; +SET @Explosion_Bunny := 23119; +SET @Flak_Cannon := 23076; +SET @Flak_Cannon2 := 23082; +SET @Fel_Cannon_Dummy := 23077; +SET @RUN_MARK := 40196; +SET @THROW_BOMB := 40160; +SET @EXPLOSION_VISUAL := 40162; +SET @See_Invisibility := 40195; +SET @Invisibility := 40194; +SET @CANNONBALL_STACK := 185861; +-- Add class requirements for druid version of "Bombing Run" +UPDATE `quest_template` SET `RequiredClasses`=1024 WHERE `Id`=11102; +-- Add SAI support for Bombing Run Target Dummy +UPDATE `creature_template` SET `AIName`='SmartAI',`flags_extra`=`flags_extra`|128 WHERE `entry`=@Run_Dummy; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@Run_Dummy; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Run_Dummy; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Run_Dummy*100; +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 +(@Run_Dummy,0,0,1,8,0,100,0,@THROW_BOMB,0,1000,1000,33,@Run_Dummy,0,0,0,0,0,16,0,0,0,0,0,0,0, 'Run Target Dummy - On spell Throw Bomb hit - Give kill credit to invoker party'), +(@Run_Dummy,0,1,2,61,0,100,0,0,0,0,0,28,@RUN_MARK,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Run Target Dummy - Linked with previous event - Remove auras from hunter mark'), +(@Run_Dummy,0,2,3,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,20,@CANNONBALL_STACK,3,0,0,0,0,0, 'Run Target Dummy - Linked with previous event - Data set 0 1 on Cannonball Stack'), +(@Run_Dummy,0,3,4,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,19,@Explosion_Bunny,3,0,0,0,0,0, 'Run Target Dummy - Linked with previous event - Data set 0 1 on Explosion Bunny'), +(@Run_Dummy,0,4,0,61,0,100,0,0,0,0,0,80,@Run_Dummy*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Run Target Dummy - Linked with previous event - Start script 0'), +(@Run_Dummy*100,9,0,0,0,0,100,0,29000,29000,0,0,11,@RUN_MARK,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Run Target Dummy - Action 0 - Cast run mark on self'); +-- Add SAI for Cannonball Stack +UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@CANNONBALL_STACK; +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=@CANNONBALL_STACK; +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 +(@CANNONBALL_STACK,1,0,0,38,0,100,0,0,1,0,0,70,30,0,0,0,0,0,1,0,0,0,0,0,0,0,' Cannonball Stack - On data set 0 1 - Respawn object /make it reappear after 30 secs/'); +-- Add SAI support for Bombing Run Fel Cannon Dummy +UPDATE `creature_template` SET `AIName`='SmartAI',`unit_flags`=4,`flags_extra`=`flags_extra`|128 WHERE `entry`=@Fel_Cannon_Dummy; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Fel_Cannon_Dummy; +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 +(@Fel_Cannon_Dummy,0,0,0,8,0,100,0,40110,0,4350,5000,11,40119,0,0,0,0,0,19,@Flak_Cannon,5,0,0,0,0,0, 'Fel Cannon Dummy - On spell hit by Cannon trigger - Cast Aggro Burst on Flak Cannon'); +-- Add SAI support for Bombing Run Flak Cannon +UPDATE `creature_template` SET `AIName`='SmartAI',`unit_flags`=`unit_flags`|4|256|131072,`flags_extra`=`flags_extra`|2 WHERE `entry`=@Flak_Cannon; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Flak_Cannon; +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 +(@Flak_Cannon,0,0,0,25,0,100,0,0,0,0,0,11,40111,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Flak Cannon - On reset - Cast The Aggro Bunnies'), +(@Flak_Cannon,0,1,2,8,0,100,0,41598,0,0,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Flak Cannon - On hit by Bolt Pair - Set orientation to invoker'), +(@Flak_Cannon,0,2,0,61,0,100,0,0,0,0,0,11,40109,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Flak Cannon - Linked with previous event - Cast spell The Bolt'); +-- Add SAI support for Bombing Run Flak Cannon 2 /target bunny/ +UPDATE `creature_template` SET `AIName`='SmartAI',`flags_extra`=`flags_extra`|128,`InhabitType`=4 WHERE `entry`=@Flak_Cannon2; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Flak_Cannon2; +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 +(@Flak_Cannon2,0,0,0,54,0,100,0,0,0,0,0,11,41598,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Flak Cannon 2 - On just summoned - Cast The Bolt Pair on invoker'), +(@Flak_Cannon2,0,1,2,8,0,100,0,40109,0,0,0,11,40075,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Flak Cannon 2 - On spell hit Cannon Bolt - Cast on self Fel Flak Fire'), +(@Flak_Cannon2,0,2,0,61,0,100,0,0,0,0,0,41,5000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Flak Cannon 2 - Linked with previous event - Despawn in 5 sec'); +-- Add SAI support for Explosion Bunny +UPDATE `creature_template` SET `AIName`='SmartAI',`flags_extra`=`flags_extra`|128,`unit_flags`=0 WHERE `entry`=@Explosion_Bunny; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Explosion_Bunny; +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 +(@Explosion_Bunny,0,0,0,38,0,100,0,0,1,0,0,11,@EXPLOSION_VISUAL,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Explosion Bunny - On data set 0 1 - Cast Explosion Visual on self'); +-- Add conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (@THROW_BOMB,40110,40112,40075); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry` IN (@THROW_BOMB,40200,41598,40111); +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=@Fel_Cannon_Dummy; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`Comment`) VALUES +(17,0,@THROW_BOMB,0,29,0,@Run_Dummy,35,0,0,0,'Throw Bomb requires Run Target Dummy within 35y'), +(13,1,@THROW_BOMB,0,31,0,3,@Run_Dummy,0,0,0,'Throw Bomb implicit effect 0 can hit only Run Target Dummy'), +(13,1,@THROW_BOMB,0,1,0,@RUN_MARK,0,0,0,0,'Throw Bomb can hit only targets under the aura of 40196'), +(17,0,40200,0,9,0,11010,0,0,1,0,'To cast remove see invisibility player must not be on quest 11010'), +(17,0,40200,0,9,0,11102,0,0,1,0,'To cast remove see invisibility player must not be on quest 11102'), +(17,0,40200,0,9,0,11023,0,0,1,0,'To cast remove see invisibility player must not be on quest 11023'), +(13,1,40110,0,31,0,3,23077,0,0,0,'Cannon Trigger implicit targets can be only Fel Cannon Dummies'), +(13,1,40110,0,35,0,1,65,2,0,0,'Cannon Trigger implicit hit can happen only on targets under 65 yards range'), +(17,0,40111,0,29,0,@Fel_Cannon_Dummy,10,0,1,0,'The Aggro Bunnies caster should not be around Fel Cannon Dummies to cast'), +(13,1,40112,0,31,0,4,0,0,0,0,'Bombing Run Dummy aggro check can hit players'), +(13,3,40075,0,31,0,4,0,0,0,0,'Fel Flak Fire effect 2 can hit only players'), +(22,1,@Fel_Cannon_Dummy,0,1,1,40119,0,0,1,0,'Fel Cannon Dummy event 0 will happen only if target is missing aura from aggro burst'); +-- Insert addon data +DELETE FROM `creature_template_addon` WHERE `entry` IN (@Run_Dummy,@Explosion_Bunny,@Fel_Cannon_Dummy); +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(@Run_Dummy,0,0,0,0,'40196 40194 40195'), -- Mark, See Invisibility, Invisibility +(@Explosion_Bunny,0,0,0,0,'40194 40195'), -- See Invisibility, Invisibility +(@Fel_Cannon_Dummy,0,0,0,0,'40113'); -- The Aggro Check Aura +-- Remove achievement from disabled +DELETE FROM `disables` WHERE `sourceType`=4 AND `entry`=3923; +-- Add missing spell from dbc +DELETE FROM `spell_dbc` WHERE `Id`=40200; +INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`Attributes`,`AttributesEx`,`AttributesEx2`,`AttributesEx3`,`AttributesEx4`,`AttributesEx5`,`AttributesEx6`,`AttributesEx7`,`Stances`,`StancesNot`,`Targets`,`CastingTimeIndex`,`AuraInterruptFlags`,`ProcFlags`,`ProcChance`,`ProcCharges`,`MaxLevel`,`BaseLevel`,`SpellLevel`,`DurationIndex`,`RangeIndex`,`StackAmount`,`EquippedItemClass`,`EquippedItemSubClassMask`,`EquippedItemInventoryTypeMask`,`Effect1`,`Effect2`,`Effect3`,`EffectDieSides1`,`EffectDieSides2`,`EffectDieSides3`,`EffectRealPointsPerLevel1`,`EffectRealPointsPerLevel2`,`EffectRealPointsPerLevel3`,`EffectBasePoints1`,`EffectBasePoints2`,`EffectBasePoints3`,`EffectMechanic1`,`EffectMechanic2`,`EffectMechanic3`,`EffectImplicitTargetA1`,`EffectImplicitTargetA2`,`EffectImplicitTargetA3`,`EffectImplicitTargetB1`,`EffectImplicitTargetB2`,`EffectImplicitTargetB3`,`EffectRadiusIndex1`,`EffectRadiusIndex2`,`EffectRadiusIndex3`,`EffectApplyAuraName1`,`EffectApplyAuraName2`,`EffectApplyAuraName3`,`EffectAmplitude1`,`EffectAmplitude2`,`EffectAmplitude3`,`EffectMultipleValue1`,`EffectMultipleValue2`,`EffectMultipleValue3`,`EffectMiscValue1`,`EffectMiscValue2`,`EffectMiscValue3`,`EffectMiscValueB1`,`EffectMiscValueB2`,`EffectMiscValueB3`,`EffectTriggerSpell1`,`EffectTriggerSpell2`,`EffectTriggerSpell3`,`EffectSpellClassMaskA1`,`EffectSpellClassMaskA2`,`EffectSpellClassMaskA3`,`EffectSpellClassMaskB1`,`EffectSpellClassMaskB2`,`EffectSpellClassMaskB3`,`EffectSpellClassMaskC1`,`EffectSpellClassMaskC2`,`EffectSpellClassMaskC3`,`MaxTargetLevel`,`SpellFamilyName`,`SpellFamilyFlags1`,`SpellFamilyFlags2`,`SpellFamilyFlags3`,`MaxAffectedTargets`,`DmgClass`,`PreventionType`,`DmgMultiplier1`,`DmgMultiplier2`,`DmgMultiplier3`,`AreaGroupId`,`SchoolMask`,`Comment`) VALUES +(40200,0,0,256,0,0,0,0,0,0,0,0,0,0,1,0,0,101,0,0,0,0,26,1,0,-1,0,0,164,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,'Bombing Run: See Invisibility Aura Remover'); +-- Spell area - Check to cast remove aura /against see invisibility aura/, if having it and not on quest +DELETE FROM `spell_area` WHERE `spell`=40200; +INSERT INTO `spell_area` (`spell`,`area`,`quest_start`,`quest_start_active`,`quest_end`,`aura_spell`,`racemask`,`gender`,`autocast`) VALUES +(40200,3522,0,0,0,@See_Invisibility,0,2,1); +-- Insert cannonballs spawns /based on sniffs/ +SET @guid := 14811; +DELETE FROM `gameobject` WHERE `guid` BETWEEN @guid+0 AND @guid+13; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(@guid+0,@CANNONBALL_STACK,530,1,1,2825.11,7024.05,369.982,5.69617,0,0,0.289313,-0.957235,300,0,1), +(@guid+1,@CANNONBALL_STACK,530,1,1,2938.26,7094.72,369.413,2.78314,0,0,0.983982,0.178267,300,0,1), +(@guid+2,@CANNONBALL_STACK,530,1,1,2924.84,7031.46,367.857,4.26205,0,0,0.847134,-0.53138,300,0,1), +(@guid+3,@CANNONBALL_STACK,530,1,1,2938.02,7015.59,365.75,3.65778,0,0,0.966879,-0.255237,300,0,1), +(@guid+4,@CANNONBALL_STACK,530,1,1,2998.57,7043.55,368.539,5.91266,0,0,0.184206,-0.982888,300,0,1), +(@guid+5,@CANNONBALL_STACK,530,1,1,2982,7054.94,368.32,4.99766,0,0,0.599411,-0.800442,300,0,1), +(@guid+6,@CANNONBALL_STACK,530,1,1,2978.73,6889.19,369.701,0.689745,0,0,0.338077,0.941119,300,0,1), +(@guid+7,@CANNONBALL_STACK,530,1,1,2941.56,6827.17,367.3,4.08109,0,0,0.891683,-0.452661,300,0,1), +(@guid+8,@CANNONBALL_STACK,530,1,1,2953.55,6859.3,369.954,6.14433,0,0,0.0693712,-0.997591,300,0,1), +(@guid+9,@CANNONBALL_STACK,530,1,1,3023.13,6799.74,374.46,1.58666,0,0,0.712695,0.701474,300,0,1), +(@guid+10,@CANNONBALL_STACK,530,1,1,3028.3,6824.84,373.591,5.0275,0,0,0.587401,-0.809296,300,0,1), +(@guid+11,@CANNONBALL_STACK,530,1,1,3022.15,6859.05,369.546,3.44885,0,0,0.988222,-0.153025,300,0,1), +(@guid+12,@CANNONBALL_STACK,530,1,1,3016.28,6876.11,370.188,3.47791,0,0,0.985895,-0.167365,300,0,1), +(@guid+13,@CANNONBALL_STACK,530,1,1,2940.6,7106.65,370.123,0.88561,0,0,0.428475,0.903553,300,0,1); +-- Insert spawns for Fel Flak Cannons, Run Target Dummies and Explosion Bunnies /based on sniffs/ +SET @guid := 85656; +DELETE FROM `creature` WHERE `guid` BETWEEN @guid+0 AND @guid+44; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES +(@guid+0,23118,530,1,1,0,0,2764.71,7024.45,370.203,0,300,0,0,42,0,0,0,33554432,0), +(@guid+1,23119,530,1,1,0,0,2764.71,7024.45,370.203,0,300,0,0,6986,0,0,0,33554432,0), +(@guid+2,23118,530,1,1,0,0,2786.61,7036.28,370.686,0,300,0,0,42,0,0,0,33554432,0), +(@guid+3,23119,530,1,1,0,0,2786.61,7036.28,370.686,0,300,0,0,6986,0,0,0,33554432,0), +(@guid+4,23118,530,1,1,0,0,2824.71,7044.79,369.877,0,300,0,0,42,0,0,0,33554432,0), +(@guid+5,23119,530,1,1,0,0,2824.71,7044.79,369.877,0,300,0,0,6986,0,0,0,33554432,0), +(@guid+6,23076,530,1,1,0,0,2775.81,7030.75,370.337,1.85606,300,0,0,22140,0,0,0,0,0), +(@guid+7,23076,530,1,1,0,0,2933.28,7103.93,369.209,2.58129,300,0,0,21543,0,0,0,0,0), +(@guid+8,23119,530,1,1,0,0,2940.82,7107.17,370.115,4.65944,300,0,0,6986,0,0,0,33554432,0), +(@guid+9,23118,530,1,1,0,0,2940.82,7107.17,370.115,4.65944,300,0,0,42,0,0,0,33554432,0), +(@guid+10,23118,530,1,1,0,0,2825.11,7024.05,369.982,5.69617,300,0,0,42,0,0,0,33554432,0), +(@guid+11,23119,530,1,1,0,0,2825.11,7024.05,369.982,5.69617,300,0,0,6986,0,0,0,33554432,0), +(@guid+12,23076,530,1,1,0,0,2834.14,7018.43,368.459,5.42992,300,0,0,21543,0,0,0,0,0), +(@guid+13,23119,530,1,1,0,0,2938.84,7094.48,371.493,0.242375,300,0,0,6986,0,0,0,33554432,0), +(@guid+14,23118,530,1,1,0,0,2938.84,7094.48,371.493,0.242375,300,0,0,42,0,0,0,33554432,0), +(@guid+15,23076,530,1,1,0,0,2925.49,7021.72,367.007,3.59446,300,0,0,22140,0,0,0,0,0), +(@guid+16,23119,530,1,1,0,0,2924.84,7031.46,367.857,4.26205,300,0,0,6986,0,0,0,33554432,0), +(@guid+17,23118,530,1,1,0,0,2924.84,7031.46,367.857,4.26205,300,0,0,42,0,0,0,33554432,0), +(@guid+18,23119,530,1,1,0,0,2938.02,7015.59,366.54,3.65778,300,0,0,6986,0,0,0,33554432,0), +(@guid+19,23118,530,1,1,0,0,2938.02,7015.59,366.54,3.65778,300,0,0,42,0,0,0,33554432,0), +(@guid+20,23076,530,1,1,0,0,2994.48,7039.91,369.42,5.26077,300,0,0,22140,0,0,0,0,0), +(@guid+21,23119,530,1,1,0,0,2998.57,7043.55,368.539,5.91266,300,0,0,6986,0,0,0,33554432,0), +(@guid+22,23118,530,1,1,0,0,2998.57,7043.55,368.539,5.91266,300,0,0,42,0,0,0,33554432,0), +(@guid+23,23119,530,1,1,0,0,2982,7054.94,368.82,4.99766,300,0,0,6986,0,0,0,33554432,0), +(@guid+24,23118,530,1,1,0,0,2982,7054.94,368.82,4.99766,300,0,0,42,0,0,0,33554432,0), +(@guid+25,23076,530,1,1,0,0,2982.59,6886.5,370.082,0.831123,300,0,0,22140,0,0,0,0,0), +(@guid+26,23118,530,1,1,0,0,2978.74,6889.12,371.288,0.897875,300,0,0,42,0,0,0,33554432,0), +(@guid+27,23119,530,1,1,0,0,2978.74,6889.12,371.288,0.897875,300,0,0,6986,0,0,0,33554432,0), +(@guid+28,23118,530,1,1,0,0,2941.56,6827.17,367.3,4.54054,300,0,0,42,0,0,0,33554432,0), +(@guid+29,23119,530,1,1,0,0,2941.56,6827.17,367.3,4.54054,300,0,0,6986,0,0,0,33554432,0), +(@guid+30,23076,530,1,1,0,0,2938.19,6818.01,366.959,3.31926,300,0,0,21543,0,0,0,0,0), +(@guid+31,23076,530,1,1,0,0,2946.3,6875.71,370.04,3.2148,300,0,0,22140,0,0,0,0,0), +(@guid+32,23118,530,1,1,0,0,2953.55,6859.3,369.954,6.14433,300,0,0,42,0,0,0,33554432,0), +(@guid+33,23119,530,1,1,0,0,2953.55,6859.3,369.954,6.14433,300,0,0,6986,0,0,0,33554432,0), +(@guid+34,23119,530,1,1,0,0,3023.13,6799.74,374.46,1.58666,300,0,0,6986,0,0,0,33554432,0), +(@guid+35,23118,530,1,1,0,0,3023.13,6799.74,374.46,1.58666,300,0,0,42,0,0,0,33554432,0), +(@guid+36,23076,530,1,1,0,0,3028.22,6807.09,374.075,5.94641,300,0,0,22140,0,0,0,0,0), +(@guid+37,23118,530,1,1,0,0,3028.3,6824.84,373.591,5.0275,300,0,0,42,0,0,0,33554432,0), +(@guid+38,23119,530,1,1,0,0,3028.3,6824.84,373.591,5.0275,300,0,0,6986,0,0,0,33554432,0), +(@guid+39,23119,530,1,1,0,0,3022.15,6859.05,369.546,3.44885,300,0,0,6986,0,0,0,33554432,0), +(@guid+40,23118,530,1,1,0,0,3022.15,6859.05,369.546,3.44885,300,0,0,42,0,0,0,33554432,0), +(@guid+41,23076,530,1,1,0,0,3022.21,6864.61,369.93,0.100696,300,0,0,22140,0,0,0,0,0), +(@guid+42,23118,530,1,1,0,0,3016.28,6876.11,370.188,3.47791,300,0,0,42,0,0,0,33554432,0), +(@guid+43,23119,530,1,1,0,0,3016.28,6876.11,370.188,3.47791,300,0,0,6986,0,0,0,33554432,0), +(@guid+44,23076,530,1,1,0,0,2816.74,7057.61,369.779,1.4555,300,0,0,21543,0,0,0,0,0); diff --git a/sql/updates/world/2012_09_13_01_world_spell_script_name.sql b/sql/updates/world/2012_09_13_01_world_spell_script_name.sql index 0a6074716a6..61e4067c544 100644 --- a/sql/updates/world/2012_09_13_01_world_spell_script_name.sql +++ b/sql/updates/world/2012_09_13_01_world_spell_script_name.sql @@ -1,4 +1,14 @@ --- Add spell script name for Knockdown Fel Cannon: The Aggro Check +-- Add spell script name for Fires Over Skettis and Bombing Run quests +DELETE FROM `spell_script_names` WHERE `spell_id`=40113; +DELETE FROM `spell_script_names` WHERE `spell_id`=40160; +DELETE FROM `spell_script_names` WHERE `spell_id`=39844; +DELETE FROM `spell_script_names` WHERE `spell_id`=40056; DELETE FROM `spell_script_names` WHERE `spell_id`=40112; +DELETE FROM `spell_script_names` WHERE `spell_id`=40119; INSERT INTO `spell_script_names` VALUES -(40112,'spell_q11010_q11102_q11023_aggro_check'); \ No newline at end of file +(39844,'spell_q11010_q11102_q11023_q11008_check_fly_mount'), +(40160,'spell_q11010_q11102_q11023_q11008_check_fly_mount'), +(40113,'spell_q11010_q11102_q11023_aggro_check_aura'), +(40056,'spell_q11010_q11102_q11023_choose_loc'), +(40112,'spell_q11010_q11102_q11023_aggro_check'), +(40119,'spell_q11010_q11102_q11023_aggro_burst'); diff --git a/sql/updates/world/2012_09_13_02_world_spell_script_name.sql b/sql/updates/world/2012_09_13_02_world_spell_script_name.sql deleted file mode 100644 index a9ac55b8ac4..00000000000 --- a/sql/updates/world/2012_09_13_02_world_spell_script_name.sql +++ /dev/null @@ -1,4 +0,0 @@ --- Add spell script name for Knockdown Fel Cannon: The Aggro Burst -DELETE FROM `spell_script_names` WHERE `spell_id`=40119; -INSERT INTO `spell_script_names` VALUES -(40119,'spell_q11010_q11102_q11023_aggro_burst'); \ No newline at end of file diff --git a/sql/updates/world/2012_09_13_03_world_spell_script_name.sql b/sql/updates/world/2012_09_13_03_world_spell_script_name.sql deleted file mode 100644 index ea55a199f4c..00000000000 --- a/sql/updates/world/2012_09_13_03_world_spell_script_name.sql +++ /dev/null @@ -1,4 +0,0 @@ --- Add spell script name for Knockdown Fel Cannon: The Aggro Check Aura -DELETE FROM `spell_script_names` WHERE `spell_id`=40113; -INSERT INTO `spell_script_names` VALUES -(40113,'spell_q11010_q11102_q11023_aggro_check_aura'); \ No newline at end of file diff --git a/sql/updates/world/2012_09_13_04_world_spell_script_name.sql b/sql/updates/world/2012_09_13_04_world_spell_script_name.sql deleted file mode 100644 index 0a0cf3f610b..00000000000 --- a/sql/updates/world/2012_09_13_04_world_spell_script_name.sql +++ /dev/null @@ -1,4 +0,0 @@ --- Add spell script name for Trhow Bomb -DELETE FROM `spell_script_names` WHERE `spell_id`=40160; -INSERT INTO `spell_script_names` VALUES -(40160,'spell_q11010_q11102_q11023_throw_bomb'); \ No newline at end of file diff --git a/sql/updates/world/2012_09_13_05_world_spell_script_name.sql b/sql/updates/world/2012_09_13_05_world_spell_script_name.sql deleted file mode 100644 index 1d2d73eccdd..00000000000 --- a/sql/updates/world/2012_09_13_05_world_spell_script_name.sql +++ /dev/null @@ -1,4 +0,0 @@ --- Add spell script name for Skyguard Blasting Charge -DELETE FROM `spell_script_names` WHERE `spell_id`=39844; -INSERT INTO `spell_script_names` VALUES -(39844,'spell_q11008_blasting_charge'); \ No newline at end of file diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 1ab1cd05771..76fe756f79e 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -1315,15 +1315,15 @@ class spell_q12372_destabilize_azure_dragonshrine_dummy : public SpellScriptLoad } }; -// http://www.wowhead.com/quest=11010 "Bombing Run", http://www.wowhead.com/quest=11102 "Bombing Run" /druid/ and http://www.wowhead.com/quest=11023 "Bomb Them Again!" +// "Bombing Run" and "Bomb Them Again!" enum Quest11010_11102_11023Data { // Spell - SPELL_FLAK_CANNON_TRIGGER = 40110, - SPELL_CHOOSE_LOC = 40056, - SPELL_AGGRO_CHECK = 40112, + SPELL_FLAK_CANNON_TRIGGER = 40110, + SPELL_CHOOSE_LOC = 40056, + SPELL_AGGRO_CHECK = 40112, // NPCs - NPC_FEL_CANNON2 = 23082 + NPC_FEL_CANNON2 = 23082 }; // 40113 Knockdown Fel Cannon: The Aggro Check Aura @@ -1339,10 +1339,8 @@ class spell_q11010_q11102_q11023_aggro_check_aura : public SpellScriptLoader void HandleTriggerSpell(AuraEffect const* /*aurEff*/) { if (Unit* target = GetTarget()) - { // On trigger proccing target->CastSpell(target, SPELL_AGGRO_CHECK); - } } void Register() @@ -1372,9 +1370,7 @@ class spell_q11010_q11102_q11023_aggro_check : public SpellScriptLoader if (Player* playerTarget = GetHitPlayer()) // Check if found player target is on fly mount or using flying form if (playerTarget->HasAuraType(SPELL_AURA_FLY) || playerTarget->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED)) - { playerTarget->CastSpell(playerTarget, SPELL_FLAK_CANNON_TRIGGER, TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE); - } } void Register() @@ -1402,10 +1398,8 @@ class spell_q11010_q11102_q11023_aggro_burst : public SpellScriptLoader void HandleEffectPeriodic(AuraEffect const* /*aurEff*/) { if (Unit* target = GetTarget()) - { // On each tick cast Choose Loc to trigger summon target->CastSpell(target, SPELL_CHOOSE_LOC); - } } void Register() @@ -1434,17 +1428,15 @@ class spell_q11010_q11102_q11023_choose_loc : public SpellScriptLoader { Unit* caster = GetCaster(); // Check for player that is in 65 y range - std::list PlayerList; + std::list playerList; Trinity::AnyPlayerInObjectRangeCheck checker(caster, 765.0f); - Trinity::PlayerListSearcher searcher(caster, PlayerList, checker); + Trinity::PlayerListSearcher searcher(caster, playerList, checker); caster->VisitNearbyWorldObject(65.0f, searcher); - for (std::list::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr) + for (std::list::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr) // Check if found player target is on fly mount or using flying form if ((*itr)->HasAuraType(SPELL_AURA_FLY) || (*itr)->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED)) - { // Summom Fel Cannon (bunny version) at found player caster->SummonCreature(NPC_FEL_CANNON2, (*itr)->GetPositionX(), (*itr)->GetPositionY(), (*itr)->GetPositionZ()); - } } void Register() @@ -1459,51 +1451,21 @@ class spell_q11010_q11102_q11023_choose_loc : public SpellScriptLoader } }; -class spell_q11010_q11102_q11023_throw_bomb : public SpellScriptLoader -{ - public: - spell_q11010_q11102_q11023_throw_bomb() : SpellScriptLoader("spell_q11010_q11102_q11023_throw_bomb") { } - - class spell_q11010_q11102_q11023_throw_bomb_SpellScript : public SpellScript - { - PrepareSpellScript(spell_q11010_q11102_q11023_throw_bomb_SpellScript); - - SpellCastResult CheckRequirement() - { - Unit* caster = GetCaster(); - // This spell will be casted only if caster has one of these auras - if (!(caster->HasAuraType(SPELL_AURA_FLY) || caster->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED))) - return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW; - return SPELL_CAST_OK; - } - - void Register() - { - OnCheckCast += SpellCheckCastFn(spell_q11010_q11102_q11023_throw_bomb_SpellScript::CheckRequirement); - } - }; - - SpellScript* GetSpellScript() const - { - return new spell_q11010_q11102_q11023_throw_bomb_SpellScript(); - } -}; - -// http://www.wowhead.com/quest=11008 "Fires Over Skettis" // 39844 - Skyguard Blasting Charge -class spell_q11008_blasting_charge : public SpellScriptLoader +// 40160 - Throw Bomb +class spell_q11010_q11102_q11023_q11008_check_fly_mount : public SpellScriptLoader { public: - spell_q11008_blasting_charge() : SpellScriptLoader("spell_q11008_blasting_charge") { } + spell_q11010_q11102_q11023_q11008_check_fly_mount() : SpellScriptLoader("spell_q11010_q11102_q11023_q11008_check_fly_mount") { } - class spell_q11008_blasting_charge_SpellScript : public SpellScript + class spell_q11010_q11102_q11023_q11008_check_fly_mount_SpellScript : public SpellScript { - PrepareSpellScript(spell_q11008_blasting_charge_SpellScript); + PrepareSpellScript(spell_q11010_q11102_q11023_q11008_check_fly_mount_SpellScript); SpellCastResult CheckRequirement() { Unit* caster = GetCaster(); - // This spell will be casted only if caster has one of these auras + // This spell will be cast only if caster has one of these auras if (!(caster->HasAuraType(SPELL_AURA_FLY) || caster->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED))) return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW; return SPELL_CAST_OK; @@ -1511,13 +1473,13 @@ class spell_q11008_blasting_charge : public SpellScriptLoader void Register() { - OnCheckCast += SpellCheckCastFn(spell_q11008_blasting_charge_SpellScript::CheckRequirement); + OnCheckCast += SpellCheckCastFn(spell_q11010_q11102_q11023_q11008_check_fly_mount_SpellScript::CheckRequirement); } }; SpellScript* GetSpellScript() const { - return new spell_q11008_blasting_charge_SpellScript(); + return new spell_q11010_q11102_q11023_q11008_check_fly_mount_SpellScript(); } }; @@ -1556,6 +1518,5 @@ void AddSC_quest_spell_scripts() new spell_q11010_q11102_q11023_aggro_check(); new spell_q11010_q11102_q11023_aggro_burst(); new spell_q11010_q11102_q11023_choose_loc(); - new spell_q11010_q11102_q11023_throw_bomb(); - new spell_q11008_blasting_charge(); -} \ No newline at end of file + new spell_q11010_q11102_q11023_q11008_check_fly_mount(); +} -- cgit v1.2.3 From 13e140cfac6f8de5e79d804e197903d47f1b017d Mon Sep 17 00:00:00 2001 From: Myran2 Date: Thu, 13 Sep 2012 15:32:17 +0100 Subject: Core/Commands: Added a command that shows what cheat commands you have active Closes #7721 (Modified) --- .../world/2012_09_13_02_world_trinity_string.sql | 12 ++++++++++ src/server/game/Miscellaneous/Language.h | 8 ++++++- src/server/scripts/Commands/cs_cheat.cpp | 17 ++++++++++++++ src/server/scripts/Spells/spell_quest.cpp | 26 ++++++++++++---------- 4 files changed, 50 insertions(+), 13 deletions(-) create mode 100644 sql/updates/world/2012_09_13_02_world_trinity_string.sql (limited to 'src') diff --git a/sql/updates/world/2012_09_13_02_world_trinity_string.sql b/sql/updates/world/2012_09_13_02_world_trinity_string.sql new file mode 100644 index 00000000000..f7214ad127b --- /dev/null +++ b/sql/updates/world/2012_09_13_02_world_trinity_string.sql @@ -0,0 +1,12 @@ +DELETE FROM `command` WHERE `name` = 'cheat status'; +INSERT INTO `command` (`name`, `security`, `help`) VALUES +('cheat status', 2, 'Syntax: .cheat status \n\nShows the cheats you currently have enabled.'); + +DELETE FROM `trinity_string` WHERE `entry` BETWEEN 357 AND 362; +INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES +(357, 'Cheat Command Status:'), +(358, 'Godmode: %s.'), +(359, 'Casttime: %s.'), +(360, 'Cooldown: %s.'), +(361, 'Power: %s.'), +(362, 'Waterwalk: %s.'); diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index 11cee46a290..5893bbd6564 100755 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -338,7 +338,13 @@ enum TrinityStrings LANG_TITLE_REMOVE_RES = 354, LANG_TITLE_CURRENT_RES = 355, LANG_CURRENT_TITLE_RESET = 356, - // Room for more level 2 357-399 not used + LANG_COMMAND_CHEAT_STATUS = 357, + LANG_COMMAND_CHEAT_GOD = 358, + LANG_COMMAND_CHEAT_CT = 359, + LANG_COMMAND_CHEAT_CD = 360, + LANG_COMMAND_CHEAT_POWER = 361, + LANG_COMMAND_CHEAT_WW = 362, + // Room for more level 2 363-399 not used // level 3 chat LANG_SCRIPTS_RELOADED = 400, diff --git a/src/server/scripts/Commands/cs_cheat.cpp b/src/server/scripts/Commands/cs_cheat.cpp index ade1b9fae02..4f503fdbb76 100644 --- a/src/server/scripts/Commands/cs_cheat.cpp +++ b/src/server/scripts/Commands/cs_cheat.cpp @@ -41,6 +41,7 @@ public: { "cooldown", SEC_GAMEMASTER, false, &HandleCoolDownCheatCommand, "", NULL }, { "power", SEC_GAMEMASTER, false, &HandlePowerCheatCommand, "", NULL }, { "waterwalk", SEC_GAMEMASTER, false, &HandleWaterWalkCheatCommand, "", NULL }, + { "status", SEC_GAMEMASTER, false, &HandleCheatStatusCommand, "", NULL }, { "taxi", SEC_GAMEMASTER, false, &HandleTaxiCheatCommand, "", NULL }, { "explore", SEC_GAMEMASTER, false, &HandleExploreCheatCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL } @@ -159,6 +160,22 @@ public: return false; } + static bool HandleCheatStatusCommand(ChatHandler* handler, const char* /*args*/) + { + Player* player = handler->GetSession()->GetPlayer(); + + const char* enabled = "enabled"; + const char* disabled = "disabled"; + + handler->SendSysMessage(LANG_COMMAND_CHEAT_STATUS); + handler->PSendSysMessage(LANG_COMMAND_CHEAT_GOD, player->GetCommandStatus(CHEAT_GOD) ? enabled : disabled); + handler->PSendSysMessage(LANG_COMMAND_CHEAT_CD, player->GetCommandStatus(CHEAT_COOLDOWN) ? enabled : disabled); + handler->PSendSysMessage(LANG_COMMAND_CHEAT_CT, player->GetCommandStatus(CHEAT_CASTTIME) ? enabled : disabled); + handler->PSendSysMessage(LANG_COMMAND_CHEAT_POWER, player->GetCommandStatus(CHEAT_POWER) ? enabled : disabled); + handler->PSendSysMessage(LANG_COMMAND_CHEAT_WW, player->GetCommandStatus(CHEAT_WATERWALK) ? enabled : disabled); + return true; + } + static bool HandleWaterWalkCheatCommand(ChatHandler* handler, const char* args) { if (!handler->GetSession() && !handler->GetSession()->GetPlayer()) diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 76fe756f79e..06d3602d8e8 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -26,6 +26,8 @@ #include "SpellScript.h" #include "Vehicle.h" #include "GridNotifiers.h" +#include "GridNotifiersImpl.h" +#include "CellImpl.h" class spell_generic_quest_update_entry_SpellScript : public SpellScript { @@ -1322,7 +1324,7 @@ enum Quest11010_11102_11023Data SPELL_FLAK_CANNON_TRIGGER = 40110, SPELL_CHOOSE_LOC = 40056, SPELL_AGGRO_CHECK = 40112, - // NPCs + // NPCs NPC_FEL_CANNON2 = 23082 }; @@ -1364,21 +1366,21 @@ class spell_q11010_q11102_q11023_aggro_check : public SpellScriptLoader class spell_q11010_q11102_q11023_aggro_check_SpellScript : public SpellScript { PrepareSpellScript(spell_q11010_q11102_q11023_aggro_check_SpellScript); - + void HandleDummy(SpellEffIndex /*effIndex*/) { if (Player* playerTarget = GetHitPlayer()) - // Check if found player target is on fly mount or using flying form + // Check if found player target is on fly mount or using flying form if (playerTarget->HasAuraType(SPELL_AURA_FLY) || playerTarget->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED)) playerTarget->CastSpell(playerTarget, SPELL_FLAK_CANNON_TRIGGER, TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE); } - + void Register() { OnEffectHitTarget += SpellEffectFn(spell_q11010_q11102_q11023_aggro_check_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; - + SpellScript* GetSpellScript() const { return new spell_q11010_q11102_q11023_aggro_check_SpellScript(); @@ -1423,28 +1425,28 @@ class spell_q11010_q11102_q11023_choose_loc : public SpellScriptLoader class spell_q11010_q11102_q11023_choose_loc_SpellScript : public SpellScript { PrepareSpellScript(spell_q11010_q11102_q11023_choose_loc_SpellScript); - + void HandleDummy(SpellEffIndex /*effIndex*/) { Unit* caster = GetCaster(); - // Check for player that is in 65 y range + // Check for player that is in 65 y range std::list playerList; Trinity::AnyPlayerInObjectRangeCheck checker(caster, 765.0f); - Trinity::PlayerListSearcher searcher(caster, playerList, checker); - caster->VisitNearbyWorldObject(65.0f, searcher); + Trinity::PlayerListSearcher searcher(caster, playerList, checker); + caster->VisitNearbyWorldObject(65.0f, searcher); for (std::list::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr) - // Check if found player target is on fly mount or using flying form + // Check if found player target is on fly mount or using flying form if ((*itr)->HasAuraType(SPELL_AURA_FLY) || (*itr)->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED)) // Summom Fel Cannon (bunny version) at found player caster->SummonCreature(NPC_FEL_CANNON2, (*itr)->GetPositionX(), (*itr)->GetPositionY(), (*itr)->GetPositionZ()); } - + void Register() { OnEffectHit += SpellEffectFn(spell_q11010_q11102_q11023_choose_loc_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); } }; - + SpellScript* GetSpellScript() const { return new spell_q11010_q11102_q11023_choose_loc_SpellScript(); -- cgit v1.2.3 From f03e650474463ad7454294e0fb5d6f169719ecbd Mon Sep 17 00:00:00 2001 From: Shauren Date: Thu, 13 Sep 2012 16:38:18 +0200 Subject: Core/Calendar: Fixed breaking calendar event UI after relogging --- src/server/game/Achievements/AchievementMgr.cpp | 8 ++-- src/server/game/Entities/Player/Player.cpp | 2 +- src/server/game/Guilds/Guild.cpp | 2 +- src/server/game/Handlers/CalendarHandler.cpp | 54 ++++++++++++++----------- src/server/shared/Packets/ByteBuffer.h | 28 +++++++++++++ src/server/shared/Utilities/Util.h | 6 --- 6 files changed, 64 insertions(+), 36 deletions(-) (limited to 'src') diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index d06d0849eff..dff155926de 100755 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -717,7 +717,7 @@ void AchievementMgr::SendAchievementEarned(AchievementEntry const* achievement) WorldPacket data(SMSG_ACHIEVEMENT_EARNED, 8+4+8); data.append(GetPlayer()->GetPackGUID()); data << uint32(achievement->ID); - data << uint32(secsToTimeBitFields(time(NULL))); + data.AppendPackedTime(time(NULL)); data << uint32(0); GetPlayer()->SendMessageToSetInRange(&data, sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_SAY), true); } @@ -735,7 +735,7 @@ void AchievementMgr::SendCriteriaUpdate(AchievementCriteriaEntry const* entry, C data << uint32(0); else data << uint32(timedCompleted ? 0 : 1); // this are some flags, 1 is for keeping the counter at 0 in client - data << uint32(secsToTimeBitFields(progress->date)); + data.AppendPackedTime(progress->date); data << uint32(timeElapsed); // time elapsed in seconds data << uint32(0); // unk GetPlayer()->SendDirectMessage(&data); @@ -2126,7 +2126,7 @@ void AchievementMgr::BuildAllDataPacket(WorldPacket* data) const continue; *data << uint32(iter->first); - *data << uint32(secsToTimeBitFields(iter->second.date)); + data->AppendPackedTime(iter->second.date); } *data << int32(-1); @@ -2136,7 +2136,7 @@ void AchievementMgr::BuildAllDataPacket(WorldPacket* data) const data->appendPackGUID(iter->second.counter); data->append(GetPlayer()->GetPackGUID()); *data << uint32(0); - *data << uint32(secsToTimeBitFields(iter->second.date)); + data->AppendPackedTime(iter->second.date); *data << uint32(0); *data << uint32(0); } diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index bc29f6795c9..a2eb4385587 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -22098,7 +22098,7 @@ void Player::SendInitialPacketsBeforeAddToMap() SendEquipmentSetList(); data.Initialize(SMSG_LOGIN_SETTIMESPEED, 4 + 4 + 4); - data << uint32(secsToTimeBitFields(sWorld->GetGameTime())); + data.AppendPackedTime(sWorld->GetGameTime()); data << float(0.01666667f); // game speed data << uint32(0); // added in 3.1.2 GetSession()->SendPacket(&data); diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index 4df77f874f3..332c0924b61 100755 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -1717,7 +1717,7 @@ void Guild::SendInfo(WorldSession* session) const { WorldPacket data(SMSG_GUILD_INFO, m_name.size() + 4 + 4 + 4); data << m_name; - data << secsToTimeBitFields(m_createdDate); // 3.x (prev. year + month + day) + data.AppendPackedTime(m_createdDate); // 3.x (prev. year + month + day) data << uint32(m_members.size()); // Number of members data << m_accountsNumber; // Number of accounts diff --git a/src/server/game/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp index e83f0f55a44..b207547147c 100755 --- a/src/server/game/Handlers/CalendarHandler.cpp +++ b/src/server/game/Handlers/CalendarHandler.cpp @@ -90,9 +90,9 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recvData*/) if (CalendarEvent* calendarEvent = sCalendarMgr->GetEvent(*it)) { data << uint64(*it); - data << calendarEvent->GetTitle().c_str(); + data << calendarEvent->GetTitle(); data << uint32(calendarEvent->GetType()); - data << uint32(calendarEvent->GetTime()); + data.AppendPackedTime(calendarEvent->GetTime()); data << uint32(calendarEvent->GetFlags()); data << uint32(calendarEvent->GetDungeonId()); data.appendPackGUID(calendarEvent->GetCreatorGUID()); @@ -111,7 +111,7 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recvData*/) } data << uint32(cur_time); // server time - data << uint32(secsToTimeBitFields(cur_time)); // server time + data.AppendPackedTime(cur_time); // server time uint32 counter = 0; size_t p_counter = data.wpos(); @@ -240,7 +240,10 @@ void WorldSession::HandleCalendarAddEvent(WorldPacket& recvData) uint8 rank; recvData >> title >> description >> type >> repeatable >> maxInvites; - recvData >> dungeonId >> eventPackedTime >> unkPackedTime >> flags; + recvData >> dungeonId; + recvData.ReadPackedTime(eventPackedTime); + recvData.ReadPackedTime(unkPackedTime); + recvData >> flags; if (!(flags & CALENDAR_FLAG_WITHOUT_INVITES)) { @@ -317,7 +320,9 @@ void WorldSession::HandleCalendarUpdateEvent(WorldPacket& recvData) recvData >> eventId >> inviteId >> title >> description >> type; recvData >> repeatable >> maxInvites >> dungeonId; - recvData >> eventPackedTime >> timeZoneTime >> flags; + recvData.ReadPackedTime(eventPackedTime); + recvData.ReadPackedTime(timeZoneTime); + recvData >> flags; sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_UPDATE_EVENT [" UI64FMTD "] EventId [" UI64FMTD "], InviteId [" UI64FMTD "] Title %s, Description %s, type %u " @@ -372,7 +377,8 @@ void WorldSession::HandleCalendarCopyEvent(WorldPacket& recvData) uint64 inviteId; uint32 time; - recvData >> eventId >> inviteId >> time; + recvData >> eventId >> inviteId; + recvData.ReadPackedTime(time); sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_CALENDAR_COPY_EVENT [" UI64FMTD "], EventId [" UI64FMTD "] inviteId [" UI64FMTD "] Time: %u", guid, eventId, inviteId, time); @@ -607,15 +613,15 @@ void WorldSession::SendCalendarEvent(CalendarEvent const& calendarEvent, Calenda data << uint8(sendEventType); data.appendPackGUID(calendarEvent.GetCreatorGUID()); data << uint64(eventId); - data << calendarEvent.GetTitle().c_str(); - data << calendarEvent.GetDescription().c_str(); + data << calendarEvent.GetTitle(); + data << calendarEvent.GetDescription(); data << uint8(calendarEvent.GetType()); data << uint8(calendarEvent.GetRepeatable()); data << uint32(calendarEvent.GetMaxInvites()); data << int32(calendarEvent.GetDungeonId()); data << uint32(calendarEvent.GetFlags()); - data << uint32(calendarEvent.GetTime()); - data << uint32(calendarEvent.GetTimeZoneTime()); + data.AppendPackedTime(calendarEvent.GetTime()); + data.AppendPackedTime(calendarEvent.GetTimeZoneTime()); data << uint32(calendarEvent.GetGuildId()); CalendarInviteIdList const& invites = calendarEvent.GetInviteIdList(); @@ -635,7 +641,7 @@ void WorldSession::SendCalendarEvent(CalendarEvent const& calendarEvent, Calenda data << uint8(calendarEvent.GetGuildId() != 0); data << uint64(invite->GetInviteId()); data << uint32(invite->GetStatusTime()); - data << invite->GetText().c_str(); + data << invite->GetText(); } else { @@ -692,7 +698,7 @@ void WorldSession::SendCalendarEventInviteAlert(CalendarEvent const& calendarEve WorldPacket data(SMSG_CALENDAR_EVENT_INVITE_ALERT); data << uint64(eventId); data << calendarEvent.GetTitle().c_str(); - data << uint32(calendarEvent.GetTime()); + data.AppendPackedTime(calendarEvent.GetTime()); data << uint32(calendarEvent.GetFlags()); data << uint32(calendarEvent.GetType()); data << uint32(calendarEvent.GetDungeonId()); @@ -717,9 +723,9 @@ void WorldSession::SendCalendarEventUpdateAlert(CalendarEvent const& calendarEve calendarEvent.GetTitle().size() + calendarEvent.GetDescription().size() + 1 + 4 + 4); data << uint8(sendEventType); data << uint64(eventId); - data << uint32(calendarEvent.GetTime()); + data.AppendPackedTime(calendarEvent.GetTime()); data << uint32(calendarEvent.GetFlags()); - data << uint32(calendarEvent.GetTime()); + data.AppendPackedTime(calendarEvent.GetTime()); data << uint8(calendarEvent.GetType()); data << uint32(calendarEvent.GetDungeonId()); data << calendarEvent.GetTitle().c_str(); @@ -734,7 +740,7 @@ void WorldSession::SendCalendarEventRemovedAlert(CalendarEvent const& calendarEv { uint64 guid = _player->GetGUID(); uint64 eventId = calendarEvent.GetEventId(); - uint32 eventTime = (calendarEvent.GetTime()); + uint32 eventTime = calendarEvent.GetTime(); sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_EVENT_REMOVED_ALERT [" UI64FMTD "] EventId [" UI64FMTD "] Time %u", guid, eventId, eventTime); @@ -742,7 +748,7 @@ void WorldSession::SendCalendarEventRemovedAlert(CalendarEvent const& calendarEv WorldPacket data(SMSG_CALENDAR_EVENT_REMOVED_ALERT, 1 + 8 + 1); data << uint8(1); // FIXME: If true does not SignalEvent(EVENT_CALENDAR_ACTION_PENDING) data << uint64(eventId); - data << uint32(eventTime); + data.AppendPackedTime(eventTime); SendPacket(&data); } @@ -752,11 +758,11 @@ void WorldSession::SendCalendarEventStatus(CalendarEvent const& calendarEvent, C uint64 eventId = calendarEvent.GetEventId(); uint64 inviteId = invite.GetInviteId(); uint64 invitee = invite.GetInvitee(); - uint32 eventTime = (calendarEvent.GetTime()); + uint32 eventTime = calendarEvent.GetTime(); uint32 flags = calendarEvent.GetFlags(); uint8 status = invite.GetStatus(); uint8 rank = invite.GetRank(); - uint32 statusTime = secsToTimeBitFields(invite.GetStatusTime()); + uint32 statusTime = invite.GetStatusTime(); sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_EVENT_STATUS [" UI64FMTD "] EventId [" @@ -768,11 +774,11 @@ void WorldSession::SendCalendarEventStatus(CalendarEvent const& calendarEvent, C WorldPacket data(SMSG_CALENDAR_EVENT_STATUS, 8 + 8 + 4 + 4 + 1 + 1 + 4); data.appendPackGUID(invitee); data << uint64(eventId); - data << uint32(eventTime); + data.AppendPackedTime(eventTime); data << uint32(flags); data << uint8(status); data << uint8(rank); - data << uint32(statusTime); + data.AppendPackedTime(statusTime); SendPacket(&data); } @@ -801,7 +807,7 @@ void WorldSession::SendCalendarEventInviteRemoveAlert(CalendarEvent const& calen { uint64 guid = _player->GetGUID(); uint64 eventId = calendarEvent.GetEventId(); - uint32 eventTime = (calendarEvent.GetTime()); + uint32 eventTime = calendarEvent.GetTime(); uint32 flags = calendarEvent.GetFlags(); sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_EVENT_INVITE_REMOVED_ALERT [" @@ -810,7 +816,7 @@ void WorldSession::SendCalendarEventInviteRemoveAlert(CalendarEvent const& calen WorldPacket data(SMSG_CALENDAR_EVENT_INVITE_REMOVED_ALERT, 8 + 4 + 4 + 1); data << uint64(eventId); - data << uint32(eventTime); + data.AppendPackedTime(eventTime); data << uint32(flags); data << uint8(status); SendPacket(&data); @@ -877,7 +883,7 @@ void WorldSession::SendCalendarRaidLockout(InstanceSave const* save, bool add) if (add) { data.SetOpcode(SMSG_CALENDAR_RAID_LOCKOUT_ADDED); - data << uint32(secsToTimeBitFields(currTime)); + data.AppendPackedTime(currTime); } data << uint32(save->GetMapId()); @@ -899,7 +905,7 @@ void WorldSession::SendCalendarRaidLockoutUpdated(InstanceSave const* save) time_t cur_time = time_t(time(NULL)); WorldPacket data(SMSG_CALENDAR_RAID_LOCKOUT_UPDATED, 4 + 4 + 4 + 4 + 8); - data << secsToTimeBitFields(cur_time); + data.AppendPackedTime(cur_time); data << uint32(save->GetMapId()); data << uint32(save->GetDifficulty()); data << uint32(0); // Amount of seconds that has changed to the reset time diff --git a/src/server/shared/Packets/ByteBuffer.h b/src/server/shared/Packets/ByteBuffer.h index 760fcfd48d9..1fa3148504a 100755 --- a/src/server/shared/Packets/ByteBuffer.h +++ b/src/server/shared/Packets/ByteBuffer.h @@ -359,6 +359,28 @@ class ByteBuffer } } + uint32 ReadPackedTime() + { + uint32 packedDate = read(); + tm lt; + memset(<, 0, sizeof(lt)); + + lt.tm_min = packedDate & 0x3F; + lt.tm_hour = (packedDate >> 6) & 0x1F; + //lt.tm_wday = (packedDate >> 11) & 7; + lt.tm_mday = ((packedDate >> 14) & 0x3F) + 1; + lt.tm_mon = (packedDate >> 20) & 0xF; + lt.tm_year = ((packedDate >> 24) & 0x1F) + 100; + + return mktime(<) + timezone; + } + + ByteBuffer& ReadPackedTime(uint32& time) + { + time = ReadPackedTime(); + return *this; + } + const uint8 *contents() const { return &_storage[0]; } size_t size() const { return _storage.size(); } @@ -438,6 +460,12 @@ class ByteBuffer append(packGUID, size); } + void AppendPackedTime(time_t time) + { + tm* lt = localtime(&time); + append((lt->tm_year - 100) << 24 | lt->tm_mon << 20 | (lt->tm_mday - 1) << 14 | lt->tm_wday << 11 | lt->tm_hour << 6 | lt->tm_min); + } + void put(size_t pos, const uint8 *src, size_t cnt) { if (pos + cnt > size()) diff --git a/src/server/shared/Utilities/Util.h b/src/server/shared/Utilities/Util.h index 835473045d4..37782c31d8b 100755 --- a/src/server/shared/Utilities/Util.h +++ b/src/server/shared/Utilities/Util.h @@ -48,12 +48,6 @@ std::string secsToTimeString(uint64 timeInSecs, bool shortText = false, bool hou uint32 TimeStringToSecs(const std::string& timestring); std::string TimeToTimestampStr(time_t t); -inline uint32 secsToTimeBitFields(time_t secs) -{ - tm* lt = localtime(&secs); - return uint32((lt->tm_year - 100) << 24 | lt->tm_mon << 20 | (lt->tm_mday - 1) << 14 | lt->tm_wday << 11 | lt->tm_hour << 6 | lt->tm_min); -} - /* Return a random number in the range min..max; (max-min) must be smaller than 32768. */ int32 irand(int32 min, int32 max); -- cgit v1.2.3