REPO: Code-style clean-ups
* Fixed pMap->map * Fixed pInstance->instance * Fixed pInsta->instance * Fixed pQuest->quest * Fixed pWho->who * Fixed pTarget->target * Fixed pGo->go ~DEVNOTES: Handlers/QuestHandler.cpp still needs to be cleaned...
This commit is contained in:
1 parent
c89b1f6989
commit
5b4c7783c2
324 files changed
+4886
-4849
No files matched your search
@@ -875,9 +875,9 @@ void GameObject::Respawn()
|
||||
}
|
||||
}
|
||||
|
||||
bool GameObject::ActivateToQuest(Player* pTarget) const
|
||||
bool GameObject::ActivateToQuest(Player* target) const
|
||||
{
|
||||
if (pTarget->HasQuestForGO(GetEntry()))
|
||||
if (target->HasQuestForGO(GetEntry()))
|
||||
return true;
|
||||
|
||||
if (!sObjectMgr->IsGameObjectForQuests(GetEntry()))
|
||||
@@ -888,13 +888,13 @@ bool GameObject::ActivateToQuest(Player* pTarget) const
|
||||
// scan GO chest with loot including quest items
|
||||
case GAMEOBJECT_TYPE_CHEST:
|
||||
{
|
||||
if (LootTemplates_Gameobject.HaveQuestLootForPlayer(GetGOInfo()->GetLootId(), pTarget))
|
||||
if (LootTemplates_Gameobject.HaveQuestLootForPlayer(GetGOInfo()->GetLootId(), target))
|
||||
{
|
||||
//TODO: fix this hack
|
||||
//look for battlegroundAV for some objects which are only activated after mine gots captured by own team
|
||||
if (GetEntry() == BG_AV_OBJECTID_MINE_N || GetEntry() == BG_AV_OBJECTID_MINE_S)
|
||||
if (Battleground* bg = pTarget->GetBattleground())
|
||||
if (bg->GetTypeID(true) == BATTLEGROUND_AV && !(((BattlegroundAV*)bg)->PlayerCanDoMineQuest(GetEntry(), pTarget->GetTeam())))
|
||||
if (Battleground* bg = target->GetBattleground())
|
||||
if (bg->GetTypeID(true) == BATTLEGROUND_AV && !(((BattlegroundAV*)bg)->PlayerCanDoMineQuest(GetEntry(), target->GetTeam())))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -902,13 +902,13 @@ bool GameObject::ActivateToQuest(Player* pTarget) const
|
||||
}
|
||||
case GAMEOBJECT_TYPE_GENERIC:
|
||||
{
|
||||
if (GetGOInfo()->_generic.questID == -1 || pTarget->GetQuestStatus(GetGOInfo()->_generic.questID) == QUEST_STATUS_INCOMPLETE)
|
||||
if (GetGOInfo()->_generic.questID == -1 || target->GetQuestStatus(GetGOInfo()->_generic.questID) == QUEST_STATUS_INCOMPLETE)
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
case GAMEOBJECT_TYPE_GOOBER:
|
||||
{
|
||||
if (GetGOInfo()->goober.questId == -1 || pTarget->GetQuestStatus(GetGOInfo()->goober.questId) == QUEST_STATUS_INCOMPLETE)
|
||||
if (GetGOInfo()->goober.questId == -1 || target->GetQuestStatus(GetGOInfo()->goober.questId) == QUEST_STATUS_INCOMPLETE)
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user