From f26d303ee1824e5a2099cff4abaa3a21c52d21ac Mon Sep 17 00:00:00 2001 From: Trevius Date: Thu, 5 Feb 2015 22:34:55 -0600 Subject: [PATCH] Fixed Environmental Damage for RoF2. --- changelog.txt | 3 +++ common/patches/rof2_structs.h | 5 +++-- zone/client_packet.cpp | 8 ++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/changelog.txt b/changelog.txt index 9494adfce..6e37c6513 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 02/05/2015 == +Trevius: Fixed Environmental Damage for RoF2. + == 02/03/2015 == Trevius: Crashfix for TempName() when numbers are passed at the end of the name. Uleat: Tweaking of item type exclusions to alleviate strobing conditions with light sources diff --git a/common/patches/rof2_structs.h b/common/patches/rof2_structs.h index dd9bfb587..9ef524f55 100644 --- a/common/patches/rof2_structs.h +++ b/common/patches/rof2_structs.h @@ -2865,7 +2865,7 @@ struct SetRunMode_Struct { }; // EnvDamage is EnvDamage2 without a few bytes at the end. -// Size: 37 bytes +// Size: 39 bytes struct EnvDamage2_Struct { /*0000*/ uint32 id; /*0004*/ uint16 unknown4; @@ -2877,7 +2877,8 @@ struct EnvDamage2_Struct { /*0031*/ uint16 unknown31; // New to Underfoot - Seen 66 /*0033*/ uint16 constant; // Always FFFF /*0035*/ uint16 unknown35; -/*0037*/ +/*0037*/ uint16 unknown37; +/*0039*/ }; //Bazaar Stuff diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 331c50435..95475f1ca 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -5516,7 +5516,7 @@ void Client::Handle_OP_EnvDamage(const EQApplicationPacket *app) if (damage < 0) damage = 31337; - if (admin >= minStatusToAvoidFalling && GetGM()){ + 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; @@ -5526,11 +5526,11 @@ void Client::Handle_OP_EnvDamage(const EQApplicationPacket *app) SetHP(GetHP() - 1);//needed or else the client wont acknowledge return; } - - else if (zone->GetZoneID() == 183 || zone->GetZoneID() == 184){ + else if (zone->GetZoneID() == 183 || zone->GetZoneID() == 184) { + // Hard coded tutorial and load zones for no fall damage return; } - else{ + else { SetHP(GetHP() - (damage * RuleR(Character, EnvironmentDamageMulipliter))); /* EVENT_ENVIRONMENTAL_DAMAGE */