mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-19 04:01:29 +00:00
Implement Rule Based Environment damage multiplier
This commit is contained in:
parent
d93f3bdd9e
commit
ee57568c5d
@ -101,6 +101,7 @@ RULE_INT ( Character, FoodLossPerUpdate, 35) // How much food/water you lose per
|
|||||||
RULE_INT ( Character, BaseInstrumentSoftCap, 36) // Softcap for instrument mods, 36 commonly referred to as "3.6" as well.
|
RULE_INT ( Character, BaseInstrumentSoftCap, 36) // Softcap for instrument mods, 36 commonly referred to as "3.6" as well.
|
||||||
RULE_INT ( Character, BaseRunSpeedCap, 158) // Base Run Speed Cap, on live it's 158% which will give you a runspeed of 1.580 hard capped to 225.
|
RULE_INT ( Character, BaseRunSpeedCap, 158) // Base Run Speed Cap, on live it's 158% which will give you a runspeed of 1.580 hard capped to 225.
|
||||||
RULE_INT ( Character, OrnamentationAugmentType, 20) //Ornamentation Augment Type
|
RULE_INT ( Character, OrnamentationAugmentType, 20) //Ornamentation Augment Type
|
||||||
|
RULE_REAL(Character, EnvironmentDamageMulipliter, 1)
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY( Mercs )
|
RULE_CATEGORY( Mercs )
|
||||||
|
|||||||
@ -5504,16 +5504,6 @@ void Client::Handle_OP_EnvDamage(const EQApplicationPacket *app)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
EnvDamage2_Struct* ed = (EnvDamage2_Struct*)app->pBuffer;
|
EnvDamage2_Struct* ed = (EnvDamage2_Struct*)app->pBuffer;
|
||||||
if (admin >= minStatusToAvoidFalling && GetGM()){
|
|
||||||
Message(13, "Your GM status protects you from %i points of type %i environmental damage.", ed->damage, ed->dmgtype);
|
|
||||||
SetHP(GetHP() - 1);//needed or else the client wont acknowledge
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (GetInvul()) {
|
|
||||||
Message(13, "Your invuln status protects you from %i points of type %i environmental damage.", ed->damage, ed->dmgtype);
|
|
||||||
SetHP(GetHP() - 1);//needed or else the client wont acknowledge
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int damage = ed->damage;
|
int damage = ed->damage;
|
||||||
|
|
||||||
@ -5535,15 +5525,26 @@ void Client::Handle_OP_EnvDamage(const EQApplicationPacket *app)
|
|||||||
if (damage < 0)
|
if (damage < 0)
|
||||||
damage = 31337;
|
damage = 31337;
|
||||||
|
|
||||||
else if (zone->GetZoneID() == 183 || zone->GetZoneID() == 184)
|
if (admin >= minStatusToAvoidFalling && GetGM()){
|
||||||
|
Message(13, "Your GM status protects you from %i points of type %i environmental damage.", ed->damage, ed->dmgtype);
|
||||||
|
SetHP(GetHP() - 1);//needed or else the client wont acknowledge
|
||||||
return;
|
return;
|
||||||
else
|
}
|
||||||
SetHP(GetHP() - damage);
|
else if (GetInvul()) {
|
||||||
|
Message(13, "Your invuln status protects you from %i points of type %i environmental damage.", ed->damage, ed->dmgtype);
|
||||||
|
SetHP(GetHP() - 1);//needed or else the client wont acknowledge
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (GetHP() <= 0)
|
else if (zone->GetZoneID() == 183 || zone->GetZoneID() == 184){
|
||||||
{
|
return;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
SetHP(GetHP() - (damage * RuleR(Character, EnvironmentDamageMulipliter)));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GetHP() <= 0) {
|
||||||
mod_client_death_env();
|
mod_client_death_env();
|
||||||
|
|
||||||
Death(0, 32000, SPELL_UNKNOWN, SkillHandtoHand);
|
Death(0, 32000, SPELL_UNKNOWN, SkillHandtoHand);
|
||||||
}
|
}
|
||||||
SendHPUpdate();
|
SendHPUpdate();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user