mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
Core/Quests: Remove CastedCreatureOrGO method
- Remove EAI's ACTION_T_CAST_EVENT and ACTION_T_CAST_EVENT_ALL - Remove SAI's SMART_ACTION_CALL_CASTEDCREATUREORGO - Split QUEST_TRINITY_FLAGS_KILL_OR_CAST into QUEST_TRINITY_FLAGS_KILL and QUEST_TRINITY_FLAGS_CAST - Assign QUEST_TRINITY_FLAGS_CAST to all the quests that were using RequiredSpellCastX - (unrelated) Fix a warning in Player.cpp - Replace CastedCreatureOrGO usage in scripts by KilledMonsterCredit TODO: Convert the two EAI scripts commented out in the .sql to proper SAI Closes #10667
This commit is contained in:
@@ -208,16 +208,12 @@ public:
|
||||
uint32 creaturecount = quest->RequiredNpcOrGoCount[i];
|
||||
|
||||
if (creature > 0)
|
||||
{
|
||||
if (CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(creature))
|
||||
for (uint16 z = 0; z < creaturecount; ++z)
|
||||
player->KilledMonster(cInfo, 0);
|
||||
}
|
||||
else if (creature < 0)
|
||||
{
|
||||
for (uint16 z = 0; z < creaturecount; ++z)
|
||||
player->CastedCreatureOrGO(creature, 0, 0);
|
||||
}
|
||||
player->KillCreditGO(creature, 0);
|
||||
}
|
||||
|
||||
// If the quest requires reputation to complete
|
||||
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
if (Creature* stillpine = go->FindNearestCreature(NPC_PRINCESS_STILLPINE, 25, true))
|
||||
{
|
||||
stillpine->GetMotionMaster()->MovePoint(1, go->GetPositionX(), go->GetPositionY()-15, go->GetPositionZ());
|
||||
player->CastedCreatureOrGO(NPC_PRINCESS_STILLPINE, 0, SPELL_OPENING_PRINCESS_STILLPINE_CREDIT);
|
||||
player->KilledMonsterCredit(NPC_PRINCESS_STILLPINE, stillpine->GetGUID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1899,7 +1899,7 @@ class spell_unlocking_zuluheds_chains : public SpellScriptLoader
|
||||
{
|
||||
if (GetCaster()->GetTypeId() == TYPEID_PLAYER)
|
||||
if (Creature* karynaku = GetCaster()->FindNearestCreature(NPC_KARYNAKU, 15.0f))
|
||||
GetCaster()->ToPlayer()->CastedCreatureOrGO(NPC_KARYNAKU, karynaku->GetGUID(), GetSpellInfo()->Id);
|
||||
GetCaster()->ToPlayer()->KilledMonsterCredit(NPC_KARYNAKU, karynaku->GetGUID());
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
|
||||
Reference in New Issue
Block a user