diff --git a/changelog.txt b/changelog.txt index 37dea5b08..acd869afa 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- == 09/03/2014 == Secrets: Identified the routines needed to augment items in RoF. Currently, only Insert and Remove are supported. Swap and Destroy do not work due to missing functions related to the cursor. +demonstar55: Added work around command to show numhits on your buffs (#shownumhits) == 09/02/2014 == Secrets: Identified OP_GuildPromote for RoF clients. diff --git a/zone/client.cpp b/zone/client.cpp index 222acc094..30bf428a3 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -8334,3 +8334,15 @@ void Client::ExpeditionSay(const char *str, int ExpID) { mysql_free_result(result); } + +void Client::ShowNumHits() +{ + uint32 buffcount = GetMaxTotalSlots(); + for (uint32 buffslot = 0; buffslot < buffcount; buffslot++) { + const Buffs_Struct &curbuff = buffs[buffslot]; + if (curbuff.spellid != SPELL_UNKNOWN && curbuff.numhits) + Message(0, "You have %d hits left on %s", curbuff.numhits, GetSpellName(curbuff.spellid)); + } + return; +} + diff --git a/zone/client.h b/zone/client.h index 6c298ba15..9d6de336a 100644 --- a/zone/client.h +++ b/zone/client.h @@ -1200,7 +1200,9 @@ public: void SetEngagedRaidTarget(bool value) { EngagedRaidTarget = value; } bool GetEngagedRaidTarget() const { return EngagedRaidTarget; } - + + void ShowNumHits(); // work around function for numhits not showing on buffs + protected: friend class Mob; void CalcItemBonuses(StatBonuses* newbon); diff --git a/zone/command.cpp b/zone/command.cpp index fbec3b0b3..eff53fcf3 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -453,7 +453,8 @@ int command_init(void) { command_add("merchant_open_shop", "Opens a merchants shop", 100, command_merchantopenshop) || command_add("open_shop", nullptr, 100, command_merchantopenshop) || command_add("merchant_close_shop", "Closes a merchant shop", 100, command_merchantcloseshop) || - command_add("close_shop", nullptr, 100, command_merchantcloseshop) + command_add("close_shop", nullptr, 100, command_merchantcloseshop) || + command_add("shownumhits", "Shows buffs numhits for yourself.", 0, command_shownumhits) ) { command_deinit(); @@ -11555,3 +11556,9 @@ void command_merchantcloseshop(Client *c, const Seperator *sep) merchant->CastToNPC()->MerchantCloseShop(); } + +void command_shownumhits(Client *c, const Seperator *sep) +{ + c->ShowNumHits(); + return; +} diff --git a/zone/command.h b/zone/command.h index 6a880625e..4846dd09d 100644 --- a/zone/command.h +++ b/zone/command.h @@ -325,6 +325,7 @@ void command_showspellslist(Client *c, const Seperator *sep); void command_npctype_cache(Client *c, const Seperator *sep); void command_merchantopenshop(Client *c, const Seperator *sep); void command_merchantcloseshop(Client *c, const Seperator *sep); +void command_shownumhits(Client *c, const Seperator *sep); #ifdef EQPROFILE void command_profiledump(Client *c, const Seperator *sep);