chore(Core/Scripting): cleanup unused code (#3473)
This commit is contained in:
parent
ce8db433cf
commit
6a4b5ad1db
3 changed files with 4 additions and 8 deletions
|
|
@ -359,7 +359,7 @@ bool AchievementCriteriaData::Meets(uint32 criteria_id, Player const* source, Un
|
|||
return false;
|
||||
return target->getGender() == gender.gender;
|
||||
case ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT:
|
||||
return sScriptMgr->OnCriteriaCheck(ScriptId, const_cast<Player*>(source), const_cast<Unit*>(target), criteria_id);
|
||||
return sScriptMgr->OnCriteriaCheck(ScriptId, const_cast<Player*>(source), const_cast<Unit*>(target));
|
||||
case ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_DIFFICULTY:
|
||||
{
|
||||
if (source->GetMap()->IsRaid())
|
||||
|
|
|
|||
|
|
@ -1326,13 +1326,13 @@ void ScriptMgr::OnShutdown()
|
|||
FOREACH_SCRIPT(WorldScript)->OnShutdown();
|
||||
}
|
||||
|
||||
bool ScriptMgr::OnCriteriaCheck(uint32 scriptId, Player* source, Unit* target, uint32 criteria_id)
|
||||
bool ScriptMgr::OnCriteriaCheck(uint32 scriptId, Player* source, Unit* target)
|
||||
{
|
||||
ASSERT(source);
|
||||
// target can be NULL.
|
||||
|
||||
GET_SCRIPT_RET(AchievementCriteriaScript, scriptId, tmpscript, false);
|
||||
return tmpscript->OnCheck(source, target, criteria_id);
|
||||
return tmpscript->OnCheck(source, target);
|
||||
}
|
||||
|
||||
// Player
|
||||
|
|
|
|||
|
|
@ -787,10 +787,6 @@ class AchievementCriteriaScript : public ScriptObject
|
|||
|
||||
bool IsDatabaseBound() const { return true; }
|
||||
|
||||
// Called when an additional criteria is checked.
|
||||
virtual bool OnCheck(Player* source, Unit* target, uint32 /*criteria_id*/) {
|
||||
return OnCheck(source, target);
|
||||
}
|
||||
// deprecated/legacy
|
||||
virtual bool OnCheck(Player* /*source*/, Unit* /*target*/) { return true; };
|
||||
};
|
||||
|
|
@ -1403,7 +1399,7 @@ class ScriptMgr
|
|||
|
||||
public: /* AchievementCriteriaScript */
|
||||
|
||||
bool OnCriteriaCheck(uint32 scriptId, Player* source, Unit* target, uint32 criteria_id);
|
||||
bool OnCriteriaCheck(uint32 scriptId, Player* source, Unit* target);
|
||||
|
||||
public: /* PlayerScript */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue