mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-12-01 21:13:04 +08:00
chore (core): Clean up (#15977)
* chore (core): Clean up * Update SmartScript.cpp * more clean up * Update boss_xt002.cpp
This commit is contained in:
@@ -229,7 +229,7 @@ bool DBUpdater<T>::Update(DatabaseWorkerPool<T>& pool, std::string_view modulesL
|
|||||||
|
|
||||||
if (!is_directory(sourceDirectory))
|
if (!is_directory(sourceDirectory))
|
||||||
{
|
{
|
||||||
LOG_ERROR("sql.updates", "DBUpdater: The given source directory {} does not exist, change the path to the directory where your sql directory exists (for example c:\\source\\trinitycore). Shutting down.",
|
LOG_ERROR("sql.updates", "DBUpdater: The given source directory {} does not exist, change the path to the directory where your sql directory exists (for example c:\\source\\azerothcore). Shutting down.",
|
||||||
sourceDirectory.generic_string());
|
sourceDirectory.generic_string());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1613,7 +1613,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||||||
e.GetTargetType() == SMART_TARGET_CLOSEST_CREATURE || e.GetTargetType() == SMART_TARGET_CLOSEST_GAMEOBJECT ||
|
e.GetTargetType() == SMART_TARGET_CLOSEST_CREATURE || e.GetTargetType() == SMART_TARGET_CLOSEST_GAMEOBJECT ||
|
||||||
e.GetTargetType() == SMART_TARGET_OWNER_OR_SUMMONER || e.GetTargetType() == SMART_TARGET_ACTION_INVOKER ||
|
e.GetTargetType() == SMART_TARGET_OWNER_OR_SUMMONER || e.GetTargetType() == SMART_TARGET_ACTION_INVOKER ||
|
||||||
e.GetTargetType() == SMART_TARGET_CLOSEST_ENEMY || e.GetTargetType() == SMART_TARGET_CLOSEST_FRIENDLY ||
|
e.GetTargetType() == SMART_TARGET_CLOSEST_ENEMY || e.GetTargetType() == SMART_TARGET_CLOSEST_FRIENDLY ||
|
||||||
e.GetTargetType() == SMART_TARGET_SELF || e.GetTargetType() == SMART_TARGET_STORED) // Xinef: bieda i rozpierdol TC)*/
|
e.GetTargetType() == SMART_TARGET_SELF || e.GetTargetType() == SMART_TARGET_STORED)) */
|
||||||
{
|
{
|
||||||
// we want to move to random element
|
// we want to move to random element
|
||||||
if (!targets.empty())
|
if (!targets.empty())
|
||||||
|
|||||||
@@ -288,7 +288,6 @@ void SmartAIMgr::LoadSmartAIFromDB()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// xinef: rozpierdol tc, niedojeby ze szok
|
|
||||||
if (temp.action.type == SMART_ACTION_MOVE_TO_POS)
|
if (temp.action.type == SMART_ACTION_MOVE_TO_POS)
|
||||||
if (temp.target.type == SMART_TARGET_SELF && (std::fabs(temp.target.x) > 200.0f || std::fabs(temp.target.y) > 200.0f || std::fabs(temp.target.z) > 200.0f))
|
if (temp.target.type == SMART_TARGET_SELF && (std::fabs(temp.target.x) > 200.0f || std::fabs(temp.target.y) > 200.0f || std::fabs(temp.target.z) > 200.0f))
|
||||||
temp.target.type = SMART_TARGET_POSITION;
|
temp.target.type = SMART_TARGET_POSITION;
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ static ChatSubCommandMap COMMAND_MAP;
|
|||||||
if (std::holds_alternative<std::monostate>(cmd->_help))
|
if (std::holds_alternative<std::monostate>(cmd->_help))
|
||||||
cmd->_help.emplace<std::string>(help);
|
cmd->_help.emplace<std::string>(help);
|
||||||
else
|
else
|
||||||
LOG_ERROR("sql.sql", "Table `command` contains legacy help text for command '{}', which uses `trinity_string`. Skipped.", name);
|
LOG_ERROR("sql.sql", "Table `command` contains legacy help text for command '{}', which uses `acore_string`. Skipped.", name);
|
||||||
} while (result->NextRow());
|
} while (result->NextRow());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -642,7 +642,7 @@ void Unit::UpdateSplinePosition()
|
|||||||
transport->CalculatePassengerPosition(loc.x, loc.y, loc.z, &loc.orientation);
|
transport->CalculatePassengerPosition(loc.x, loc.y, loc.z, &loc.orientation);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Xinef: this is bullcrap, if we had spline running update orientation along with position
|
// Xinef: if we had spline running update orientation along with position
|
||||||
//if (HasUnitState(UNIT_STATE_CANNOT_TURN))
|
//if (HasUnitState(UNIT_STATE_CANNOT_TURN))
|
||||||
// loc.orientation = GetOrientation();
|
// loc.orientation = GetOrientation();
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ void WorldSession::HandlePetAction(WorldPacket& recvData)
|
|||||||
// xinef: allow to dissmis dead pets
|
// xinef: allow to dissmis dead pets
|
||||||
if ((*itr)->GetEntry() == pet->GetEntry() && ((*itr)->IsAlive() || (flag == ACT_COMMAND && spellId == COMMAND_ABANDON)))
|
if ((*itr)->GetEntry() == pet->GetEntry() && ((*itr)->IsAlive() || (flag == ACT_COMMAND && spellId == COMMAND_ABANDON)))
|
||||||
controlled.push_back(*itr);
|
controlled.push_back(*itr);
|
||||||
// xinef: mirror image blizzard crappness
|
// xinef: mirror image blizzard
|
||||||
else if ((*itr)->GetEntry() == NPC_MIRROR_IMAGE && flag == ACT_COMMAND && spellId == COMMAND_FOLLOW)
|
else if ((*itr)->GetEntry() == NPC_MIRROR_IMAGE && flag == ACT_COMMAND && spellId == COMMAND_FOLLOW)
|
||||||
{
|
{
|
||||||
(*itr)->InterruptNonMeleeSpells(false);
|
(*itr)->InterruptNonMeleeSpells(false);
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class Aura;
|
|||||||
// AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK set - aura is recalculated or is just applied/removed - need to redo all things related to m_amount
|
// AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK set - aura is recalculated or is just applied/removed - need to redo all things related to m_amount
|
||||||
// AURA_EFFECT_HANDLE_CHANGE_AMOUNT_SEND_FOR_CLIENT_MASK - logical or of above conditions
|
// AURA_EFFECT_HANDLE_CHANGE_AMOUNT_SEND_FOR_CLIENT_MASK - logical or of above conditions
|
||||||
// AURA_EFFECT_HANDLE_STAT - set when stats are reapplied
|
// AURA_EFFECT_HANDLE_STAT - set when stats are reapplied
|
||||||
// such checks will Speedup trinity change amount/send for client operations
|
// such checks will Speedup azerothcore change amount/send for client operations
|
||||||
// because for change amount operation packets will not be send
|
// because for change amount operation packets will not be send
|
||||||
// aura effect handlers shouldn't contain any AuraEffect or Aura object modifications
|
// aura effect handlers shouldn't contain any AuraEffect or Aura object modifications
|
||||||
|
|
||||||
|
|||||||
@@ -891,7 +891,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Original TC Notes from Refactor vvv
|
// Original TC Notes from Refactor vvv
|
||||||
//ToDo: use a new trinity_string for this commands
|
//ToDo: use a new acore_string for this commands
|
||||||
handler->PSendSysMessage(LANG_COMMAND_IMPORT_SUCCESS);
|
handler->PSendSysMessage(LANG_COMMAND_IMPORT_SUCCESS);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -587,7 +587,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// tc use updateAI, while we have movementinform :)
|
// tc use updateAI, while we have movementinform
|
||||||
void MovementInform(uint32 type, uint32 /*param*/) override
|
void MovementInform(uint32 type, uint32 /*param*/) override
|
||||||
{
|
{
|
||||||
if (type == POINT_MOTION_TYPE)
|
if (type == POINT_MOTION_TYPE)
|
||||||
@@ -787,7 +787,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// tc they use updateAI, while we have movementinform :)
|
// tc they use updateAI, while we have movementinform
|
||||||
void MovementInform(uint32 type, uint32 /*param*/) override
|
void MovementInform(uint32 type, uint32 /*param*/) override
|
||||||
{
|
{
|
||||||
if (type == POINT_MOTION_TYPE)
|
if (type == POINT_MOTION_TYPE)
|
||||||
|
|||||||
Reference in New Issue
Block a user