Add #shownumhits workaround command to show numhits

This commit is contained in:
Michael Cook (mackal)
2014-09-03 23:50:23 -04:00
parent 891952eb79
commit 22742b6a25
5 changed files with 25 additions and 2 deletions
+12
View File
@@ -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;
}
+3 -1
View File
@@ -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);
+8 -1
View File
@@ -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;
}
+1
View File
@@ -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);