mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Implement Rule Based Environment damage multiplier
This commit is contained in:
+17
-16
@@ -5504,16 +5504,6 @@ void Client::Handle_OP_EnvDamage(const EQApplicationPacket *app)
|
||||
return;
|
||||
}
|
||||
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;
|
||||
|
||||
@@ -5535,15 +5525,26 @@ void Client::Handle_OP_EnvDamage(const EQApplicationPacket *app)
|
||||
if (damage < 0)
|
||||
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;
|
||||
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)
|
||||
{
|
||||
mod_client_death_env();
|
||||
else if (zone->GetZoneID() == 183 || zone->GetZoneID() == 184){
|
||||
return;
|
||||
}
|
||||
else{
|
||||
SetHP(GetHP() - (damage * RuleR(Character, EnvironmentDamageMulipliter)));
|
||||
}
|
||||
|
||||
if (GetHP() <= 0) {
|
||||
mod_client_death_env();
|
||||
Death(0, 32000, SPELL_UNKNOWN, SkillHandtoHand);
|
||||
}
|
||||
SendHPUpdate();
|
||||
|
||||
Reference in New Issue
Block a user