mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
[INT64] Further int64 cleanup in Perl SetHP() and GetSpellHPBonuses() in Perl/Lua. (#2222)
This commit is contained in:
parent
d493a6627b
commit
11369247b1
@ -497,7 +497,7 @@ int64 Lua_Mob::GetItemHPBonuses() {
|
||||
return self->GetItemHPBonuses();
|
||||
}
|
||||
|
||||
int Lua_Mob::GetSpellHPBonuses() {
|
||||
int64 Lua_Mob::GetSpellHPBonuses() {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->GetSpellHPBonuses();
|
||||
}
|
||||
|
||||
@ -126,7 +126,7 @@ public:
|
||||
int64 GetHP();
|
||||
int64 GetMaxHP();
|
||||
int64 GetItemHPBonuses();
|
||||
int GetSpellHPBonuses();
|
||||
int64 GetSpellHPBonuses();
|
||||
double GetWalkspeed();
|
||||
double GetRunspeed();
|
||||
int GetCasterLevel(int spell_id);
|
||||
|
||||
@ -981,8 +981,8 @@ int64 Mob::GetItemHPBonuses() {
|
||||
return item_hp;
|
||||
}
|
||||
|
||||
int32 Mob::GetSpellHPBonuses() {
|
||||
int32 spell_hp = 0;
|
||||
int64 Mob::GetSpellHPBonuses() {
|
||||
int64 spell_hp = 0;
|
||||
spell_hp = spellbonuses.HP;
|
||||
spell_hp += spell_hp * spellbonuses.MaxHPChange / 10000;
|
||||
return spell_hp;
|
||||
|
||||
@ -608,7 +608,7 @@ public:
|
||||
virtual int64 GetMaxEndurance() const { return 0; }
|
||||
virtual void SetEndurance(int32 newEnd) { return; }
|
||||
int64 GetItemHPBonuses();
|
||||
int32 GetSpellHPBonuses();
|
||||
int64 GetSpellHPBonuses();
|
||||
virtual const int64& SetMana(int64 amount);
|
||||
inline float GetManaRatio() const { return max_mana == 0 ? 100 :
|
||||
((static_cast<float>(current_mana) / max_mana) * 100); }
|
||||
|
||||
@ -770,7 +770,7 @@ XS(XS_Mob_SetHP) {
|
||||
Perl_croak(aTHX_ "Usage: Mob::SetHP(THIS, int64 hp)"); // @categories Stats and Attributes
|
||||
{
|
||||
Mob *THIS;
|
||||
int64 hp = (int32) SvIV(ST(1));
|
||||
int64 hp = (int64) SvIV(ST(1));
|
||||
VALIDATE_THIS_IS_MOB;
|
||||
THIS->SetHP(hp);
|
||||
}
|
||||
@ -1630,7 +1630,7 @@ XS(XS_Mob_GetSpellHPBonuses) {
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetSpellHPBonuses(THIS)"); // @categories Spells and Disciplines
|
||||
{
|
||||
Mob *THIS;
|
||||
int32 RETVAL;
|
||||
int64 RETVAL;
|
||||
dXSTARG;
|
||||
VALIDATE_THIS_IS_MOB;
|
||||
RETVAL = THIS->GetSpellHPBonuses();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user