[int64] Windows Compile Fixes (#2155)

* int64 windows aftermath

* Perl.

Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
This commit is contained in:
Chris Miles 2022-05-07 23:45:52 -05:00 committed by GitHub
parent b27428a6d8
commit fd7b15abb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 7 deletions

View File

@ -192,7 +192,7 @@ int Lua_NPC::GetPrimaryFaction() {
return self->GetPrimaryFaction();
}
int Lua_NPC::GetNPCHate(Lua_Mob ent) {
int64 Lua_NPC::GetNPCHate(Lua_Mob ent) {
Lua_Safe_Call_Int();
return self->GetNPCHate(ent);
}
@ -660,7 +660,7 @@ float Lua_NPC::GetNPCStat(const char* identifier)
}
luabind::scope lua_register_npc() {
return luabind::class_<Lua_NPC, Lua_Mob>("NPC")
return luabind::class_<Lua_NPC, Lua_Mob>("NPC")
.def(luabind::constructor<>())
.def("AI_SetRoambox", (void(Lua_NPC::*)(float,float,float,float,float))&Lua_NPC::AI_SetRoambox)
.def("AI_SetRoambox", (void(Lua_NPC::*)(float,float,float,float,float,uint32,uint32))&Lua_NPC::AI_SetRoambox)
@ -711,7 +711,7 @@ luabind::scope lua_register_npc() {
.def("GetMaxWp", (int(Lua_NPC::*)(void))&Lua_NPC::GetMaxWp)
.def("GetMinDMG", (uint32(Lua_NPC::*)(void))&Lua_NPC::GetMinDMG)
.def("GetNPCFactionID", (int(Lua_NPC::*)(void))&Lua_NPC::GetNPCFactionID)
.def("GetNPCHate", (int(Lua_NPC::*)(Lua_Mob))&Lua_NPC::GetNPCHate)
.def("GetNPCHate", (int64(Lua_NPC::*)(Lua_Mob))&Lua_NPC::GetNPCHate)
.def("GetNPCSpellsID", (int(Lua_NPC::*)(void))&Lua_NPC::GetNPCSpellsID)
.def("GetNPCSpellsID", (int(Lua_NPC::*)(void))&Lua_NPC::GetNPCSpellsID)
.def("GetNPCStat", (float(Lua_NPC::*)(const char*))&Lua_NPC::GetNPCStat)

View File

@ -65,7 +65,7 @@ public:
uint32 GetSp2();
int GetNPCFactionID();
int GetPrimaryFaction();
int GetNPCHate(Lua_Mob ent);
int64 GetNPCHate(Lua_Mob ent);
bool IsOnHatelist(Lua_Mob ent);
void SetNPCFactionID(int id);
uint32 GetMaxDMG();

View File

@ -271,7 +271,7 @@ public:
inline int32 GetPrimaryFaction() const
{ return primary_faction; }
int32 GetNPCHate(Mob *in_ent)
int64 GetNPCHate(Mob *in_ent)
{ return hate_list.GetEntHateAmount(in_ent); }
bool IsOnHatelist(Mob *p)

View File

@ -484,7 +484,7 @@ XS(XS_NPC_GetNPCHate) {
Perl_croak(aTHX_ "Usage: NPC::GetNPCHate(THIS, Mob* entity)"); // @categories Hate and Aggro
{
NPC *THIS;
int32 RETVAL;
int64 RETVAL;
dXSTARG;
Mob *in_ent;
VALIDATE_THIS_IS_NPC;

View File

@ -2046,7 +2046,7 @@ void Mob::Taunt(NPC *who, bool always_succeed, int chance_bonus, bool FromSpell,
if (success) {
if (hate_top && hate_top != this) {
int newhate = (who->GetNPCHate(hate_top) - who->GetNPCHate(this)) + 1 + bonus_hate;
int64 newhate = (who->GetNPCHate(hate_top) - who->GetNPCHate(this)) + 1 + bonus_hate;
who->CastToNPC()->AddToHateList(this, newhate);
success = true;
} else {