Core/Scripts: added some OVERRIDEs
This commit is contained in:
1 parent
1887fa28a0
commit
a0c637f52a
5 files changed
+34
-32
No files matched your search
@@ -1732,22 +1732,22 @@ bool Pet::resetTalents()
|
||||
return true;
|
||||
}
|
||||
|
||||
void Pet::resetTalentsForAllPetsOf(Player* owner, Pet* online_pet /*= NULL*/)
|
||||
void Pet::resetTalentsForAllPetsOf(Player* owner, Pet* onlinePet /*= NULL*/)
|
||||
{
|
||||
// not need after this call
|
||||
if (owner->ToPlayer()->HasAtLoginFlag(AT_LOGIN_RESET_PET_TALENTS))
|
||||
owner->ToPlayer()->RemoveAtLoginFlag(AT_LOGIN_RESET_PET_TALENTS, true);
|
||||
if (owner->HasAtLoginFlag(AT_LOGIN_RESET_PET_TALENTS))
|
||||
owner->RemoveAtLoginFlag(AT_LOGIN_RESET_PET_TALENTS, true);
|
||||
|
||||
// reset for online
|
||||
if (online_pet)
|
||||
online_pet->resetTalents();
|
||||
if (onlinePet)
|
||||
onlinePet->resetTalents();
|
||||
|
||||
// now need only reset for offline pets (all pets except online case)
|
||||
uint32 except_petnumber = online_pet ? online_pet->GetCharmInfo()->GetPetNumber() : 0;
|
||||
uint32 exceptPetNumber = onlinePet ? onlinePet->GetCharmInfo()->GetPetNumber() : 0;
|
||||
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_PET);
|
||||
stmt->setUInt32(0, owner->GetGUIDLow());
|
||||
stmt->setUInt32(1, except_petnumber);
|
||||
stmt->setUInt32(1, exceptPetNumber);
|
||||
PreparedQueryResult resultPets = CharacterDatabase.Query(stmt);
|
||||
|
||||
// no offline pets
|
||||
@@ -1756,7 +1756,7 @@ void Pet::resetTalentsForAllPetsOf(Player* owner, Pet* online_pet /*= NULL*/)
|
||||
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PET_SPELL_LIST);
|
||||
stmt->setUInt32(0, owner->GetGUIDLow());
|
||||
stmt->setUInt32(1, except_petnumber);
|
||||
stmt->setUInt32(1, exceptPetNumber);
|
||||
PreparedQueryResult result = CharacterDatabase.Query(stmt);
|
||||
|
||||
if (!result)
|
||||
|
||||
@@ -60,11 +60,6 @@ class instance_magisters_terrace : public InstanceMapScript
|
||||
public:
|
||||
instance_magisters_terrace() : InstanceMapScript("instance_magisters_terrace", 585) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
return new instance_magisters_terrace_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
struct instance_magisters_terrace_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_magisters_terrace_InstanceMapScript(Map* map) : InstanceScript(map) {}
|
||||
@@ -311,6 +306,11 @@ public:
|
||||
felCristalIndex = value;
|
||||
}
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
|
||||
{
|
||||
return new instance_magisters_terrace_InstanceMapScript(map);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_instance_magisters_terrace()
|
||||
|
||||
@@ -226,9 +226,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/ = NULL, uint32 /*miscvalue1*/ = 0)
|
||||
bool CheckAchievementCriteriaMeet(uint32 criteriaId, Player const* /*source*/, Unit const* /*target = NULL*/, uint32 /*miscValue1 = 0*/) OVERRIDE
|
||||
{
|
||||
switch (criteria_id)
|
||||
switch (criteriaId)
|
||||
{
|
||||
case ACHIEV_CRITERIA_MANY_WHELPS_10_PLAYER: // Criteria for achievement 4403: Many Whelps! Handle It! (10 player) Hatch 50 eggs in 10s
|
||||
case ACHIEV_CRITERIA_MANY_WHELPS_25_PLAYER: // Criteria for achievement 4406: Many Whelps! Handle It! (25 player) Hatch 50 eggs in 10s
|
||||
|
||||
@@ -19,21 +19,14 @@
|
||||
#include "InstanceScript.h"
|
||||
#include "steam_vault.h"
|
||||
|
||||
/* Steam Vaults encounters:
|
||||
1 - Hydromancer Thespia Event
|
||||
2 - Mekgineer Steamrigger Event
|
||||
3 - Warlord Kalithresh Event
|
||||
*/
|
||||
|
||||
class go_main_chambers_access_panel : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_main_chambers_access_panel() : GameObjectScript("go_main_chambers_access_panel") { }
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go) OVERRIDE
|
||||
{
|
||||
InstanceScript* instance = go->GetInstanceScript();
|
||||
|
||||
if (!instance)
|
||||
return false;
|
||||
|
||||
@@ -168,7 +161,7 @@ class instance_steam_vault : public InstanceMapScript
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
std::ostringstream saveStream;
|
||||
saveStream << GetBossSaveData();
|
||||
saveStream << "S V " << GetBossSaveData();
|
||||
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
return saveStream.str();
|
||||
@@ -184,15 +177,24 @@ class instance_steam_vault : public InstanceMapScript
|
||||
|
||||
OUT_LOAD_INST_DATA(str);
|
||||
|
||||
char dataHead1, dataHead2;
|
||||
|
||||
std::istringstream loadStream(str);
|
||||
for (uint32 i = 0; i < EncounterCount; ++i)
|
||||
loadStream >> dataHead1 >> dataHead2;
|
||||
|
||||
if (dataHead1 == 'S' && dataHead2 == 'V')
|
||||
{
|
||||
uint32 tmpState;
|
||||
loadStream >> tmpState;
|
||||
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
|
||||
tmpState = NOT_STARTED;
|
||||
SetBossState(i, EncounterState(tmpState));
|
||||
for (uint32 i = 0; i < EncounterCount; ++i)
|
||||
{
|
||||
uint32 tmpState;
|
||||
loadStream >> tmpState;
|
||||
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
|
||||
tmpState = NOT_STARTED;
|
||||
SetBossState(i, EncounterState(tmpState));
|
||||
}
|
||||
}
|
||||
else
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
@@ -206,7 +208,7 @@ class instance_steam_vault : public InstanceMapScript
|
||||
uint8 DistillerState;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
|
||||
{
|
||||
return new instance_steam_vault_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
+1
-1
@@ -121,7 +121,7 @@ class instance_ramparts : public InstanceMapScript
|
||||
bool spawned;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
|
||||
{
|
||||
return new instance_ramparts_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user