mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Rewrite parts of GameObject use for GO type 10, by NoFantasy.
--HG-- branch : trunk
This commit is contained in:
@@ -3278,36 +3278,7 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
|
||||
return;
|
||||
|
||||
case GAMEOBJECT_TYPE_GOOBER:
|
||||
// goober_scripts can be triggered if the player don't have the quest
|
||||
if (gameObjTarget->GetGOInfo()->goober.eventId)
|
||||
{
|
||||
sLog.outDebug("Goober ScriptStart id %u for GO %u", gameObjTarget->GetGOInfo()->goober.eventId,gameObjTarget->GetDBTableGUIDLow());
|
||||
player->GetMap()->ScriptsStart(sEventScripts, gameObjTarget->GetGOInfo()->goober.eventId, player, gameObjTarget);
|
||||
gameObjTarget->EventInform(gameObjTarget->GetGOInfo()->goober.eventId);
|
||||
}
|
||||
|
||||
// cast goober spell
|
||||
if (gameObjTarget->GetGOInfo()->goober.questId)
|
||||
///Quest require to be active for GO using
|
||||
if(player->GetQuestStatus(gameObjTarget->GetGOInfo()->goober.questId) != QUEST_STATUS_INCOMPLETE)
|
||||
return;
|
||||
|
||||
Script->GOHello(player, gameObjTarget);
|
||||
gameObjTarget->GetMap()->ScriptsStart(sGameObjectScripts, gameObjTarget->GetDBTableGUIDLow(), player, gameObjTarget);
|
||||
|
||||
gameObjTarget->AddUniqueUse(player);
|
||||
gameObjTarget->SetLootState(GO_JUST_DEACTIVATED);
|
||||
|
||||
//TODO? Objective counting called without spell check but with quest objective check
|
||||
// if send spell id then this line will duplicate to spell casting call (double counting)
|
||||
// So we or have this line and not required in quest_template have reqSpellIdN
|
||||
// or must remove this line and required in DB have data in quest_template have reqSpellIdN for all quest using cases.
|
||||
player->CastedCreatureOrGO(gameObjTarget->GetEntry(), gameObjTarget->GetGUID(), 0);
|
||||
|
||||
// triggering linked GO
|
||||
if(uint32 trapEntry = gameObjTarget->GetGOInfo()->goober.linkedTrapId)
|
||||
gameObjTarget->TriggeringLinkedGameObject(trapEntry,m_caster);
|
||||
|
||||
gameObjTarget->Use(m_caster);
|
||||
return;
|
||||
|
||||
case GAMEOBJECT_TYPE_CHEST:
|
||||
|
||||
Reference in New Issue
Block a user