diff options
-rw-r--r-- | sql/updates/3813_world_spell_(dk).sql | 10 | ||||
-rw-r--r-- | sql/world_scripts_full.sql | 1 | ||||
-rw-r--r-- | sql/world_spell_full.sql | 26 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp | 35 | ||||
-rw-r--r-- | src/game/GameObject.cpp | 4 | ||||
-rw-r--r-- | src/game/UpdateData.cpp | 4 |
6 files changed, 68 insertions, 12 deletions
diff --git a/sql/updates/3813_world_spell_(dk).sql b/sql/updates/3813_world_spell_(dk).sql new file mode 100644 index 00000000000..ee12a70afd0 --- /dev/null +++ b/sql/updates/3813_world_spell_(dk).sql @@ -0,0 +1,10 @@ +UPDATE `creature_template` SET `ScriptName`='npc_dkc1_gothik' WHERE `entry`=28658; + +-- gift of harvester +DELETE FROM `spell_script_target` WHERE entry IN +(52479); +INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES +(52479,1,28819), +(52479,1,28822); + +update creature_template set maxhealth = 133525, minhealth = 133525, maxmana = 51360, minmana = 51360, spell1 = 53114, spell2 = 53112, spell3=53110, VehicleId = 156 where entry = 28670; diff --git a/sql/world_scripts_full.sql b/sql/world_scripts_full.sql index c6b0486456a..fe6fa57933a 100644 --- a/sql/world_scripts_full.sql +++ b/sql/world_scripts_full.sql @@ -109,6 +109,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_taxi' WHERE `entry` IN (17435, UPDATE `creature_template` SET `ScriptName`='npc_death_knight_initiate' WHERE `entry`=28406; UPDATE `creature_template` SET `ScriptName`='npc_salanar_the_horseman' WHERE `entry` IN (28653, 28788); UPDATE `creature_template` SET `ScriptName`='npc_ros_dark_rider' WHERE `entry`=28768; +UPDATE `creature_template` SET `ScriptName`='npc_dkc1_gothik' WHERE `entry`=28658; /* */ /* ZONE */ diff --git a/sql/world_spell_full.sql b/sql/world_spell_full.sql index 503b5f0bc2e..c1a59dd43c2 100644 --- a/sql/world_spell_full.sql +++ b/sql/world_spell_full.sql @@ -1579,12 +1579,6 @@ spell4 = VALUES(spell4); -- Three-seat mammoth UPDATE creature_template SET VehicleId = 312 WHERE entry IN (31857,31858,31861,31862,32212,32213,32633,32640); --- Horses for quest 12680 / not sure if its offilike -UPDATE creature_template SET `VehicleId`=200 WHERE `entry` IN (28605,28606,28607); - --- Vehicle and summon spell(summon npc 28788) for Acherus Deathcharger -UPDATE creature_template SET `spell1`=52362, `VehicleId`=200 WHERE `entry`=28782; - -- -------- -- Death Knight -- -------- @@ -1611,8 +1605,26 @@ INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES (52124, 1, 28655); UPDATE `creature_template` SET spell1=52372,spell2=52373,spell3=52374,spell4=52375 WHERE `entry`=28406; +-- death charger +DELETE FROM spell_area WHERE spell = 52693; +INSERT INTO spell_area (`spell`, `area`, `quest_start`, `quest_start_active`, `quest_end`, `aura_spell`, `racemask`, `gender`, `autocast`) VALUES +(52693, 4298, 12687, 1, 12687, 0, 0, 0, 1); + +-- Horses for quest 12680 / not sure if its offilike +UPDATE creature_template SET `VehicleId`=200 WHERE `entry` IN (28605,28606,28607); + +-- Vehicle and summon spell(summon npc 28788) for Acherus Deathcharger +UPDATE creature_template SET `spell1`=52362, `VehicleId`=200 WHERE `entry`=28782; + +-- gift of harvester +DELETE FROM `spell_script_target` WHERE entry IN +(52479); +INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES +(52479,1,28819), +(52479,1,28822); + -- frostbrood vanquisher -update creature_template set maxhealth = 133525, minhealth = 133525, maxmana = 51360, minmana = 51360, spell1 = 53114, spell2 = 53112, spell3=53110 where entry = 28670; +update creature_template set maxhealth = 133525, minhealth = 133525, maxmana = 51360, minmana = 51360, spell1 = 53114, spell2 = 53112, spell3=53110, VehicleId = 156 where entry = 28670; -- -------- diff --git a/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp b/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp index 0c08804b868..560d9196d95 100644 --- a/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp +++ b/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp @@ -598,6 +598,36 @@ CreatureAI* GetAI_npc_ros_dark_rider(Creature *_Creature) return new npc_ros_dark_riderAI(_Creature); } +struct TRINITY_DLL_DECL npc_dkc1_gothikAI : public ScriptedAI +{ + npc_dkc1_gothikAI(Creature *c) : ScriptedAI(c) {} + + void MoveInLineOfSight(Unit *who) + { + ScriptedAI::MoveInLineOfSight(who); + + if(who->GetEntry() == 28845 && me->IsWithinDistInMap(who, 10.0f)) + { + if(Unit *owner = who->GetOwner()) + { + if(owner->GetTypeId() == TYPEID_PLAYER) + { + if(CAST_PLR(owner)->GetQuestStatus(12698) == QUEST_STATUS_INCOMPLETE) + { + CAST_PLR(owner)->KilledMonster(28845, me->GetGUID()); + who->setDeathState(DEAD); + } + } + } + } + } +}; + +CreatureAI* GetAI_npc_dkc1_gothik(Creature *_Creature) +{ + return new npc_dkc1_gothikAI(_Creature); +} + void AddSC_the_scarlet_enclave() { Script *newscript; @@ -633,4 +663,9 @@ void AddSC_the_scarlet_enclave() newscript->Name="npc_ros_dark_rider"; newscript->GetAI = &GetAI_npc_ros_dark_rider; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="npc_dkc1_gothik"; + newscript->GetAI = &GetAI_npc_dkc1_gothik; + newscript->RegisterSelf(); }
\ No newline at end of file diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index c8021c8bb8b..239fe826087 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -324,8 +324,6 @@ void GameObject::Update(uint32 /*p_time*/) return; } - bool NeedDespawn = (goInfo->trap.charges != 0); - // Note: this hack with search required until GO casting not implemented // search unfriendly creature if(owner) // hunter trap @@ -359,7 +357,7 @@ void GameObject::Update(uint32 /*p_time*/) else m_cooldownTime = time(NULL) + 4; // 4 seconds - if(NeedDespawn) + if(owner) SetLootState(GO_JUST_DEACTIVATED); // can be despawned or destroyed if(IsBattleGroundTrap && ok->GetTypeId() == TYPEID_PLAYER) diff --git a/src/game/UpdateData.cpp b/src/game/UpdateData.cpp index 34547040cda..9273944b76c 100644 --- a/src/game/UpdateData.cpp +++ b/src/game/UpdateData.cpp @@ -105,7 +105,7 @@ void UpdateData::Compress(void* dst, uint32 *dst_size, void* src, int src_size) bool UpdateData::BuildPacket(WorldPacket *packet) { - ByteBuffer buf(m_data.size()); + ByteBuffer buf(m_data.size() + 10 + m_outOfRangeGUIDs.size()*8); buf << (uint32) (!m_outOfRangeGUIDs.empty() ? m_blockCount + 1 : m_blockCount); @@ -128,7 +128,7 @@ bool UpdateData::BuildPacket(WorldPacket *packet) if (pSize > 100 ) // compress large packets { - packet->resize(pSize); + packet->resize(pSize * 1.1f + 16); packet->put<uint32>(0, pSize); |