Crit Spells to StringIDs

Some minor clean up
Fix an mlog message
This commit is contained in:
Michael Cook (mackal) 2014-02-28 02:25:17 -05:00
parent 16afa277de
commit cb633e4b6a
4 changed files with 35 additions and 29 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 TARGET_RESISTED 425 //Your target resisted the %1 spell.
#define YOU_RESIST 426 //You resist the %1 spell!
#define YOU_CRIT_BLAST 428 //You deliver a critical blast! (%1)
#define SUMMONING_CORPSE 429 //Summoning your corpse.
#define SUMMONING_CORPSE_OTHER 430 //Summoning %1's corpse.
#define MISSING_SPELL_COMP_ITEM 433 //You are missing %1.
@ -168,6 +169,7 @@
#define OTHER_REGAIN_CAST 1033 //%1 regains concentration and continues casting.
#define GENERIC_SHOUT 1034 //%1 shouts '%2'
#define GENERIC_EMOTE 1036 //%1 %2
#define OTHER_CRIT_BLAST 1040 //%1 delivers a critical blast! (%2)
#define NPC_ENRAGE_START 1042 //%1 has become ENRAGED.
#define NPC_ENRAGE_END 1043 //%1 is no longer enraged.
#define NPC_RAMPAGE 1044 //%1 goes on a RAMPAGE!

View File

@ -125,7 +125,9 @@ int32 Client::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) {
if(itembonuses.SpellDmg && spells[spell_id].classes[(GetClass()%16) - 1] >= GetLevel() - 5)
value -= GetExtraSpellAmt(spell_id, itembonuses.SpellDmg, value)*ratio/100;
entity_list.MessageClose(this, false, 100, MT_SpellCrits, "%s delivers a critical blast! (%d)", GetName(), -value);
entity_list.MessageClose_StringID(this, true, 100, MT_SpellCrits,
OTHER_CRIT_BLAST, GetName(), itoa(-value));
Message_StringID(MT_SpellCrits, YOU_CRIT_BLAST, itoa(-value));
return value;
}
@ -150,7 +152,7 @@ int32 Client::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) {
value -= GetExtraSpellAmt(spell_id, itembonuses.SpellDmg, value);
return value;
}
}
int32 Client::GetActDoTDamage(uint16 spell_id, int32 value, Mob* target) {

View File

@ -2824,7 +2824,8 @@ int32 Merc::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) {
value = (value * GetSpellScale() / 100);
entity_list.MessageClose(this, false, 100, MT_SpellCrits, "%s delivers a critical blast! (%d)", GetName(), -value);
entity_list.MessageClose_StringID(this, false, 100, MT_SpellCrits,
OTHER_CRIT_BLAST, GetName(), itoa(-value));
return value;
}

View File

@ -445,7 +445,8 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, uint16 slot,
casting_spell_resist_adjust = resist_adjust;
mlog(SPELLS__CASTING, "Spell %d: Casting time %d (orig %d), mana cost %d", orgcasttime, cast_time, mana_cost);
mlog(SPELLS__CASTING, "Spell %d: Casting time %d (orig %d), mana cost %d",
spell_id, cast_time, orgcasttime, mana_cost);
// cast time is 0, just finish it right now and be done with it
if(cast_time == 0) {