mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-03 07:02:30 +00:00
Some servers apparently relied on the HP update spam
This commit is contained in:
parent
56b57d2ca6
commit
ea18238a12
@ -113,6 +113,7 @@ RULE_INT(Character, TradeskillUpMakePoison, 2) // Make Poison skillup rate adjus
|
|||||||
RULE_INT(Character, TradeskillUpPottery, 4) // Pottery skillup rate adjust. Lower is faster.
|
RULE_INT(Character, TradeskillUpPottery, 4) // Pottery skillup rate adjust. Lower is faster.
|
||||||
RULE_INT(Character, TradeskillUpResearch, 1) // Research skillup rate adjust. Lower is faster.
|
RULE_INT(Character, TradeskillUpResearch, 1) // Research skillup rate adjust. Lower is faster.
|
||||||
RULE_INT(Character, TradeskillUpTinkering, 2) // Tinkering skillup rate adjust. Lower is faster.
|
RULE_INT(Character, TradeskillUpTinkering, 2) // Tinkering skillup rate adjust. Lower is faster.
|
||||||
|
RULE_BOOL(Character, SpamHPUpdates, false) // if your server has stupid amounts of HP that causes client display issues, turn this on!
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY(Mercs)
|
RULE_CATEGORY(Mercs)
|
||||||
|
|||||||
@ -3693,11 +3693,11 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
|
|||||||
|
|
||||||
//send an HP update if we are hurt
|
//send an HP update if we are hurt
|
||||||
if(GetHP() < GetMaxHP())
|
if(GetHP() < GetMaxHP())
|
||||||
SendHPUpdate(!iBuffTic); // the OP_Damage actually updates the client in these cases, so we skill them
|
SendHPUpdate(!iBuffTic); // the OP_Damage actually updates the client in these cases, so we skip the HP update for them
|
||||||
} //end `if damage was done`
|
} //end `if damage was done`
|
||||||
|
|
||||||
//send damage packet...
|
//send damage packet...
|
||||||
if(!iBuffTic) { //buff ticks do not send damage, instead they just call SendHPUpdate(), which is done below
|
if(!iBuffTic) { //buff ticks do not send damage, instead they just call SendHPUpdate(), which is done above
|
||||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_Damage, sizeof(CombatDamage_Struct));
|
EQApplicationPacket* outapp = new EQApplicationPacket(OP_Damage, sizeof(CombatDamage_Struct));
|
||||||
CombatDamage_Struct* a = (CombatDamage_Struct*)outapp->pBuffer;
|
CombatDamage_Struct* a = (CombatDamage_Struct*)outapp->pBuffer;
|
||||||
a->target = GetID();
|
a->target = GetID();
|
||||||
|
|||||||
@ -1354,8 +1354,9 @@ void Mob::SendHPUpdate(bool skip_self)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool dospam = RuleB(Character, SpamHPUpdates);
|
||||||
// send to self - we need the actual hps here
|
// send to self - we need the actual hps here
|
||||||
if(IsClient() && !skip_self) {
|
if(IsClient() && (!skip_self || dospam)) {
|
||||||
EQApplicationPacket* hp_app2 = new EQApplicationPacket(OP_HPUpdate,sizeof(SpawnHPUpdate_Struct));
|
EQApplicationPacket* hp_app2 = new EQApplicationPacket(OP_HPUpdate,sizeof(SpawnHPUpdate_Struct));
|
||||||
SpawnHPUpdate_Struct* ds = (SpawnHPUpdate_Struct*)hp_app2->pBuffer;
|
SpawnHPUpdate_Struct* ds = (SpawnHPUpdate_Struct*)hp_app2->pBuffer;
|
||||||
ds->cur_hp = CastToClient()->GetHP() - itembonuses.HP;
|
ds->cur_hp = CastToClient()->GetHP() - itembonuses.HP;
|
||||||
@ -1364,7 +1365,8 @@ void Mob::SendHPUpdate(bool skip_self)
|
|||||||
CastToClient()->QueuePacket(hp_app2);
|
CastToClient()->QueuePacket(hp_app2);
|
||||||
safe_delete(hp_app2);
|
safe_delete(hp_app2);
|
||||||
}
|
}
|
||||||
ResetHPUpdateTimer(); // delay the timer
|
if (!dospam)
|
||||||
|
ResetHPUpdateTimer(); // delay the timer
|
||||||
}
|
}
|
||||||
|
|
||||||
// this one just warps the mob to the current location
|
// this one just warps the mob to the current location
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user