Implement Rule Based Environment damage multiplier

This commit is contained in:
Akkadius
2015-01-30 18:12:00 -06:00
parent d93f3bdd9e
commit ee57568c5d
2 changed files with 18 additions and 16 deletions
+17 -16
View File
@@ -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();