[int64] Support for HP / Mana / End / Damage / Hate (#2091)

* Initial int64 work

* Hate 64 bit

* Update special_attacks.cpp

* Aggro / Damage / Hate int64

* NPC edit adjustments

* Fix bot compile

* More int64 adjustments

* More int64 references

* npcedit references

* aggrozone

* More int64 changes

* More int64 changes for damage

* Many more damage int64 references

* More spell damage int64 conversions

* HealDamage

* Damage fully working

* Remove debug

* Add migration

* More int64 adjustments

* Much wow, many int64

* More int64

* PR adjustments
This commit is contained in:
Chris Miles
2022-05-07 22:32:02 -05:00
committed by GitHub
parent d9c41526e8
commit f201d4c999
57 changed files with 743 additions and 708 deletions
+14 -14
View File
@@ -165,7 +165,7 @@ void Mob::DoSpecialAttackDamage(Mob *who, EQ::skills::SkillType skill, int32 bas
if (who->GetSpecialAbility(IMMUNE_MELEE_EXCEPT_BANE) && skill != EQ::skills::SkillBackstab)
my_hit.damage_done = DMG_INVULNERABLE;
uint32 hate = my_hit.base_damage;
uint64 hate = my_hit.base_damage;
if (hate_override > -1)
hate = hate_override;
@@ -293,7 +293,7 @@ void Client::OPCombatAbility(const CombatAbility_Struct *ca_atk)
else
HasteMod = (100 - ClientHaste); //-100% haste = 1/2 as many attacks
int32 dmg = 0;
int64 dmg = 0;
int32 skill_reduction = GetSkillReuseTime(ca_atk->m_skill);
@@ -452,7 +452,7 @@ int Mob::MonkSpecialAttack(Mob *other, uint8 unchecked_type)
if (!other)
return 0;
int32 ndamage = 0;
int64 ndamage = 0;
int32 max_dmg = 0;
int32 min_dmg = 0;
int reuse = 0;
@@ -609,7 +609,7 @@ void Mob::RogueBackstab(Mob* other, bool min_damage, int ReuseTime)
if (!other)
return;
uint32 hate = 0;
uint64 hate = 0;
// make sure we can hit (bane, magical, etc)
if (IsClient()) {
@@ -839,8 +839,8 @@ void Mob::DoArcheryAttackDmg(Mob *other, const EQ::ItemInstance *RangeWeapon, co
LogCombat("Ranged attack hit [{}]", other->GetName());
uint32 hate = 0;
int TotalDmg = 0;
uint64 hate = 0;
int64 TotalDmg = 0;
int WDmg = 0;
int ADmg = 0;
if (!weapon_damage) {
@@ -941,7 +941,7 @@ void Mob::DoArcheryAttackDmg(Mob *other, const EQ::ItemInstance *RangeWeapon, co
}
bool Mob::TryProjectileAttack(Mob *other, const EQ::ItemData *item, EQ::skills::SkillType skillInUse,
uint16 weapon_dmg, const EQ::ItemInstance *RangeWeapon,
uint64 weapon_dmg, const EQ::ItemInstance *RangeWeapon,
const EQ::ItemInstance *Ammo, int AmmoSlot, float speed, bool DisableProcs)
{
if (!other)
@@ -1704,7 +1704,7 @@ void NPC::DoClassAttacks(Mob *target) {
if(level >= RuleI(Combat, NPCBashKickLevel)){
if(zone->random.Roll(75)) { //tested on live, warrior mobs both kick and bash, kick about 75% of the time, casting doesn't seem to make a difference.
DoAnim(animKick, 0, false);
int32 dmg = GetBaseSkillDamage(EQ::skills::SkillKick);
int64 dmg = GetBaseSkillDamage(EQ::skills::SkillKick);
if (GetWeaponDamage(target, boots) <= 0) {
dmg = DMG_INVULNERABLE;
@@ -1716,7 +1716,7 @@ void NPC::DoClassAttacks(Mob *target) {
}
else {
DoAnim(animTailRake, 0, false);
int32 dmg = GetBaseSkillDamage(EQ::skills::SkillBash);
int64 dmg = GetBaseSkillDamage(EQ::skills::SkillBash);
if (GetWeaponDamage(target, (const EQ::ItemData*)nullptr) <= 0)
dmg = DMG_INVULNERABLE;
@@ -1755,7 +1755,7 @@ void NPC::DoClassAttacks(Mob *target) {
//kick
if(level >= RuleI(Combat, NPCBashKickLevel)){
DoAnim(animKick, 0, false);
int32 dmg = GetBaseSkillDamage(EQ::skills::SkillKick);
int64 dmg = GetBaseSkillDamage(EQ::skills::SkillKick);
if (GetWeaponDamage(target, boots) <= 0)
dmg = DMG_INVULNERABLE;
@@ -1771,7 +1771,7 @@ void NPC::DoClassAttacks(Mob *target) {
case PALADIN: case PALADINGM:{
if(level >= RuleI(Combat, NPCBashKickLevel)){
DoAnim(animTailRake, 0, false);
int32 dmg = GetBaseSkillDamage(EQ::skills::SkillBash);
int64 dmg = GetBaseSkillDamage(EQ::skills::SkillBash);
if (GetWeaponDamage(target, (const EQ::ItemData*)nullptr) <= 0)
dmg = DMG_INVULNERABLE;
@@ -1865,7 +1865,7 @@ void Client::DoClassAttacks(Mob *ca_target, uint16 skill, bool IsRiposte)
if(skill_to_use == -1)
return;
int dmg = GetBaseSkillDamage(static_cast<EQ::skills::SkillType>(skill_to_use), GetTarget());
int64 dmg = GetBaseSkillDamage(static_cast<EQ::skills::SkillType>(skill_to_use), GetTarget());
if (skill_to_use == EQ::skills::SkillBash) {
if (ca_target!=this) {
@@ -2222,8 +2222,8 @@ void Mob::DoMeleeSkillAttackDmg(Mob *other, uint16 weapon_damage, EQ::skills::Sk
if (skillinuse == EQ::skills::SkillBegging)
skillinuse = EQ::skills::SkillOffense;
int damage = 0;
uint32 hate = 0;
int64 damage = 0;
uint64 hate = 0;
if (hate == 0 && weapon_damage > 1)
hate = weapon_damage;