diff --git a/changelog.txt b/changelog.txt index 6c42a23ca..887731565 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,12 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 7/1/2015 == +Akkadius: Fix an issue where emote messages would overflow the buffer of 256 by increasing the size and changing some of the initialization +Akkadius: Added a custom Health Update message that will display in the middle of the players screen, to enable this server wide you must enable rule 'Character:MarqueeHPUpdates' +Akkadius: (Haynar) Fixed some runspeed issues with Perl and LUA scripts +Akkadius: (Haynar) Updated #showstats and #npcstats for new speed calcs to display speeds again in familiar float format. +Akkadius: (Haynar) Improved client movement while AI Controlled, such as feared and charmed. Movement will be much smoother from clients perspective. + == 06/12/2015 == Uleat: Adjusted SessionStats to better reflect a sister implementation diff --git a/common/ruletypes.h b/common/ruletypes.h index 372224f2c..6aea84edf 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -114,6 +114,7 @@ RULE_INT(Character, TradeskillUpPottery, 4) // Pottery skillup rate adjust. Lowe RULE_INT(Character, TradeskillUpResearch, 1) // Research skillup rate adjust. Lower is faster. RULE_INT(Character, TradeskillUpTinkering, 2) // Tinkering skillup rate adjust. Lower is faster. RULE_BOOL(Character, SpamHPUpdates, false) // if your server has stupid amounts of HP that causes client display issues, turn this on! +RULE_BOOL(Character, MarqueeHPUpdates, false) // Will show Health % in center of screen < 100% RULE_CATEGORY_END() RULE_CATEGORY(Mercs) diff --git a/common/version.h b/common/version.h index 00f74e801..3631639d5 100644 --- a/common/version.h +++ b/common/version.h @@ -30,7 +30,7 @@ Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9084 +#define CURRENT_BINARY_DATABASE_VERSION 9085 #define COMPILE_DATE __DATE__ #define COMPILE_TIME __TIME__ #ifndef WIN32 diff --git a/utils/sql/db_update_manifest.txt b/utils/sql/db_update_manifest.txt index c2f8242c3..2e94567ad 100644 --- a/utils/sql/db_update_manifest.txt +++ b/utils/sql/db_update_manifest.txt @@ -338,6 +338,7 @@ 9082|2015_05_25_npc_types_texture_fields.sql|SHOW COLUMNS FROM `npc_types` LIKE 'armtexture'|empty| 9083|2015_06_07_aa_update.sql|SHOW COLUMNS FROM `character_alternate_abilities` LIKE 'charges'|empty| 9084|2015_06_30_runspeed_adjustments.sql|SELECT `runspeed` FROM `npc_types` WHERE `runspeed` > 3|not_empty| +9085|2015_7_1_Marquee_Rule.sql|SELECT * FROM `rule_values` WHERE `rule_name` LIKE '%Character:MarqueeHPUpdates%'|empty| # Upgrade conditions: diff --git a/utils/sql/git/required/2015_7_1_Marquee_Rule.sql b/utils/sql/git/required/2015_7_1_Marquee_Rule.sql new file mode 100644 index 000000000..039a34412 --- /dev/null +++ b/utils/sql/git/required/2015_7_1_Marquee_Rule.sql @@ -0,0 +1 @@ +INSERT INTO `rule_values` (`rule_name`, `rule_value`, `notes`) VALUES ('Character:MarqueeHPUpdates', 'false', 'Will show Health % in center of screen < 100%'); \ No newline at end of file diff --git a/zone/attack.cpp b/zone/attack.cpp index a810ccebb..921353dff 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -3582,6 +3582,9 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons //final damage has been determined. SetHP(GetHP() - damage); + + if (IsClient()) + this->CastToClient()->SendHPUpdateMarquee(); if(HasDied()) { bool IsSaved = false; diff --git a/zone/client.cpp b/zone/client.cpp index 7c73db5cc..ee9dfad22 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -8639,3 +8639,16 @@ void Client::QuestReward(Mob* target, uint32 copper, uint32 silver, uint32 gold, QueuePacket(outapp, false, Client::CLIENT_CONNECTED); safe_delete(outapp); } + +void Client::SendHPUpdateMarquee(){ + if (!RuleB(Character, MarqueeHPUpdates)) + return; + + /* Health Update Marquee Display: Custom*/ + uint32 health_percentage = (uint32)(this->cur_hp * 100 / this->max_hp); + if (health_percentage == 100) + return; + + std::string health_update_notification = StringFormat("Health: %u%%", health_percentage); + this->SendMarqueeMessage(15, 510, 0, 3000, 3000, health_update_notification); +} \ No newline at end of file diff --git a/zone/client.h b/zone/client.h index 4f31aee23..e70190ccc 100644 --- a/zone/client.h +++ b/zone/client.h @@ -1261,6 +1261,9 @@ public: void QuestReward(Mob* target, uint32 copper = 0, uint32 silver = 0, uint32 gold = 0, uint32 platinum = 0, uint32 itemid = 0, uint32 exp = 0, bool faction = false); void ResetHPUpdateTimer() { hpupdate_timer.Start(); } + + void SendHPUpdateMarquee(); + protected: friend class Mob; void CalcItemBonuses(StatBonuses* newbon); diff --git a/zone/mob.cpp b/zone/mob.cpp index ac5e37a8e..4c2966097 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -1357,6 +1357,9 @@ void Mob::SendHPUpdate(bool skip_self) bool dospam = RuleB(Character, SpamHPUpdates); // send to self - we need the actual hps here if(IsClient() && (!skip_self || dospam)) { + + this->CastToClient()->SendHPUpdateMarquee(); + EQApplicationPacket* hp_app2 = new EQApplicationPacket(OP_HPUpdate,sizeof(SpawnHPUpdate_Struct)); SpawnHPUpdate_Struct* ds = (SpawnHPUpdate_Struct*)hp_app2->pBuffer; ds->cur_hp = CastToClient()->GetHP() - itembonuses.HP;