Switched some heal messages to StringIDs

This commit is contained in:
Michael Cook (mackal) 2014-02-28 17:43:37 -05:00
parent d525d23217
commit 5c7484cea2
3 changed files with 35 additions and 38 deletions

View File

@ -125,6 +125,7 @@
#define YOU_ARE_PROTECTED 424 //%1 tries to cast a spell on you, but you are protected. #define YOU_ARE_PROTECTED 424 //%1 tries to cast a spell on you, but you are protected.
#define TARGET_RESISTED 425 //Your target resisted the %1 spell. #define TARGET_RESISTED 425 //Your target resisted the %1 spell.
#define YOU_RESIST 426 //You resist the %1 spell! #define YOU_RESIST 426 //You resist the %1 spell!
#define YOU_CRIT_HEAL 427 //You perform an exceptional heal! (%1)
#define YOU_CRIT_BLAST 428 //You deliver a critical blast! (%1) #define YOU_CRIT_BLAST 428 //You deliver a critical blast! (%1)
#define SUMMONING_CORPSE 429 //Summoning your corpse. #define SUMMONING_CORPSE 429 //Summoning your corpse.
#define SUMMONING_CORPSE_OTHER 430 //Summoning %1's corpse. #define SUMMONING_CORPSE_OTHER 430 //Summoning %1's corpse.
@ -169,6 +170,7 @@
#define OTHER_REGAIN_CAST 1033 //%1 regains concentration and continues casting. #define OTHER_REGAIN_CAST 1033 //%1 regains concentration and continues casting.
#define GENERIC_SHOUT 1034 //%1 shouts '%2' #define GENERIC_SHOUT 1034 //%1 shouts '%2'
#define GENERIC_EMOTE 1036 //%1 %2 #define GENERIC_EMOTE 1036 //%1 %2
#define OTHER_CRIT_HEAL 1039 //%1 performs an exceptional heal! (%2)
#define OTHER_CRIT_BLAST 1040 //%1 delivers a critical blast! (%2) #define OTHER_CRIT_BLAST 1040 //%1 delivers a critical blast! (%2)
#define NPC_ENRAGE_START 1042 //%1 has become ENRAGED. #define NPC_ENRAGE_START 1042 //%1 has become ENRAGED.
#define NPC_ENRAGE_END 1043 //%1 is no longer enraged. #define NPC_ENRAGE_END 1043 //%1 is no longer enraged.

View File

@ -3851,24 +3851,17 @@ void Mob::HealDamage(uint32 amount, Mob* caster) {
} }
} }
if(amount > (maxhp - curhp)) if(amount > (maxhp - curhp))
acthealed = (maxhp - curhp); acthealed = (maxhp - curhp);
else else
acthealed = amount; acthealed = amount;
char *TempString = nullptr;
MakeAnyLenString(&TempString, "%d", acthealed);
if (acthealed > 100) { if (acthealed > 100) {
if (caster) { if (caster) {
Message_StringID(MT_NonMelee, YOU_HEALED, caster->GetCleanName(), TempString); Message_StringID(MT_NonMelee, YOU_HEALED, caster->GetCleanName(), itoa(acthealed));
if(caster != this){ if (caster != this)
caster->Message_StringID(MT_NonMelee, YOU_HEAL, GetCleanName(), TempString); caster->Message_StringID(MT_NonMelee, YOU_HEAL, GetCleanName(), itoa(acthealed));
} } else {
}
else{
Message(MT_NonMelee, "You have been healed for %d points of damage.", acthealed); Message(MT_NonMelee, "You have been healed for %d points of damage.", acthealed);
} }
} }
@ -3882,7 +3875,6 @@ void Mob::HealDamage(uint32 amount, Mob* caster) {
SendHPUpdate(); SendHPUpdate();
} }
safe_delete_array(TempString);
} }
//proc chance includes proc bonus //proc chance includes proc bonus

View File

@ -299,8 +299,11 @@ int32 Client::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
value += value*target->GetHealRate(spell_id, this)/100; value += value*target->GetHealRate(spell_id, this)/100;
if (Critical) if (Critical) {
entity_list.MessageClose(this, false, 100, MT_SpellCrits, "%s performs an exceptional heal! (%d)", GetName(), value); entity_list.MessageClose_StringID(this, true, 100, MT_SpellCrits,
OTHER_CRIT_HEAL, GetName(), itoa(value));
Message_StringID(MT_SpellCrits, YOU_CRIT_HEAL, itoa(value));
}
return value; return value;
} }