[Bug Fix] Fix data type of GetAggroCount() (#3470)

# Notes
- This is an `unsigned int`, not an `int`, so this fixes that.
This commit is contained in:
Alex King 2023-07-03 01:10:27 -04:00 committed by GitHub
parent a633784f78
commit dc28c8d485
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 7 deletions

View File

@ -4530,7 +4530,7 @@ bool Client::IsLeadershipEXPOn() {
} }
int Client::GetAggroCount() { uint32 Client::GetAggroCount() {
return AggroCount; return AggroCount;
} }

View File

@ -1347,7 +1347,7 @@ public:
bool CanEnterZone(const std::string& zone_short_name = "", int16 instance_version = -1); bool CanEnterZone(const std::string& zone_short_name = "", int16 instance_version = -1);
int GetAggroCount(); uint32 GetAggroCount();
void IncrementAggroCount(bool raid_target = false); void IncrementAggroCount(bool raid_target = false);
void DecrementAggroCount(); void DecrementAggroCount();
void SendPVPStats(); void SendPVPStats();
@ -1903,7 +1903,7 @@ private:
int8 last_reported_mana_percent; int8 last_reported_mana_percent;
int8 last_reported_endurance_percent; int8 last_reported_endurance_percent;
unsigned int AggroCount; // How many mobs are aggro on us. uint32 AggroCount; // How many mobs are aggro on us.
bool ooc_regen; bool ooc_regen;
float AreaHPRegen; float AreaHPRegen;

View File

@ -1449,7 +1449,7 @@ void Lua_Client::UnFreeze() {
self->SendAppearancePacket(AT_Anim, ANIM_STAND); self->SendAppearancePacket(AT_Anim, ANIM_STAND);
} }
int Lua_Client::GetAggroCount() { uint32 Lua_Client::GetAggroCount() {
Lua_Safe_Call_Int(); Lua_Safe_Call_Int();
return self->GetAggroCount(); return self->GetAggroCount();
} }
@ -3191,7 +3191,7 @@ luabind::scope lua_register_client() {
.def("GetAFK", (int(Lua_Client::*)(void))&Lua_Client::GetAFK) .def("GetAFK", (int(Lua_Client::*)(void))&Lua_Client::GetAFK)
.def("GetAccountAge", (int(Lua_Client::*)(void))&Lua_Client::GetAccountAge) .def("GetAccountAge", (int(Lua_Client::*)(void))&Lua_Client::GetAccountAge)
.def("GetAccountFlag", (std::string(Lua_Client::*)(std::string))&Lua_Client::GetAccountFlag) .def("GetAccountFlag", (std::string(Lua_Client::*)(std::string))&Lua_Client::GetAccountFlag)
.def("GetAggroCount", (int(Lua_Client::*)(void))&Lua_Client::GetAggroCount) .def("GetAggroCount", (uint32(Lua_Client::*)(void))&Lua_Client::GetAggroCount)
.def("GetAllMoney", (uint64(Lua_Client::*)(void))&Lua_Client::GetAllMoney) .def("GetAllMoney", (uint64(Lua_Client::*)(void))&Lua_Client::GetAllMoney)
.def("GetAlternateCurrencyValue", (int(Lua_Client::*)(uint32))&Lua_Client::GetAlternateCurrencyValue) .def("GetAlternateCurrencyValue", (int(Lua_Client::*)(uint32))&Lua_Client::GetAlternateCurrencyValue)
.def("GetAnon", (int(Lua_Client::*)(void))&Lua_Client::GetAnon) .def("GetAnon", (int(Lua_Client::*)(void))&Lua_Client::GetAnon)

View File

@ -367,7 +367,7 @@ public:
void AssignToInstance(int instance_id); void AssignToInstance(int instance_id);
void Freeze(); void Freeze();
void UnFreeze(); void UnFreeze();
int GetAggroCount(); uint32 GetAggroCount();
uint64 GetCarriedMoney(); uint64 GetCarriedMoney();
uint32 GetCarriedPlatinum(); uint32 GetCarriedPlatinum();
uint64 GetAllMoney(); uint64 GetAllMoney();

View File

@ -1432,7 +1432,7 @@ void Perl_Client_UnFreeze(Client* self)
self->SendAppearancePacket(AT_Anim, ANIM_STAND); self->SendAppearancePacket(AT_Anim, ANIM_STAND);
} }
int Perl_Client_GetAggroCount(Client* self) // @categories Script Utility, Hate and Aggro uint32 Perl_Client_GetAggroCount(Client* self) // @categories Script Utility, Hate and Aggro
{ {
return self->GetAggroCount(); return self->GetAggroCount();
} }