diff --git a/common/ruletypes.h b/common/ruletypes.h index 59726bcaa..136f55026 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -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, 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_REAL(Character, EnvironmentDamageMulipliter, 1) RULE_CATEGORY_END() RULE_CATEGORY( Mercs ) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 2059c262f..59f3a0059 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -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();