mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-09 08:17:56 +00:00
chore(Core/Scripting): cleanup unused code (#3473)
This commit is contained in:
@@ -359,7 +359,7 @@ bool AchievementCriteriaData::Meets(uint32 criteria_id, Player const* source, Un
|
|||||||
return false;
|
return false;
|
||||||
return target->getGender() == gender.gender;
|
return target->getGender() == gender.gender;
|
||||||
case ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT:
|
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:
|
case ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_DIFFICULTY:
|
||||||
{
|
{
|
||||||
if (source->GetMap()->IsRaid())
|
if (source->GetMap()->IsRaid())
|
||||||
|
|||||||
@@ -1326,13 +1326,13 @@ void ScriptMgr::OnShutdown()
|
|||||||
FOREACH_SCRIPT(WorldScript)->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);
|
ASSERT(source);
|
||||||
// target can be NULL.
|
// target can be NULL.
|
||||||
|
|
||||||
GET_SCRIPT_RET(AchievementCriteriaScript, scriptId, tmpscript, false);
|
GET_SCRIPT_RET(AchievementCriteriaScript, scriptId, tmpscript, false);
|
||||||
return tmpscript->OnCheck(source, target, criteria_id);
|
return tmpscript->OnCheck(source, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Player
|
// Player
|
||||||
|
|||||||
@@ -787,10 +787,6 @@ class AchievementCriteriaScript : public ScriptObject
|
|||||||
|
|
||||||
bool IsDatabaseBound() const { return true; }
|
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
|
// deprecated/legacy
|
||||||
virtual bool OnCheck(Player* /*source*/, Unit* /*target*/) { return true; };
|
virtual bool OnCheck(Player* /*source*/, Unit* /*target*/) { return true; };
|
||||||
};
|
};
|
||||||
@@ -1403,7 +1399,7 @@ class ScriptMgr
|
|||||||
|
|
||||||
public: /* AchievementCriteriaScript */
|
public: /* AchievementCriteriaScript */
|
||||||
|
|
||||||
bool OnCriteriaCheck(uint32 scriptId, Player* source, Unit* target, uint32 criteria_id);
|
bool OnCriteriaCheck(uint32 scriptId, Player* source, Unit* target);
|
||||||
|
|
||||||
public: /* PlayerScript */
|
public: /* PlayerScript */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user