diff --git a/zone/mob.h b/zone/mob.h index ca38653fa..7eff736ee 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -359,6 +359,7 @@ public: void SendIllusionWearChange(Client* c); int16 GetItemSlotToConsumeCharge(int32 spell_id, uint32 inventory_slot); bool CheckItemRaceClassDietyRestrictionsOnCast(uint32 inventory_slot); + bool IsFromTriggeredSpell(EQ::spells::CastingSlot slot, uint32 item_slot = 0xFFFFFFFF); //Bard bool ApplyBardPulse(int32 spell_id, Mob *spell_target, EQ::spells::CastingSlot slot); diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 01520dc3e..1a6f11692 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -8248,7 +8248,7 @@ void Mob::SendCastRestrictionMessage(int requirement_id, bool target_requirement */ - const char *msg = ""; + std::string msg = ""; if (target_requirement) { msg = "Your target does not meet the spell requirements. "; @@ -8265,1062 +8265,1062 @@ void Mob::SendCastRestrictionMessage(int requirement_id, bool target_requirement switch (requirement_id) { case IS_ANIMAL_OR_HUMANOID: - Message(Chat::Red, "%s This spell will only work on animals or humanoid creatures.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on animals or humanoid creatures.", msg).c_str()); break; case IS_DRAGON: - Message(Chat::Red, "%s This spell will only work on dragons.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on dragons.", msg).c_str()); break; case IS_ANIMAL_OR_INSECT: - Message(Chat::Red, "%s This spell will only work on animals or insects.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on animals or insects.", msg).c_str()); break; case IS_BODY_TYPE_MISC: - Message(Chat::Red, "%s This spell will only work on humanoids, lycanthropes, giants, Kael Drakkel giants, Coldain, animals, insects, constructs, dragons, Skyshrine dragons, Muramites, or creatures constructed from magic.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on humanoids, lycanthropes, giants, Kael Drakkel giants, Coldain, animals, insects, constructs, dragons, Skyshrine dragons, Muramites, or creatures constructed from magic.", msg).c_str()); break; case IS_BODY_TYPE_MISC2: - Message(Chat::Red, "%s This spell will only work on humanoids, lycanthropes, giants, Kael Drakkel giants, Coldain, animals, or insects.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on humanoids, lycanthropes, giants, Kael Drakkel giants, Coldain, animals, or insects.", msg).c_str()); break; case IS_PLANT: - Message(Chat::Red, "%s This spell will only work on plants.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on plants.", msg).c_str()); break; case IS_GIANT: - Message(Chat::Red, "%s This spell will only work on animals.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on animals.", msg).c_str()); break; case IS_NOT_ANIMAL_OR_HUMANOID: - Message(Chat::Red, "%s This spell will only work on targets that are neither animals or humanoid.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on targets that are neither animals or humanoid.", msg).c_str()); break; case IS_BIXIE: - Message(Chat::Red, "%s This spell will only work on bixies.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on bixies.", msg).c_str()); break; case IS_HARPY: - Message(Chat::Red, "%s This spell will only work on harpies.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on harpies.", msg).c_str()); break; case IS_GNOLL: - Message(Chat::Red, "%s This spell will only work on gnolls.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on gnolls.", msg).c_str()); break; case IS_SPORALI: - Message(Chat::Red, "%s This spell will only work on fungusoids.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on fungusoids.", msg).c_str()); break; case IS_KOBOLD: - Message(Chat::Red, "%s This spell will only work on kobolds.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on kobolds.", msg).c_str()); break; case IS_FROSTCRYPT_SHADE: - Message(Chat::Red, "%s This spell will only work on undead creatures or the Shades of Frostcrypt.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on undead creatures or the Shades of Frostcrypt.", msg).c_str()); break; case IS_DRAKKIN: - Message(Chat::Red, "%s This spell will only work on Drakkin.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on Drakkin.", msg).c_str()); break; case IS_UNDEAD_OR_VALDEHOLM_GIANT: - Message(Chat::Red, "%s This spell will only work on undead creatures or the inhabitants of Valdeholm.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on undead creatures or the inhabitants of Valdeholm.", msg).c_str()); break; case IS_ANIMAL_OR_PLANT: - Message(Chat::Red, "%s This spell will only work on plants or animals.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on plants or animals.", msg).c_str()); break; case IS_SUMMONED: - Message(Chat::Red, "%s This spell will only work on constructs, elementals, or summoned elemental minions.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on constructs, elementals, or summoned elemental minions.", msg).c_str()); break; case IS_WIZARD_USED_ON_MAGE_FIRE_PET: - Message(Chat::Red, "%s This spell will only work on wizards.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on wizards.", msg).c_str()); break; case IS_UNDEAD: - Message(Chat::Red, "%s This spell will only work on undead.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on undead.", msg).c_str()); break; case IS_NOT_UNDEAD_OR_SUMMONED_OR_VAMPIRE: - Message(Chat::Red, "%s This spell will only work on creatures that are not undead, constructs, elementals, or vampires.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on creatures that are not undead, constructs, elementals, or vampires.", msg).c_str()); break; case IS_FAE_OR_PIXIE: - Message(Chat::Red, "%s This spell will only work on Fae or pixies.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on Fae or pixies.", msg).c_str()); break; case IS_HUMANOID: - Message(Chat::Red, "%s This spell will only work on humanoids.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on humanoids.", msg).c_str()); break; case IS_UNDEAD_AND_HP_LESS_THAN_10_PCT: - Message(Chat::Red, "%s The Essence Extractor whirrs but does not light up.", msg); + Message(Chat::Red, fmt::format("{} The Essence Extractor whirrs but does not light up.", msg).c_str()); break; case IS_CLOCKWORK_AND_HP_LESS_THAN_45_PCT: - Message(Chat::Red, "%s This spell will only work on clockwork gnomes.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on clockwork gnomes.", msg).c_str()); break; case IS_WISP_AND_HP_LESS_THAN_10_PCT: - Message(Chat::Red, "%s This spell will only work on wisps at or below 10 pct of their maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on wisps at or below 10 pct of their maximum HP.", msg).c_str()); break; case IS_CLASS_MELEE_THAT_CAN_BASH_OR_KICK_EXCEPT_BARD: - Message(Chat::Red, "%s This spell will only work on non-bard targets that can bash or kick.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on non-bard targets that can bash or kick.", msg).c_str()); break; case IS_CLASS_PURE_MELEE: if (target_requirement) { - Message(Chat::Red, "%s This spell will only affect melee classes (warriors, monks, rogues, and berserkers).", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect melee classes (warriors, monks, rogues, and berserkers).", msg).c_str()); } else { - Message(Chat::Red, "%s This ability can only be used by melee classes (warriors, monks, rogues, and berserkers).", msg); + Message(Chat::Red, fmt::format("{} This ability can only be used by melee classes (warriors, monks, rogues, and berserkers).", msg).c_str()); } break; case IS_CLASS_PURE_CASTER: if (target_requirement) { - Message(Chat::Red, "%s This spell will only affect pure caster classes (necromancers, wizards, magicians, and enchanters).", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect pure caster classes (necromancers, wizards, magicians, and enchanters).", msg).c_str()); } else { - Message(Chat::Red, "%s This ability can only be used by pure caster classes (necromancers, wizards, magicians, and enchanters).", msg); + Message(Chat::Red, fmt::format("{} This ability can only be used by pure caster classes (necromancers, wizards, magicians, and enchanters).", msg).c_str()); } break; case IS_CLASS_HYBRID_CLASS: if (target_requirement) { - Message(Chat::Red, "%s This spell will only affect hybrid classes (paladins, rangers, shadow knights, bards, and beastlords).", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect hybrid classes (paladins, rangers, shadow knights, bards, and beastlords).", msg).c_str()); } else { - Message(Chat::Red, "%s This ability can only be used by hybrid classes (paladins, rangers, shadow knights, bards, and beastlords).", msg); + Message(Chat::Red, fmt::format("{} This ability can only be used by hybrid classes (paladins, rangers, shadow knights, bards, and beastlords).", msg).c_str()); } break; case IS_CLASS_WARRIOR: if (target_requirement) { - Message(Chat::Red, "%s This spell will only affect Warriors.", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect Warriors.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability can only be used by Warriors.", msg); + Message(Chat::Red, fmt::format("{} This ability can only be used by Warriors.", msg).c_str()); } break; case IS_CLASS_CLERIC: if (target_requirement) { - Message(Chat::Red, "%s This spell will only affect Clerics.", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect Clerics.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability can only be used by Clerics.", msg); + Message(Chat::Red, fmt::format("{} This ability can only be used by Clerics.", msg).c_str()); } break; case IS_CLASS_PALADIN: if (target_requirement) { - Message(Chat::Red, "%s This spell will only affect Paladins.", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect Paladins.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability can only be used by Paladins.", msg); + Message(Chat::Red, fmt::format("{} This ability can only be used by Paladins.", msg).c_str()); } break; case IS_CLASS_RANGER: if (target_requirement) { - Message(Chat::Red, "%s This spell will only affect Warriors.", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect Warriors.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability can only be used by Warriors.", msg); + Message(Chat::Red, fmt::format("{} This ability can only be used by Warriors.", msg).c_str()); } break; case IS_CLASS_SHADOWKNIGHT: if (target_requirement) { - Message(Chat::Red, "%s This spell will only affect Shadow Knights.", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect Shadow Knights.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability can only be used by Shadow Knights.", msg); + Message(Chat::Red, fmt::format("{} This ability can only be used by Shadow Knights.", msg).c_str()); } break; case IS_CLASS_DRUID: if (target_requirement) { - Message(Chat::Red, "%s This spell will only affect Druids.", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect Druids.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability can only be used by Druids.", msg); + Message(Chat::Red, fmt::format("{} This ability can only be used by Druids.", msg).c_str()); } break; case IS_CLASS_MONK: if (target_requirement) { - Message(Chat::Red, "%s This spell will only affect Monks.", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect Monks.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability can only be used by Monks.", msg); + Message(Chat::Red, fmt::format("{} This ability can only be used by Monks.", msg).c_str()); } break; case IS_CLASS_BARD: if (target_requirement) { - Message(Chat::Red, "%s This spell will only affect Bards.", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect Bards.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability can only be used by Bards..", msg); + Message(Chat::Red, fmt::format("{} This ability can only be used by Bards..", msg).c_str()); } break; case IS_CLASS_ROGUE: if (target_requirement) { - Message(Chat::Red, "%s This spell will only affect Rogues.", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect Rogues.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability can only be used by Rogues.", msg); + Message(Chat::Red, fmt::format("{} This ability can only be used by Rogues.", msg).c_str()); } break; case IS_CLASS_SHAMAN: if (target_requirement) { - Message(Chat::Red, "%s This spell will only affect Shamans.", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect Shamans.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability can only be used by Shamans.", msg); + Message(Chat::Red, fmt::format("{} This ability can only be used by Shamans.", msg).c_str()); } break; case IS_CLASS_NECRO: if (target_requirement) { - Message(Chat::Red, "%s This spell will only affect Necromancers.", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect Necromancers.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability can only be used by Necromancers.", msg); + Message(Chat::Red, fmt::format("{} This ability can only be used by Necromancers.", msg).c_str()); } break; case IS_CLASS_WIZARD: if (target_requirement) { - Message(Chat::Red, "%s This spell will only affect Wizards.", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect Wizards.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability can only be used by Wizards.", msg); + Message(Chat::Red, fmt::format("{} This ability can only be used by Wizards.", msg).c_str()); } break; case IS_CLASS_MAGE: if (target_requirement) { - Message(Chat::Red, "%s This spell will only affect Magicians.", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect Magicians.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability can only be used by Magicians.", msg); + Message(Chat::Red, fmt::format("{} This ability can only be used by Magicians.", msg).c_str()); } break; case IS_CLASS_ENCHANTER: if (target_requirement) { - Message(Chat::Red, "%s This spell will only affect Enchanters.", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect Enchanters.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability can only be used by Enchanters.", msg); + Message(Chat::Red, fmt::format("{} This ability can only be used by Enchanters.", msg).c_str()); } break; case IS_CLASS_BEASTLORD: if (target_requirement) { - Message(Chat::Red, "%s This spell will only affect Beastlords.", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect Beastlords.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability can only be used by Beastlords.", msg); + Message(Chat::Red, fmt::format("{} This ability can only be used by Beastlords.", msg).c_str()); } break; case IS_CLASS_BERSERKER: if (target_requirement) { - Message(Chat::Red, "%s This spell will only affect Berserkers.", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect Berserkers.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability can only be used by Berserkers.", msg); + Message(Chat::Red, fmt::format("{} This ability can only be used by Berserkers.", msg).c_str()); } break; case IS_CLASS_CLR_SHM_DRU: if (target_requirement) { - Message(Chat::Red, "%s This spell will only affect priest classes (clerics, druids, and shaman).", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect priest classes (clerics, druids, and shaman).", msg).c_str()); } else { - Message(Chat::Red, "%s This ability can only be used by priest classes (clerics, druids, and shaman).", msg); + Message(Chat::Red, fmt::format("{} This ability can only be used by priest classes (clerics, druids, and shaman).", msg).c_str()); } break; case IS_CLASS_NOT_WAR_PAL_SK: if (target_requirement) { - Message(Chat::Red, "%s This spell will not affect Warriors, Paladins, or Shadow Knights.", msg); + Message(Chat::Red, fmt::format("{} This spell will not affect Warriors, Paladins, or Shadow Knights.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability can only be used by Warriors, Paladins, or Shadow Knights.", msg); + Message(Chat::Red, fmt::format("{} This ability can only be used by Warriors, Paladins, or Shadow Knights.", msg).c_str()); } break; case IS_LEVEL_UNDER_100: - Message(Chat::Red, "%s This spell will not affect any target over level 100.", msg); + Message(Chat::Red, fmt::format("{} This spell will not affect any target over level 100.", msg).c_str()); break; case IS_NOT_RAID_BOSS: - Message(Chat::Red, "%s This spell will not affect raid bosses.", msg); + Message(Chat::Red, fmt::format("{} This spell will not affect raid bosses.", msg).c_str()); break; case IS_RAID_BOSS: - Message(Chat::Red, "%s This spell will only affect raid bosses.", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect raid bosses.", msg).c_str()); break; case FRENZIED_BURNOUT_ACTIVE: - Message(Chat::Red, "%s This spell will only cast if you have Frenzied Burnout active.", msg); + Message(Chat::Red, fmt::format("{} This spell will only cast if you have Frenzied Burnout active.", msg).c_str()); break; case FRENZIED_BURNOUT_NOT_ACTIVE: - Message(Chat::Red, "%s This spell will only cast if you do not have Frenzied Burnout active.", msg); + Message(Chat::Red, fmt::format("{} This spell will only cast if you do not have Frenzied Burnout active.", msg).c_str()); break; case IS_HP_ABOVE_75_PCT: - Message(Chat::Red, "%s Your taret's HP must be at or above 75 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your taret's HP must be at or above 75 pct of its maximum.", msg).c_str()); break; case IS_HP_LESS_THAN_20_PCT: - Message(Chat::Red, "%s Your target's HP must be at 20 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 20 pct of its maximum or below.", msg).c_str()); break; case IS_HP_LESS_THAN_50_PCT: - Message(Chat::Red, "%s Your target's HP must be at 50 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 50 pct of its maximum or below.", msg).c_str()); break; case IS_HP_LESS_THAN_75_PCT: - Message(Chat::Red, "%s Your target's HP must be at 75 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 75 pct of its maximum or below.", msg).c_str()); break; case IS_NOT_IN_COMBAT: - Message(Chat::Red, "%s This spell will only affect creatures that are not in combat.", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect creatures that are not in combat.", msg).c_str()); break; case HAS_AT_LEAST_1_PET_ON_HATELIST: - Message(Chat::Red, "%s Your target must have least 1 pet on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have least 1 pet on their hate list.", msg).c_str()); break; case HAS_AT_LEAST_2_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have least 2 pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have least 2 pets on their hate list.", msg).c_str()); break; case HAS_AT_LEAST_3_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have least 3 pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have least 3 pets on their hate list.", msg).c_str()); break; case HAS_AT_LEAST_4_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have least 4 pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have least 4 pets on their hate list.", msg).c_str()); break; case HAS_AT_LEAST_5_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have least 5 pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have least 5 pets on their hate list.", msg).c_str()); break; case HAS_AT_LEAST_6_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have least 6 pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have least 6 pets on their hate list.", msg).c_str()); break; case HAS_AT_LEAST_7_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have least 7 pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have least 7 pets on their hate list.", msg).c_str()); break; case HAS_AT_LEAST_8_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have least 8 pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have least 8 pets on their hate list.", msg).c_str()); break; case HAS_AT_LEAST_9_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have least 9 pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have least 9 pets on their hate list.", msg).c_str()); break; case HAS_AT_LEAST_10_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have least 10 pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have least 10 pets on their hate list.", msg).c_str()); break; case HAS_AT_LEAST_11_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have least 11 pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have least 11 pets on their hate list.", msg).c_str()); break; case HAS_AT_LEAST_12_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have least 12 pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have least 12 pets on their hate list.", msg).c_str()); break; case HAS_AT_LEAST_13_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have least 13 pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have least 13 pets on their hate list.", msg).c_str()); break; case HAS_AT_LEAST_14_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have least 14 pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have least 14 pets on their hate list.", msg).c_str()); break; case HAS_AT_LEAST_15_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have least 15 pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have least 15 pets on their hate list.", msg).c_str()); break; case HAS_AT_LEAST_16_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have least 16 pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have least 16 pets on their hate list.", msg).c_str()); break; case HAS_AT_LEAST_17_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have least 17 pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have least 17 pets on their hate list.", msg).c_str()); break; case HAS_AT_LEAST_18_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have least 18 pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have least 18 pets on their hate list.", msg).c_str()); break; case HAS_AT_LEAST_19_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have least 19 pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have least 19 pets on their hate list.", msg).c_str()); break; case HAS_AT_LEAST_20_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have least 20 pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have least 20 pets on their hate list.", msg).c_str()); break; case IS_HP_LESS_THAN_35_PCT: - Message(Chat::Red, "%s Your target's HP must be at 35 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 35 pct of its maximum or below.", msg).c_str()); break; case HAS_BETWEEN_1_TO_2_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have between 1 and 2 pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have between 1 and 2 pets on their hate list.", msg).c_str()); break; case HAS_BETWEEN_3_TO_5_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have between 3 and 5 pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have between 3 and 5 pets on their hate list.", msg).c_str()); break; case HAS_BETWEEN_6_TO_9_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have between 6 and 9 pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have between 6 and 9 pets on their hate list.", msg).c_str()); break; case HAS_BETWEEN_10_TO_14_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have between 10 and 14 pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have between 10 and 14 pets on their hate list.", msg).c_str()); break; case HAS_MORE_THAN_14_PETS_ON_HATELIST: - Message(Chat::Red, "%s Your target must have between 15 or more pets on their hate list.", msg); + Message(Chat::Red, fmt::format("{} Your target must have between 15 or more pets on their hate list.", msg).c_str()); break; case IS_CLASS_CHAIN_OR_PLATE: - Message(Chat::Red, "%s This spell will only affect plate or chain wearing classes.", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect plate or chain wearing classes.", msg).c_str()); break; case IS_HP_BETWEEN_5_AND_9_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be between 5 pct and 9 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be between 5 pct and 9 pct of its maximum.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be between 5 pct and 9 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be between 5 pct and 9 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BETWEEN_10_AND_14_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be between 10 pct and 14 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be between 10 pct and 14 pct of its maximum.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be between 10 pct and 14 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be between 10 pct and 14 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BETWEEN_15_AND_19_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be between 15 pct and 19 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be between 15 pct and 19 pct of its maximum.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be between 15 pct and 19 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be between 15 pct and 19 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BETWEEN_20_AND_24_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be between 20 pct and 54 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be between 20 pct and 54 pct of its maximum.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be between 20 pct and 24 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be between 20 pct and 24 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BETWEEN_25_AND_29_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be between 25 pct and 29 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be between 25 pct and 29 pct of its maximum.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be between 25 pct and 29 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be between 25 pct and 29 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BETWEEN_30_AND_34_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be between 30 pct and 34 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be between 30 pct and 34 pct of its maximum.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be between 30 pct and 34 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be between 30 pct and 34 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BETWEEN_35_AND_39_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be between 35 pct and 39 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be between 35 pct and 39 pct of its maximum.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be between 35 pct and 39 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be between 35 pct and 39 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BETWEEN_40_AND_44_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be between 40 pct and 44 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be between 40 pct and 44 pct of its maximum.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be between 40 pct and 44 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be between 40 pct and 44 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BETWEEN_45_AND_49_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be between 45 pct and 49 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be between 45 pct and 49 pct of its maximum.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be between 45 pct and 49 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be between 45 pct and 49 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BETWEEN_50_AND_54_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be between 50 pct and 54 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be between 50 pct and 54 pct of its maximum.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be between 50 pct and 54 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be between 50 pct and 54 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BETWEEN_55_AND_59_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be between 55 pct and 59 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be between 55 pct and 59 pct of its maximum.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be between 55 pct and 59 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be between 55 pct and 59 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BETWEEN_5_AND_15_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be between 5 pct and 15 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be between 5 pct and 15 pct of its maximum.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be between 5 pct and 15 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be between 5 pct and 15 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BETWEEN_15_AND_25_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be between 15 pct and 25 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be between 15 pct and 25 pct of its maximum.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be between 15 pct and 25 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be between 15 pct and 25 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BETWEEN_1_AND_25_PCT: - Message(Chat::Red, "%s Your target's HP must be at 25 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 25 pct of its maximum or below.", msg).c_str()); break; case IS_HP_BETWEEN_25_AND_35_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be between 25 pct and 35 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be between 25 pct and 35 pct of its maximum.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be between 25 pct and 35 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be between 25 pct and 35 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BETWEEN_35_AND_45_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be between 35 pct and 45 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be between 35 pct and 45 pct of its maximum.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be between 35 pct and 45 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be between 35 pct and 45 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BETWEEN_45_AND_55_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be between 45 pct and 55 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be between 45 pct and 55 pct of its maximum.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be between 45 pct and 55 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be between 45 pct and 55 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BETWEEN_55_AND_65_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be between 55 pct and 65 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be between 55 pct and 65 pct of its maximum.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be between 55 pct and 65 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be between 55 pct and 65 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BETWEEN_65_AND_75_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be between 65 pct and 75 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be between 65 pct and 75 pct of its maximum.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be between 65 pct and 75 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be between 65 pct and 75 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BETWEEN_75_AND_85_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be between 75 pct and 85 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be between 75 pct and 85 pct of its maximum.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be between 75 pct and 85 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be between 75 pct and 85 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BETWEEN_85_AND_95_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be between 85 pct and 95 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be between 85 pct and 95 pct of its maximum.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be between 85 pct and 95 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be between 85 pct and 95 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_ABOVE_45_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be at least 45 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at least 45 pct of its maximum.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be at least 45 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at least 45 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_ABOVE_55_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be at least 55 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at least 55 pct of its maximum.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be at least 55 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at least 55 pct of your maximum HP.", msg).c_str()); } break; case UNKNOWN_TOO_MUCH_HP_410: - Message(Chat::Red, "%s Your target has too much HP to be affected by this spell.", msg); + Message(Chat::Red, fmt::format("{} Your target has too much HP to be affected by this spell.", msg).c_str()); break; case UNKNOWN_TOO_MUCH_HP_411: - Message(Chat::Red, "%s Your target has too much HP to be affected by this spell.", msg); + Message(Chat::Red, fmt::format("{} Your target has too much HP to be affected by this spell.", msg).c_str()); break; case IS_HP_ABOVE_99_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be at or above 99 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at or above 99 pct of its maximum.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be at or above 99 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or above 99 pct of your maximum HP.", msg).c_str()); } break; case IS_MANA_ABOVE_10_PCT: - Message(Chat::Red, "%s You must have at least 10 pct of your maximum mana available to cast this spell.", msg); + Message(Chat::Red, fmt::format("{} You must have at least 10 pct of your maximum mana available to cast this spell.", msg).c_str()); break; case IS_HP_BELOW_5_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be at 5 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 5 pct of its maximum or below.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be at or below 5 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 5 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BELOW_10_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be at 10 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 10 pct of its maximum or below.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be at or below 10 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 10 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BELOW_15_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be at 15 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 15 pct of its maximum or below.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be at or below 15 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 15 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BELOW_20_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be at 20 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 20 pct of its maximum or below.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be at or below 20 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 20 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BELOW_25_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be at 25 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 25 pct of its maximum or below.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be at or below 25 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 25 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BELOW_30_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be at 30 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 30 pct of its maximum or below.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be at or below 30 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 30 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BELOW_35_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be at 35 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 35 pct of its maximum or below.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be at or below 35 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 35 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BELOW_40_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be at 40 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 40 pct of its maximum or below.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be at or below 40 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 40 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BELOW_45_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be at 45 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 45 pct of its maximum or below.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be at or below 45 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 45 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BELOW_50_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be at 50 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 50 pct of its maximum or below.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be at or below 50 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 50 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BELOW_55_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be at 55 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 55 pct of its maximum or below.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be at or below 55 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 55 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BELOW_60_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be at 60 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 60 pct of its maximum or below.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be at or below 60 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 60 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BELOW_65_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be at 65 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 65 pct of its maximum or below.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be at or below 65 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 65 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BELOW_70_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be at 70 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 70 pct of its maximum or below.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be at or below 70 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 70 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BELOW_75_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be at 75 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 75 pct of its maximum or below.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be at or below 75 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 75 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BELOW_80_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be at 80 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 80 pct of its maximum or below.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be at or below 80 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 80 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BELOW_85_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be at 85 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 85 pct of its maximum or below.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be at or below 85 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 85 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BELOW_90_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be at 90 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 90 pct of its maximum or below.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be at or below 90 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 90 pct of your maximum HP.", msg).c_str()); } break; case IS_HP_BELOW_95_PCT: if (target_requirement) { - Message(Chat::Red, "%s Your target's HP must be at 95 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 95 pct of its maximum or below.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability requires you to be at or below 95 pct of your maximum HP.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 95 pct of your maximum HP.", msg).c_str()); } break; case IS_ENDURANCE_BELOW_40_PCT: - Message(Chat::Red, "%s This ability requires you to be at or below 40 pct of your maximum endurance.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 40 pct of your maximum endurance.", msg).c_str()); break; case IS_MANA_BELOW_40_PCT: - Message(Chat::Red, "%s This spells requires you to be at or below 40 pct of your maximum mana.", msg); + Message(Chat::Red, fmt::format("{} This spells requires you to be at or below 40 pct of your maximum mana.", msg).c_str()); break; case IS_HP_ABOVE_20_PCT: - Message(Chat::Red, "%s Your target's HP must be at least 21 pct of its maximum.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at least 21 pct of its maximum.", msg).c_str()); break; case IS_BODY_TYPE_UNDEFINED: - Message(Chat::Red, "%s This spell will only work on creatures with an undefined body type.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on creatures with an undefined body type.", msg).c_str()); break; case IS_BODY_TYPE_HUMANOID: - Message(Chat::Red, "%s This spell will only work on humanoid creatures.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on humanoid creatures.", msg).c_str()); break; case IS_BODY_TYPE_WEREWOLF: - Message(Chat::Red, "%s This spell will only work on lycanthrope creatures.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on lycanthrope creatures.", msg).c_str()); break; case IS_BODY_TYPE_UNDEAD: - Message(Chat::Red, "%s This spell will only work on undead creatures.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on undead creatures.", msg).c_str()); break; case IS_BODY_TYPE_GIANTS: - Message(Chat::Red, "%s This spell will only work on giants.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on giants.", msg).c_str()); break; case IS_BODY_TYPE_CONSTRUCTS: - Message(Chat::Red, "%s This spell will only work on constructs.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on constructs.", msg).c_str()); break; case IS_BODY_TYPE_EXTRAPLANAR: - Message(Chat::Red, "%s This spell will only work on extraplanar creatures.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on extraplanar creatures.", msg).c_str()); break; case IS_BODY_TYPE_MAGICAL_CREATURE: - Message(Chat::Red, "%s This spell will only work on creatures constructed from magic.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on creatures constructed from magic.", msg).c_str()); break; case IS_BODY_TYPE_UNDEADPET: - Message(Chat::Red, "%s This spell will only work on animated undead servants.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on animated undead servants.", msg).c_str()); break; case IS_BODY_TYPE_KAELGIANT: - Message(Chat::Red, "%s This spell will only work on the Giants of Kael Drakkal.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on the Giants of Kael Drakkal.", msg).c_str()); break; case IS_BODY_TYPE_COLDAIN: - Message(Chat::Red, "%s This spell will only work on Coldain Dwarves.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on Coldain Dwarves.", msg).c_str()); break; case IS_BODY_TYPE_VAMPIRE: - Message(Chat::Red, "%s This spell will only work on vampires.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on vampires.", msg).c_str()); break; case IS_BODY_TYPE_ATEN_HA_RA: - Message(Chat::Red, "%s This spell will only work on Aten Ha Ra.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on Aten Ha Ra.", msg).c_str()); break; case IS_BODY_TYPE_GREATER_AHKEVANS: - Message(Chat::Red, "%s This spell will only work on Greater Ahkevans.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on Greater Ahkevans.", msg).c_str()); break; case IS_BODY_TYPE_KHATI_SHA: - Message(Chat::Red, "%s This spell will only work on Khati Sha.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on Khati Sha.", msg).c_str()); break; case IS_BODY_TYPE_LORD_INQUISITOR_SERU: - Message(Chat::Red, "%s This spell will only work on Lord Inquisitor Seru.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on Lord Inquisitor Seru.", msg).c_str()); break; case IS_BODY_TYPE_GRIEG_VENEFICUS: - Message(Chat::Red, "%s This spell will only work on Grieg Veneficus.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on Grieg Veneficus.", msg).c_str()); break; case IS_BODY_TYPE_FROM_PLANE_OF_WAR: - Message(Chat::Red, "%s This spell will only work on creatures from the Plane of War.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on creatures from the Plane of War.", msg).c_str()); break; case IS_BODY_TYPE_LUGGALD: - Message(Chat::Red, "%s This spell will only work on Luggalds.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on Luggalds.", msg).c_str()); break; case IS_BODY_TYPE_ANIMAL: - Message(Chat::Red, "%s This spell will only work on animals.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on animals.", msg).c_str()); break; case IS_BODY_TYPE_INSECT: - Message(Chat::Red, "%s This spell will only work on insects.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on insects.", msg).c_str()); break; case IS_BODY_TYPE_MONSTER: - Message(Chat::Red, "%s This spell will only work on monsters.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on monsters.", msg).c_str()); break; case IS_BODY_TYPE_ELEMENTAL: - Message(Chat::Red, "%s This spell will only work on elemental creatures.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on elemental creatures.", msg).c_str()); break; case IS_BODY_TYPE_PLANT: - Message(Chat::Red, "%s This spell will only work on plants.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on plants.", msg).c_str()); break; case IS_BODY_TYPE_DRAGON2: - Message(Chat::Red, "%s This spell will only work on dragons.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on dragons.", msg).c_str()); break; case IS_BODY_TYPE_SUMMONED_ELEMENTAL: - Message(Chat::Red, "%s This spell will only work on summoned elementals.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on summoned elementals.", msg).c_str()); break; case IS_BODY_TYPE_DRAGON_OF_TOV: - Message(Chat::Red, "%s This spell will only work on Dragons of Veeshan's Temple.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on Dragons of Veeshan's Temple.", msg).c_str()); break; case IS_BODY_TYPE_FAMILIAR: - Message(Chat::Red, "%s This spell will only work on familiars.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on familiars.", msg).c_str()); break; case IS_BODY_TYPE_MURAMITE: - Message(Chat::Red, "%s This spell will only work on Muramites.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on Muramites.", msg).c_str()); break; case IS_NOT_UNDEAD_OR_SUMMONED: - Message(Chat::Red, "%s This spell will only targets that are not undead or summoned.", msg); + Message(Chat::Red, fmt::format("{} This spell will only targets that are not undead or summoned.", msg).c_str()); break; case IS_NOT_PLANT: - Message(Chat::Red, "%s This spell will not affect plants.", msg); + Message(Chat::Red, fmt::format("{} This spell will not affect plants.", msg).c_str()); break; case IS_NOT_CLIENT: - Message(Chat::Red, "%s This spell will not work on adventurers.", msg); + Message(Chat::Red, fmt::format("{} This spell will not work on adventurers.", msg).c_str()); break; case IS_CLIENT: - Message(Chat::Red, "%s This spell will only work on adventurers.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on adventurers.", msg).c_str()); break; case IS_LEVEL_ABOVE_42_AND_IS_CLIENT: - Message(Chat::Red, "%s This spell will only work on level 43 or higher adventurers.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on level 43 or higher adventurers.", msg).c_str()); break; case IS_TREANT: - Message(Chat::Red, "%s This spell will only work on treants.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on treants.", msg).c_str()); break; case IS_BIXIE2: - Message(Chat::Red, "%s This spell will only work on bixies.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on bixies.", msg).c_str()); break; case IS_SCARECROW: - Message(Chat::Red, "%s This spell will only work on scarecrows.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on scarecrows.", msg).c_str()); break; case IS_VAMPIRE_OR_UNDEAD_OR_UNDEADPET: - Message(Chat::Red, "%s This spell will only work on vampires, undead, or animated undead creatures.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on vampires, undead, or animated undead creatures.", msg).c_str()); break; case IS_NOT_VAMPIRE_OR_UNDEAD: - Message(Chat::Red, "%s This spell will not work on vampires or undead creatures.", msg); + Message(Chat::Red, fmt::format("{} This spell will not work on vampires or undead creatures.", msg).c_str()); break; case IS_CLASS_KNIGHT_HYBRID_MELEE: - Message(Chat::Red, "%s This spell will only work on knights, hybrids, or melee classes.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on knights, hybrids, or melee classes.", msg).c_str()); break; case IS_CLASS_WARRIOR_CASTER_PRIEST: - Message(Chat::Red, "%s This spell will only work on warriors, casters, or priests.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on warriors, casters, or priests.", msg).c_str()); break; case IS_END_BELOW_21_PCT: - Message(Chat::Red, "%s This ability requires you to be at or below 21 pct of your maximum endurance.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 21 pct of your maximum endurance.", msg).c_str()); break; case IS_END_BELOW_25_PCT: - Message(Chat::Red, "%s This ability requires you to be at or below 25 pct of your maximum endurance.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 25 pct of your maximum endurance.", msg).c_str()); break; case IS_END_BELOW_29_PCT: - Message(Chat::Red, "%s This ability requires you to be at or below 29 pct of your maximum endurance.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 29 pct of your maximum endurance.", msg).c_str()); break; case IS_HUMANOID_LEVEL_84_MAX: - Message(Chat::Red, "%s This spell will only work on humanoids up to level 84.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on humanoids up to level 84.", msg).c_str()); break; case IS_HUMANOID_LEVEL_86_MAX: - Message(Chat::Red, "%s This spell will only work on humanoids up to level 86.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on humanoids up to level 86.", msg).c_str()); break; case IS_HUMANOID_LEVEL_88_MAX: - Message(Chat::Red, "%s This spell will only work on humanoids up to level 88.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on humanoids up to level 88.", msg).c_str()); break; case HAS_CRYSTALLIZED_FLAME_BUFF: - Message(Chat::Red, "%s This spell will only work on targets afflicted by Crystallized Flame.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on targets afflicted by Crystallized Flame.", msg).c_str()); break; case HAS_INCENDIARY_OOZE_BUFF: - Message(Chat::Red, "%s This spell will only work on targets afflicted by Incendiary Ooze.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on targets afflicted by Incendiary Ooze.", msg).c_str()); break; case IS_LEVEL_90_MAX: - Message(Chat::Red, "%s This spell will ony work targets level up to level 90.", msg); + Message(Chat::Red, fmt::format("{} This spell will ony work targets level up to level 90.", msg).c_str()); break; case IS_LEVEL_92_MAX: - Message(Chat::Red, "%s This spell will ony work targets level up to level 92.", msg); + Message(Chat::Red, fmt::format("{} This spell will ony work targets level up to level 92.", msg).c_str()); break; case IS_LEVEL_94_MAX: - Message(Chat::Red, "%s This spell will ony work targets level up to level 94.", msg); + Message(Chat::Red, fmt::format("{} This spell will ony work targets level up to level 94.", msg).c_str()); break; case IS_LEVEL_95_MAX: - Message(Chat::Red, "%s This spell will ony work targets level up to level 95.", msg); + Message(Chat::Red, fmt::format("{} This spell will ony work targets level up to level 95.", msg).c_str()); break; case IS_LEVEL_97_MAX: - Message(Chat::Red, "%s This spell will ony work targets level up to level 97.", msg); + Message(Chat::Red, fmt::format("{} This spell will ony work targets level up to level 97.", msg).c_str()); break; case IS_LEVEL_99_MAX: - Message(Chat::Red, "%s This spell will ony work targets level up to level 99.", msg); + Message(Chat::Red, fmt::format("{} This spell will ony work targets level up to level 99.", msg).c_str()); break; case IS_LEVEL_100_MAX: - Message(Chat::Red, "%s This spell will ony work targets level up to level 100.", msg); + Message(Chat::Red, fmt::format("{} This spell will ony work targets level up to level 100.", msg).c_str()); break; case IS_LEVEL_102_MAX: - Message(Chat::Red, "%s This spell will ony work targets level up to level 102.", msg); + Message(Chat::Red, fmt::format("{} This spell will ony work targets level up to level 102.", msg).c_str()); break; case IS_LEVEL_104_MAX: - Message(Chat::Red, "%s This spell will ony work targets level up to level 104.", msg); + Message(Chat::Red, fmt::format("{} This spell will ony work targets level up to level 104.", msg).c_str()); break; case IS_LEVEL_105_MAX: - Message(Chat::Red, "%s This spell will ony work targets level up to level 105.", msg); + Message(Chat::Red, fmt::format("{} This spell will ony work targets level up to level 105.", msg).c_str()); break; case IS_LEVEL_107_MAX: - Message(Chat::Red, "%s This spell will ony work targets level up to level 107.", msg); + Message(Chat::Red, fmt::format("{} This spell will ony work targets level up to level 107.", msg).c_str()); break; case IS_LEVEL_109_MAX: - Message(Chat::Red, "%s This spell will ony work targets level up to level 109.", msg); + Message(Chat::Red, fmt::format("{} This spell will ony work targets level up to level 109.", msg).c_str()); break; case IS_LEVEL_110_MAX: - Message(Chat::Red, "%s This spell will ony work targets level up to level 110.", msg); + Message(Chat::Red, fmt::format("{} This spell will ony work targets level up to level 110.", msg).c_str()); break; case IS_LEVEL_112_MAX: - Message(Chat::Red, "%s This spell will ony work targets level up to level 112.", msg); + Message(Chat::Red, fmt::format("{} This spell will ony work targets level up to level 112.", msg).c_str()); break; case IS_LEVEL_114_MAX: - Message(Chat::Red, "%s This spell will ony work targets level up to level 114.", msg); + Message(Chat::Red, fmt::format("{} This spell will ony work targets level up to level 114.", msg).c_str()); break; case HAS_TBL_ESIANTI_ACCESS: - Message(Chat::Red, "%s This spell will only transport adventurers who have gained access to Esianti: Palace of the Winds.", msg); + Message(Chat::Red, fmt::format("{} This spell will only transport adventurers who have gained access to Esianti: Palace of the Winds.", msg).c_str()); break; case IS_BETWEEN_LEVEL_1_AND_75: - Message(Chat::Red, "%s This spell will only work on targets between level 1 and 75.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on targets between level 1 and 75.", msg).c_str()); break; case IS_BETWEEN_LEVEL_76_AND_85: - Message(Chat::Red, "%s This spell will only work on targets between level 76 and 85.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on targets between level 76 and 85.", msg).c_str()); break; case IS_BETWEEN_LEVEL_86_AND_95: - Message(Chat::Red, "%s This spell will only work on targets between level 86 and 95.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on targets between level 86 and 95.", msg).c_str()); break; case IS_BETWEEN_LEVEL_96_AND_105: - Message(Chat::Red, "%s This spell will only work on targets between level 96 and 105.", msg); + Message(Chat::Red, fmt::format("{} This spell will only work on targets between level 96 and 105.", msg).c_str()); break; case IS_HP_LESS_THAN_80_PCT: - Message(Chat::Red, "%s Your target's HP must be at 80 pct of its maximum or below.", msg); + Message(Chat::Red, fmt::format("{} Your target's HP must be at 80 pct of its maximum or below.", msg).c_str()); break; case IS_LEVEL_ABOVE_34: - Message(Chat::Red, "%s Your target must be level 35 or higher.", msg); + Message(Chat::Red, fmt::format("{} Your target must be level 35 or higher.", msg).c_str()); break; case IN_TWO_HANDED_STANCE: - Message(Chat::Red, "%s You must be in your two-handed stance to use this ability.", msg); + Message(Chat::Red, fmt::format("{} You must be in your two-handed stance to use this ability.", msg).c_str()); break; case IN_DUAL_WIELD_HANDED_STANCE: - Message(Chat::Red, "%s You must be in your dual-wielding stance to use this ability.", msg); + Message(Chat::Red, fmt::format("{} You must be in your dual-wielding stance to use this ability.", msg).c_str()); break; case IN_SHIELD_STANCE: - Message(Chat::Red, "%s You must be in your shield stance to use this ability.", msg); + Message(Chat::Red, fmt::format("{} You must be in your shield stance to use this ability.", msg).c_str()); break; case NOT_IN_TWO_HANDED_STANCE: - Message(Chat::Red, "%s You may not use this ability if you are in your two-handed stance.", msg); + Message(Chat::Red, fmt::format("{} You may not use this ability if you are in your two-handed stance.", msg).c_str()); break; case NOT_IN_DUAL_WIELD_HANDED_STANCE: - Message(Chat::Red, "%s You may not use this ability if you are in your dual-wielding stance.", msg); + Message(Chat::Red, fmt::format("{} You may not use this ability if you are in your dual-wielding stance.", msg).c_str()); break; case NOT_IN_SHIELD_STANCE: - Message(Chat::Red, "%s You may not use this ability if you are in your shield stance.", msg); + Message(Chat::Red, fmt::format("{} You may not use this ability if you are in your shield stance.", msg).c_str()); break; case LEVEL_46_MAX: - Message(Chat::Red, "%s Your target must be level 46 or below.", msg); + Message(Chat::Red, fmt::format("{} Your target must be level 46 or below.", msg).c_str()); break; case HAS_NO_MANA_BURN_BUFF: - Message(Chat::Red, "%s This spell will not take hold until the effects of the previous Mana Burn have expired.", msg); + Message(Chat::Red, fmt::format("{} This spell will not take hold until the effects of the previous Mana Burn have expired.", msg).c_str()); break; case IS_CLIENT_AND_MALE_PLATE_USER: - Message(Chat::Red, "%s Your target wouldn't look right as that Jann.", msg); + Message(Chat::Red, fmt::format("{} Your target wouldn't look right as that Jann.", msg).c_str()); break; case IS_CLEINT_AND_MALE_DRUID_ENCHANTER_MAGICIAN_NECROANCER_SHAMAN_OR_WIZARD: - Message(Chat::Red, "%s Your target wouldn't look right as that Jann.", msg); + Message(Chat::Red, fmt::format("{} Your target wouldn't look right as that Jann.", msg).c_str()); break; case IS_CLIENT_AND_MALE_BEASTLORD_BERSERKER_MONK_RANGER_OR_ROGUE: - Message(Chat::Red, "%s Your target wouldn't look right as that Jann.", msg); + Message(Chat::Red, fmt::format("{} Your target wouldn't look right as that Jann.", msg).c_str()); break; case IS_CLIENT_AND_FEMALE_PLATE_USER: - Message(Chat::Red, "%s Your target wouldn't look right as that Jann.", msg); + Message(Chat::Red, fmt::format("{} Your target wouldn't look right as that Jann.", msg).c_str()); break; case IS_CLIENT_AND_FEMALE_DRUID_ENCHANTER_MAGICIAN_NECROANCER_SHAMAN_OR_WIZARD: - Message(Chat::Red, "%s Your target wouldn't look right as that Jann.", msg); + Message(Chat::Red, fmt::format("{} Your target wouldn't look right as that Jann.", msg).c_str()); break; case IS_CLIENT_AND_FEMALE_BEASTLORD_BERSERKER_MONK_RANGER_OR_ROGUE: - Message(Chat::Red, "%s Your target wouldn't look right as that Jann.", msg); + Message(Chat::Red, fmt::format("{} Your target wouldn't look right as that Jann.", msg).c_str()); break; case HAS_TRAVELED_TO_STRATOS: - Message(Chat::Red, "%s You must travel to Stratos at least once before wishing to go there.", msg); + Message(Chat::Red, fmt::format("{} You must travel to Stratos at least once before wishing to go there.", msg).c_str()); break; case HAS_TRAVELED_TO_AALISHAI: - Message(Chat::Red, "%s You must travel to Aalishai at least once before wishing to go there.", msg); + Message(Chat::Red, fmt::format("{} You must travel to Aalishai at least once before wishing to go there.", msg).c_str()); break; case HAS_TRAVELED_TO_MEARATS: - Message(Chat::Red, "%s You must travel to Mearatas at least once before wishing to go there.", msg); + Message(Chat::Red, fmt::format("{} You must travel to Mearatas at least once before wishing to go there.", msg).c_str()); break; case IS_HP_ABOVE_50_PCT: - Message(Chat::Red, "%s This target must be above 50 pct of its maximum hit points.", msg); + Message(Chat::Red, fmt::format("{} This target must be above 50 pct of its maximum hit points.", msg).c_str()); break; case IS_HP_UNDER_50_PCT: - Message(Chat::Red, "%s This target must be at oe below 50 pct of its maximum hit points.", msg); + Message(Chat::Red, fmt::format("{} This target must be at oe below 50 pct of its maximum hit points.", msg).c_str()); break; case IS_OFF_HAND_EQUIPED: - Message(Chat::Red, "%s You must be wielding a weapon or shield in your offhand to use this ability.", msg); + Message(Chat::Red, fmt::format("{} You must be wielding a weapon or shield in your offhand to use this ability.", msg).c_str()); break; case HAS_NO_PACT_OF_FATE_RECOURSE_BUFF: - Message(Chat::Red, "%s This spell will not work while Pact of Fate Recourse is active.", msg); + Message(Chat::Red, fmt::format("{} This spell will not work while Pact of Fate Recourse is active.", msg).c_str()); break; case HAS_NO_SHROUD_OF_PRAYER_BUFF: - Message(Chat::Red, "%s Your target cannot receive another Quiet Prayer this soon.", msg); + Message(Chat::Red, fmt::format("{} Your target cannot receive another Quiet Prayer this soon.", msg).c_str()); break; case IS_MANA_BELOW_20_PCT: - Message(Chat::Red, "%s This ability requires you to be at or below 20 pct of your maximum mana.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or below 20 pct of your maximum mana.", msg).c_str()); break; case IS_MANA_ABOVE_50_PCT: - Message(Chat::Red, "%s This ability requires you to be at or above 50 pct of your maximum mana.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be at or above 50 pct of your maximum mana.", msg).c_str()); break; case COMPLETED_ACHIEVEMENT_LEGENDARY_ANSWERER: - Message(Chat::Red, "%s You have completed Legendary Answerer.", msg); + Message(Chat::Red, fmt::format("{} You have completed Legendary Answerer.", msg).c_str()); break; case HAS_NO_ROGUES_FURY_BUFF: - Message(Chat::Red, "%s This spell will not affect anyone that currently has Rogue's Fury active.", msg); + Message(Chat::Red, fmt::format("{} This spell will not affect anyone that currently has Rogue's Fury active.", msg).c_str()); break; case NOT_COMPLETED_ACHIEVEMENT_LEGENDARY_ANSWERER: - Message(Chat::Red, "%s You must complete Legendary Answerer.", msg); + Message(Chat::Red, fmt::format("{} You must complete Legendary Answerer.", msg).c_str()); break; case IS_SUMMONED_OR_UNDEAD: - Message(Chat::Red, "%s This spell can only be used on summoned or undead.", msg); + Message(Chat::Red, fmt::format("{} This spell can only be used on summoned or undead.", msg).c_str()); break; case IS_CLASS_CASTER_PRIEST: - Message(Chat::Red, "%s This ability requires you to be a caster or priest.", msg); + Message(Chat::Red, fmt::format("{} This ability requires you to be a caster or priest.", msg).c_str()); break; case IS_END_OR_MANA_ABOVE_20_PCT: - Message(Chat::Red, "%s You must have at least 20 pct of your maximum mana and endurance to use this ability.", msg); + Message(Chat::Red, fmt::format("{} You must have at least 20 pct of your maximum mana and endurance to use this ability.", msg).c_str()); break; case IS_END_OR_MANA_BELOW_30_PCT: - Message(Chat::Red, "%s Your target already has 30 pct or more of their maximum mana or endurance.", msg); + Message(Chat::Red, fmt::format("{} Your target already has 30 pct or more of their maximum mana or endurance.", msg).c_str()); break; case IS_CLASS_BARD2: if (target_requirement) { - Message(Chat::Red, "%s This spell will only affect Bards.", msg); + Message(Chat::Red, fmt::format("{} This spell will only affect Bards.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability can only be used by Bards.", msg); + Message(Chat::Red, fmt::format("{} This ability can only be used by Bards.", msg).c_str()); } break; case IS_NOT_CLASS_BARD: if (target_requirement) { - Message(Chat::Red, "%s This spell can not affect Bards.", msg); + Message(Chat::Red, fmt::format("{} This spell can not affect Bards.", msg).c_str()); } else { - Message(Chat::Red, "%s This ability can not be used by Bards.", msg); + Message(Chat::Red, fmt::format("{} This ability can not be used by Bards.", msg).c_str()); } break; case HAS_NO_FURIOUS_RAMPAGE_BUFF: - Message(Chat::Red, "%s This ability cannot be activated while Furious Rampage is active.", msg); + Message(Chat::Red, fmt::format("{} This ability cannot be activated while Furious Rampage is active.", msg).c_str()); break; case IS_END_OR_MANA_BELOW_30_PCT2: - Message(Chat::Red, "%s You can only perform this solo if you have less than 30 pct mana or endurance.", msg); + Message(Chat::Red, fmt::format("{} You can only perform this solo if you have less than 30 pct mana or endurance.", msg).c_str()); break; case HAS_NO_HARMONIOUS_PRECISION_BUFF: - Message(Chat::Red, "%s This spell will not work if you have the Harmonious Precision line active.", msg); + Message(Chat::Red, fmt::format("{} This spell will not work if you have the Harmonious Precision line active.", msg).c_str()); break; case HAS_NO_HARMONIOUS_EXPANSE_BUFF: - Message(Chat::Red, "%s This spell will not work if you have the Harmonious Expanse line active.", msg); + Message(Chat::Red, fmt::format("{} This spell will not work if you have the Harmonious Expanse line active.", msg).c_str()); break; default: if (target_requirement) { - Message(Chat::Red, "Your target does not meet the spell requirements.", msg); + Message(Chat::Red, "Your target does not meet the spell requirements."); } else { - Message(Chat::Red, "Your spell would not take hold on your target.", msg); + Message(Chat::Red, "Your spell would not take hold on your target."); } break; } diff --git a/zone/spells.cpp b/zone/spells.cpp index eeb46e3ab..e955bdb33 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -2395,9 +2395,6 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui else if(!SpellOnTarget(spell_id, spell_target, 0, true, resist_adjust, false, level_override)) { if(IsBuffSpell(spell_id) && IsBeneficialSpell(spell_id)) { - // Prevent mana usage/timers being set for beneficial buffs - if(casting_spell_aa_id) - InterruptSpell(); return false; } } @@ -2588,7 +2585,8 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui /* Set Recast Timer on spells. */ - if(IsClient() && !isproc) + + if(IsClient() && !isproc && !IsFromTriggeredSpell(slot, inventory_slot)) { if (slot == CastingSlot::AltAbility) { if (!aa_id) { @@ -2615,11 +2613,6 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui CastToClient()->GetPTimers().Start(casting_spell_timer, casting_spell_timer_duration); LogSpells("Spell [{}]: Setting custom reuse timer [{}] to [{}]", spell_id, casting_spell_timer, casting_spell_timer_duration); } - else if(spell_id == casting_spell_id && casting_spell_timer != 0xFFFFFFFF) - { - CastToClient()->GetPTimers().Start(casting_spell_timer, casting_spell_timer_duration); - LogSpells("Spell [{}]: Setting custom reuse timer [{}] to [{}]", spell_id, casting_spell_timer, casting_spell_timer_duration); - } else if(spells[spell_id].recast_time > 1000 && !spells[spell_id].is_discipline) { int recast = spells[spell_id].recast_time/1000; if (spell_id == SPELL_LAY_ON_HANDS) //lay on hands @@ -4006,8 +3999,9 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, int reflect_effectivenes // if SpellEffect returned false there's a problem applying the // spell. It's most likely a buff that can't stack. LogSpells("Spell [{}] could not apply its effects [{}] -> [{}]\n", spell_id, GetName(), spelltar->GetName()); - if(casting_spell_aa_id) + if (casting_spell_aa_id) { MessageString(Chat::SpellFailure, SPELL_NO_HOLD); + } safe_delete(action_packet); return false; } @@ -6644,3 +6638,11 @@ bool Mob::CheckItemRaceClassDietyRestrictionsOnCast(uint32 inventory_slot) { return true; } + +bool Mob::IsFromTriggeredSpell(CastingSlot slot, uint32 item_slot) { + //spells triggered using spells finished use item slot, but there is no item set. + if ((slot == CastingSlot::Item) && (item_slot == 0xFFFFFFFF)) { + return true; + } + return false; +}