Merge pull request #881 from EQEmu/feature/unify-chat-constants

Feature/unify chat constants
This commit is contained in:
Chris Miles 2019-08-11 01:58:41 -05:00 committed by GitHub
commit 8c17c42a10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
70 changed files with 3810 additions and 3542 deletions

View File

@ -94,6 +94,8 @@ class PTimerList;
# define _ISNAN_(a) std::isnan(a)
#endif
#define SQL(...) #__VA_ARGS__
class Database : public DBcore {
public:
Database();

View File

@ -476,7 +476,7 @@ bool Database::CheckDatabaseConversions() {
CheckDatabaseConvertCorpseDeblob();
/* Run EQEmu Server script (Checks for database updates) */
system("perl eqemu_server.pl ran_from_world");
if(system("perl eqemu_server.pl ran_from_world"));
return true;
}

View File

@ -71,7 +71,7 @@
//#define AT_Trader 300 // Bazaar Trader Mode (not present in SoF or RoF2)
// animations for AT_Anim
#define ANIM_FREEZE 102
#define ANIM_FREEZE 102
#define ANIM_STAND 0x64
#define ANIM_SIT 0x6e
#define ANIM_CROUCH 0x6f
@ -87,200 +87,114 @@ typedef enum {
_eaMaxAppearance
} EmuAppearance;
#define MT_NPCQuestSay 10
// msg_type's for custom usercolors
#define MT_Say 256
#define MT_Tell 257
#define MT_Group 258
#define MT_Guild 259
#define MT_OOC 260
#define MT_Auction 261
#define MT_Shout 262
#define MT_Emote 263
#define MT_Spells 264
#define MT_YouHitOther 265
#define MT_OtherHitsYou 266
#define MT_YouMissOther 267
#define MT_OtherMissesYou 268
#define MT_Broadcasts 269
#define MT_Skills 270
#define MT_Disciplines 271
#define MT_Unused1 272
#define MT_DefaultText 273
#define MT_Unused2 274
#define MT_MerchantOffer 275
#define MT_MerchantBuySell 276
#define MT_YourDeath 277
#define MT_OtherDeath 278
#define MT_OtherHits 279
#define MT_OtherMisses 280
#define MT_Who 281
#define MT_YellForHelp 282
#define MT_NonMelee 283
#define MT_WornOff 284
#define MT_MoneySplit 285
#define MT_LootMessages 286
#define MT_DiceRoll 287
#define MT_OtherSpells 288
#define MT_SpellFailure 289
#define MT_Chat 290
#define MT_Channel1 291
#define MT_Channel2 292
#define MT_Channel3 293
#define MT_Channel4 294
#define MT_Channel5 295
#define MT_Channel6 296
#define MT_Channel7 297
#define MT_Channel8 298
#define MT_Channel9 299
#define MT_Channel10 300
#define MT_CritMelee 301
#define MT_SpellCrits 302
#define MT_TooFarAway 303
#define MT_NPCRampage 304
#define MT_NPCFlurry 305
#define MT_NPCEnrage 306
#define MT_SayEcho 307
#define MT_TellEcho 308
#define MT_GroupEcho 309
#define MT_GuildEcho 310
#define MT_OOCEcho 311
#define MT_AuctionEcho 312
#define MT_ShoutECho 313
#define MT_EmoteEcho 314
#define MT_Chat1Echo 315
#define MT_Chat2Echo 316
#define MT_Chat3Echo 317
#define MT_Chat4Echo 318
#define MT_Chat5Echo 319
#define MT_Chat6Echo 320
#define MT_Chat7Echo 321
#define MT_Chat8Echo 322
#define MT_Chat9Echo 323
#define MT_Chat10Echo 324
#define MT_DoTDamage 325
#define MT_ItemLink 326
#define MT_RaidSay 327
#define MT_MyPet 328
#define MT_DS 329
#define MT_Leadership 330
#define MT_PetFlurry 331
#define MT_PetCrit 332
#define MT_FocusEffect 333
#define MT_Experience 334
#define MT_System 335
#define MT_PetSpell 336
#define MT_PetResponse 337
#define MT_ItemSpeech 338
#define MT_StrikeThrough 339
#define MT_Stun 340
namespace Chat {
const uint16 White = 0;
const uint16 DimGray = 1;
const uint16 Default = 1;
const uint16 Green = 2;
const uint16 BrightBlue = 3;
const uint16 LightBlue = 4;
const uint16 Magenta = 5;
const uint16 Gray = 6;
const uint16 LightGray = 7;
const uint16 NPCQuestSay = 10;
const uint16 DarkGray = 12;
const uint16 Red = 13;
const uint16 Lime = 14;
const uint16 Yellow = 15;
const uint16 Blue = 16;
const uint16 LightNavy = 17;
const uint16 Cyan = 18;
const uint16 Black = 20;
// TODO: Really should combine above and below into one
//from showeq
enum ChatColor
{
/*
CC_Default = 0,
CC_DarkGrey = 1,
CC_DarkGreen = 2,
CC_DarkBlue = 3,
CC_Purple = 5,
CC_LightGrey = 6,
*/
CC_WhiteSmoke = 0, // FF|F0F0F0
CC_Green = 2, // FF|008000
CC_BrightBlue = 3, // FF|0040FF
CC_Magenta = 5, // FF|F000F0
CC_Gray = 6, // FF|808080
CC_LightGray = 7, // FF|E0E0E0
//CC_WhiteSmoke2 = 10, // FF|F0F0F0
CC_DarkGray = 12, // FF|A0A0A0
CC_Red = 13, // FF|F00000
CC_Lime = 14, // FF|00F000
CC_Yellow = 15, // FF|F0F000
CC_Blue = 16, // FF|0000F0
CC_LightNavy = 17, // FF|0000AF
CC_Cyan = 18, // FF|00F0F0
CC_Black = 20, // FF|000000
// any index <= 255 that is not defined above
CC_DimGray = 1, // FF|606060
CC_Default = 1,
CC_User_Say = 256,
CC_User_Tell = 257,
CC_User_Group = 258,
CC_User_Guild = 259,
CC_User_OOC = 260,
CC_User_Auction = 261,
CC_User_Shout = 262,
CC_User_Emote = 263,
CC_User_Spells = 264,
CC_User_YouHitOther = 265,
CC_User_OtherHitYou = 266,
CC_User_YouMissOther = 267,
CC_User_OtherMissYou = 268,
CC_User_Duels = 269,
CC_User_Skills = 270,
CC_User_Disciplines = 271,
CC_User_Default = 273,
CC_User_MerchantOffer = 275,
CC_User_MerchantExchange = 276,
CC_User_YourDeath = 277,
CC_User_OtherDeath = 278,
CC_User_OtherHitOther = 279,
CC_User_OtherMissOther = 280,
CC_User_Who = 281,
CC_User_Yell = 282,
CC_User_NonMelee = 283,
CC_User_SpellWornOff = 284,
CC_User_MoneySplit = 285,
CC_User_Loot = 286,
CC_User_Random = 287,
CC_User_OtherSpells = 288,
CC_User_SpellFailure = 289,
CC_User_ChatChannel = 290,
CC_User_Chat1 = 291,
CC_User_Chat2 = 292,
CC_User_Chat3 = 293,
CC_User_Chat4 = 294,
CC_User_Chat5 = 295,
CC_User_Chat6 = 296,
CC_User_Chat7 = 297,
CC_User_Chat8 = 298,
CC_User_Chat9 = 299,
CC_User_Chat10 = 300,
CC_User_MeleeCrit = 301,
CC_User_SpellCrit = 302,
CC_User_TooFarAway = 303,
CC_User_NPCRampage = 304,
CC_User_NPCFurry = 305,
CC_User_NPCEnrage = 306,
CC_User_EchoSay = 307,
CC_User_EchoTell = 308,
CC_User_EchoGroup = 309,
CC_User_EchoGuild = 310,
CC_User_EchoOOC = 311,
CC_User_EchoAuction = 312,
CC_User_EchoShout = 313,
CC_User_EchoEmote = 314,
CC_User_EchoChat1 = 315,
CC_User_EchoChat2 = 316,
CC_User_EchoChat3 = 317,
CC_User_EchoChat4 = 318,
CC_User_EchoChat5 = 319,
CC_User_EchoChat6 = 320,
CC_User_EchoChat7 = 321,
CC_User_EchoChat8 = 322,
CC_User_EchoChat9 = 323,
CC_User_EchoChat10 = 324,
CC_User_UnusedAtThisTime = 325,
CC_User_ItemTags = 326,
CC_User_RaidSay = 327,
CC_User_MyPet = 328,
CC_User_DamageShield = 329,
/**
* User colors
*/
const uint16 Say = 256;
const uint16 Tell = 257;
const uint16 Group = 258;
const uint16 Guild = 259;
const uint16 OOC = 260;
const uint16 Auction = 261;
const uint16 Shout = 262;
const uint16 Emote = 263;
const uint16 Spells = 264;
const uint16 YouHitOther = 265;
const uint16 OtherHitYou = 266;
const uint16 YouMissOther = 267;
const uint16 OtherMissYou = 268;
const uint16 Broadcasts = 269;
const uint16 Skills = 270;
const uint16 Disciplines = 271;
const uint16 Unused1 = 272;
const uint16 DefaultText = 273;
const uint16 Unused2 = 274;
const uint16 MerchantOffer = 275;
const uint16 MerchantExchange = 276;
const uint16 YourDeath = 277;
const uint16 OtherDeath = 278;
const uint16 OtherHitOther = 279;
const uint16 OtherMissOther = 280;
const uint16 Who = 281;
const uint16 YellForHelp = 282;
const uint16 NonMelee = 283;
const uint16 SpellWornOff = 284;
const uint16 MoneySplit = 285;
const uint16 Loot = 286;
const uint16 DiceRoll = 287;
const uint16 OtherSpells = 288;
const uint16 SpellFailure = 289;
const uint16 ChatChannel = 290;
const uint16 Chat1 = 291;
const uint16 Chat2 = 292;
const uint16 Chat3 = 293;
const uint16 Chat4 = 294;
const uint16 Chat5 = 295;
const uint16 Chat6 = 296;
const uint16 Chat7 = 297;
const uint16 Chat8 = 298;
const uint16 Chat9 = 299;
const uint16 Chat10 = 300;
const uint16 MeleeCrit = 301;
const uint16 SpellCrit = 302;
const uint16 TooFarAway = 303;
const uint16 NPCRampage = 304;
const uint16 NPCFlurry = 305;
const uint16 NPCEnrage = 306;
const uint16 EchoSay = 307;
const uint16 EchoTell = 308;
const uint16 EchoGroup = 309;
const uint16 EchoGuild = 310;
const uint16 EchoOOC = 311;
const uint16 EchoAuction = 312;
const uint16 EchoShout = 313;
const uint16 EchoEmote = 314;
const uint16 EchoChat1 = 315;
const uint16 EchoChat2 = 316;
const uint16 EchoChat3 = 317;
const uint16 EchoChat4 = 318;
const uint16 EchoChat5 = 319;
const uint16 EchoChat6 = 320;
const uint16 EchoChat7 = 321;
const uint16 EchoChat8 = 322;
const uint16 EchoChat9 = 323;
const uint16 EchoChat10 = 324;
const uint16 DotDamage = 325;
const uint16 ItemLink = 326;
const uint16 RaidSay = 327;
const uint16 MyPet = 328;
const uint16 DamageShield = 329;
const uint16 LeaderShip = 330;
const uint16 PetFlurry = 331;
const uint16 PetCritical = 332;
const uint16 FocusEffect = 333;
const uint16 Experience = 334;
const uint16 System = 335;
const uint16 PetSpell = 336;
const uint16 PetResponse = 337;
const uint16 ItemSpeech = 338;
const uint16 StrikeThrough = 339;
const uint16 Stun = 340;
};
//ZoneChange_Struct->success values

View File

@ -81,14 +81,6 @@ namespace Console {
};
}
enum GameChatColor {
yellow = 15,
red = 13,
light_green = 14,
light_cyan = 258,
light_purple = 5
};
/**
* EQEmuLogSys Constructor
*/
@ -306,22 +298,22 @@ uint16 EQEmuLogSys::GetGMSayColorFromCategory(uint16 log_category)
switch (log_category) {
case Logs::Status:
case Logs::Normal:
return GameChatColor::yellow;
return Chat::Yellow;
case Logs::MySQLError:
case Logs::Error:
return GameChatColor::red;
return Chat::Red;
case Logs::MySQLQuery:
case Logs::Debug:
return GameChatColor::light_green;
return Chat::Lime;
case Logs::Quests:
return GameChatColor::light_cyan;
return Chat::Group;
case Logs::Commands:
case Logs::Mercenaries:
return GameChatColor::light_purple;
return Chat::Magenta;
case Logs::Crash:
return GameChatColor::red;
return Chat::Red;
default:
return GameChatColor::yellow;
return Chat::Yellow;
}
}

View File

@ -123,6 +123,17 @@ std::vector<std::string> SplitString(const std::string &str, char delim) {
return ret;
}
static std::string implode(char *sep, std::vector<std::string> src)
{
std::ostringstream output;
std::vector<std::string>::iterator src_iter;
for (src_iter = src.begin(); src_iter != src.end(); src_iter++)
output << *src_iter << sep;
return output.str();
}
std::string EscapeString(const std::string &s) {
std::string ret;

View File

@ -30,6 +30,7 @@ const std::string ucfirst(std::string s);
std::vector<std::string> split(std::string str_to_split, char delimiter);
const std::string StringFormat(const char* format, ...);
const std::string vStringFormat(const char* format, va_list args);
static std::string implode(char *sep, std::vector<std::string> src);
std::vector<std::string> SplitString(const std::string &s, char delim);
std::string EscapeString(const char *src, size_t sz);
std::string EscapeString(const std::string &s);

View File

@ -130,7 +130,7 @@
int32 GetFollowID();
virtual void Message(int32 type, const char* message, ...);
virtual void Message_StringID(int32 type, int32 string_id, int32 distance = 0);
virtual void MessageString(int32 type, int32 string_id, int32 distance = 0);
void Say(const char *format, ...);
void Shout(const char *format, ...);
void Emote(const char *format, ...);

View File

@ -122,7 +122,7 @@ bool Adventure::Process()
else if(status == AS_WaitingForPrimaryEndTime)
{
//Do partial failure: send a message to the clients that they can only get a certain amount of points.
SendAdventureMessage(13, "You failed to complete your adventure in time. Complete your adventure goal within 30 minutes to "
SendAdventureMessage(Chat::Red, "You failed to complete your adventure in time. Complete your adventure goal within 30 minutes to "
"receive a lesser reward. This adventure will end in 30 minutes and your party will be ejected from the dungeon.");
SetStatus(AS_WaitingForSecondaryEndTime);
}

View File

@ -123,7 +123,7 @@ int main(int argc, char** argv) {
if (!std::ifstream("eqemu_config.json")) {
CheckForServerScript(true);
/* Run EQEmu Server script (Checks for database updates) */
system("perl eqemu_server.pl convert_xml");
if(system("perl eqemu_server.pl convert_xml"));
}
else {
/* Download EQEmu Server Maintenance Script if doesn't exist */
@ -627,9 +627,9 @@ void CheckForServerScript(bool force_download) {
std::cout << "Pulling down EQEmu Server Maintenance Script (eqemu_server.pl)..." << std::endl;
#ifdef _WIN32
system("perl -MLWP::UserAgent -e \"require LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy; my $response = $ua->get('https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/eqemu_server.pl'); if ($response->is_success){ open(FILE, '> eqemu_server.pl'); print FILE $response->decoded_content; close(FILE); }\"");
if(system("perl -MLWP::UserAgent -e \"require LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy; my $response = $ua->get('https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/eqemu_server.pl'); if ($response->is_success){ open(FILE, '> eqemu_server.pl'); print FILE $response->decoded_content; close(FILE); }\""));
#else
system("wget -N --no-check-certificate --quiet -O eqemu_server.pl https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/eqemu_server.pl");
if(system("wget -N --no-check-certificate --quiet -O eqemu_server.pl https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/eqemu_server.pl"));
#endif
}
}

View File

@ -58,7 +58,7 @@ void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, u
if (!database.GetPoweredPetEntry(spells[spell_id].teleport_zone, act_power, &record))
{
Log(Logs::General, Logs::Error, "Unknown swarm pet spell id: %d, check pets table", spell_id);
Message(13, "Unable to find data for pet %s", spells[spell_id].teleport_zone);
Message(Chat::Red, "Unable to find data for pet %s", spells[spell_id].teleport_zone);
return;
}
@ -1091,7 +1091,7 @@ void Client::FinishAlternateAdvancementPurchase(AA::Rank *rank, bool ignore_cost
SendAlternateAdvancementStats();
if(rank->prev) {
Message_StringID(15, AA_IMPROVE,
MessageString(Chat::Yellow, AA_IMPROVE,
std::to_string(rank->title_sid).c_str(),
std::to_string(rank->prev->current_value).c_str(),
std::to_string(cost).c_str(),
@ -1104,7 +1104,7 @@ void Client::FinishAlternateAdvancementPurchase(AA::Rank *rank, bool ignore_cost
}
}
else {
Message_StringID(15, AA_GAIN_ABILITY,
MessageString(Chat::Yellow, AA_GAIN_ABILITY,
std::to_string(rank->title_sid).c_str(),
std::to_string(cost).c_str(),
cost == 1 ? std::to_string(AA_POINT).c_str() : std::to_string(AA_POINTS).c_str());
@ -1179,11 +1179,11 @@ void Client::ActivateAlternateAdvancementAbility(int rank_id, int target_id) {
uint32 aaremain_sec = aaremain % 60;
if(aaremain_hr >= 1) {
Message(13, "You can use this ability again in %u hour(s) %u minute(s) %u seconds",
Message(Chat::Red, "You can use this ability again in %u hour(s) %u minute(s) %u seconds",
aaremain_hr, aaremain_min, aaremain_sec);
}
else {
Message(13, "You can use this ability again in %u minute(s) %u seconds",
Message(Chat::Red, "You can use this ability again in %u minute(s) %u seconds",
aaremain_min, aaremain_sec);
}
@ -1200,7 +1200,7 @@ void Client::ActivateAlternateAdvancementAbility(int rank_id, int target_id) {
CommonBreakInvisible();
if (spells[rank->spell].sneak && (!hidden || (hidden && (Timer::GetCurrentTime() - tmHidden) < 4000))) {
Message_StringID(MT_SpellFailure, SNEAK_RESTRICT);
MessageString(Chat::SpellFailure, SNEAK_RESTRICT);
return;
}
//
@ -1214,7 +1214,7 @@ void Client::ActivateAlternateAdvancementAbility(int rank_id, int target_id) {
SetAppearance(eaStanding, false);
if (GetAppearance() != eaStanding) {
Message_StringID(MT_SpellFailure, STAND_TO_CAST);
MessageString(Chat::SpellFailure, STAND_TO_CAST);
return;
}
}

View File

@ -52,12 +52,12 @@ void EntityList::CheckClientAggro(Client *around)
void EntityList::DescribeAggro(Client *towho, NPC *from_who, float d, bool verbose) {
float d2 = d*d;
towho->Message(0, "Describing aggro for %s", from_who->GetName());
towho->Message(Chat::White, "Describing aggro for %s", from_who->GetName());
bool engaged = from_who->IsEngaged();
if(engaged) {
Mob *top = from_who->GetHateTop();
towho->Message(0, ".. I am currently fighting with %s", top == nullptr?"(nullptr)":top->GetName());
towho->Message(Chat::White, ".. I am currently fighting with %s", top == nullptr?"(nullptr)":top->GetName());
}
bool check_npcs = from_who->WillAggroNPCs();
@ -77,7 +77,7 @@ void EntityList::DescribeAggro(Client *towho, NPC *from_who, float d, bool verbo
if(!database.GetFactionName(my_primary, namebuf, sizeof(namebuf)))
strcpy(namebuf, "(Unknown)");
}
towho->Message(0, ".. I am on faction %s (%d)\n", namebuf, my_primary);
towho->Message(Chat::White, ".. I am on faction %s (%d)\n", namebuf, my_primary);
}
for (auto it = mob_list.begin(); it != mob_list.end(); ++it) {
@ -91,11 +91,11 @@ void EntityList::DescribeAggro(Client *towho, NPC *from_who, float d, bool verbo
if (engaged) {
uint32 amm = from_who->GetHateAmount(mob);
if (amm == 0)
towho->Message(0, "... %s is not on my hate list.", mob->GetName());
towho->Message(Chat::White, "... %s is not on my hate list.", mob->GetName());
else
towho->Message(0, "... %s is on my hate list with value %lu", mob->GetName(), (unsigned long)amm);
towho->Message(Chat::White, "... %s is on my hate list with value %lu", mob->GetName(), (unsigned long)amm);
} else if (!check_npcs && mob->IsNPC()) {
towho->Message(0, "... %s is an NPC and my npc_aggro is disabled.", mob->GetName());
towho->Message(Chat::White, "... %s is an NPC and my npc_aggro is disabled.", mob->GetName());
} else {
from_who->DescribeAggro(towho, mob, verbose);
}
@ -114,13 +114,13 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
if(( t1 > iAggroRange)
|| ( t2 > iAggroRange)
|| ( t3 > iAggroRange) ) {
towho->Message(0, "...%s is out of range (fast). distances (%.3f,%.3f,%.3f), range %.3f", mob->GetName(),
towho->Message(Chat::White, "...%s is out of range (fast). distances (%.3f,%.3f,%.3f), range %.3f", mob->GetName(),
t1, t2, t3, iAggroRange);
return;
}
if(mob->IsInvisible(this)) {
towho->Message(0, "...%s is invisible to me. ", mob->GetName());
towho->Message(Chat::White, "...%s is invisible to me. ", mob->GetName());
return;
}
if((mob->IsClient() &&
@ -131,13 +131,13 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
)
))
{
towho->Message(0, "...%s is my owner. ", mob->GetName());
towho->Message(Chat::White, "...%s is my owner. ", mob->GetName());
return;
}
if(mob == GetOwner()) {
towho->Message(0, "...%s a GM or is not connected. ", mob->GetName());
towho->Message(Chat::White, "...%s a GM or is not connected. ", mob->GetName());
return;
}
@ -145,7 +145,7 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
float iAggroRange2 = iAggroRange*iAggroRange;
if( dist2 > iAggroRange2 ) {
towho->Message(0, "...%s is out of range. %.3f > %.3f ", mob->GetName(),
towho->Message(Chat::White, "...%s is out of range. %.3f > %.3f ", mob->GetName(),
dist2, iAggroRange2);
return;
}
@ -154,14 +154,14 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
{
if (GetLevel() < RuleI(Aggro, MinAggroLevel) && mob->GetLevelCon(GetLevel()) == CON_GRAY && GetBodyType() != 3)
{
towho->Message(0, "...%s is red to me (basically)", mob->GetName(), dist2, iAggroRange2);
towho->Message(Chat::White, "...%s is red to me (basically)", mob->GetName(), dist2, iAggroRange2);
return;
}
}
else
{
if(GetINT() > RuleI(Aggro, IntAggroThreshold) && mob->GetLevelCon(GetLevel()) == CON_GRAY ) {
towho->Message(0, "...%s is red to me (basically)", mob->GetName(),
towho->Message(Chat::White, "...%s is red to me (basically)", mob->GetName(),
dist2, iAggroRange2);
return;
}
@ -178,9 +178,9 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
mob_primary = own->GetPrimaryFaction();
if(mob_primary == 0) {
towho->Message(0, "...%s has no primary faction", mob->GetName());
towho->Message(Chat::White, "...%s has no primary faction", mob->GetName());
} else if(mob_primary < 0) {
towho->Message(0, "...%s is on special faction %d", mob->GetName(), mob_primary);
towho->Message(Chat::White, "...%s is on special faction %d", mob->GetName(), mob_primary);
} else {
char namebuf[256];
if(!database.GetFactionName(mob_primary, namebuf, sizeof(namebuf)))
@ -193,22 +193,22 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
struct NPCFaction* fac = *cur;
if ((int32)fac->factionID == mob_primary) {
if (fac->npc_value > 0) {
towho->Message(0, "...%s is on ALLY faction %s (%d) with %d", mob->GetName(), namebuf, mob_primary, fac->npc_value);
towho->Message(Chat::White, "...%s is on ALLY faction %s (%d) with %d", mob->GetName(), namebuf, mob_primary, fac->npc_value);
res = true;
break;
} else if (fac->npc_value < 0) {
towho->Message(0, "...%s is on ENEMY faction %s (%d) with %d", mob->GetName(), namebuf, mob_primary, fac->npc_value);
towho->Message(Chat::White, "...%s is on ENEMY faction %s (%d) with %d", mob->GetName(), namebuf, mob_primary, fac->npc_value);
res = true;
break;
} else {
towho->Message(0, "...%s is on NEUTRAL faction %s (%d) with 0", mob->GetName(), namebuf, mob_primary);
towho->Message(Chat::White, "...%s is on NEUTRAL faction %s (%d) with 0", mob->GetName(), namebuf, mob_primary);
res = true;
break;
}
}
}
if(!res) {
towho->Message(0, "...%s is on faction %s (%d), which I have no entry for.", mob->GetName(), namebuf, mob_primary);
towho->Message(Chat::White, "...%s is on faction %s (%d), which I have no entry for.", mob->GetName(), namebuf, mob_primary);
}
}
}
@ -222,18 +222,18 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) {
||
fv == FACTION_THREATENLY
)) {
towho->Message(0, "...%s faction not low enough. value='%s'", mob->GetName(), FactionValueToString(fv));
towho->Message(Chat::White, "...%s faction not low enough. value='%s'", mob->GetName(), FactionValueToString(fv));
return;
}
if(fv == FACTION_THREATENLY) {
towho->Message(0, "...%s threatening to me, so they only have a %d chance per check of attacking.", mob->GetName());
towho->Message(Chat::White, "...%s threatening to me, so they only have a %d chance per check of attacking.", mob->GetName());
}
if(!CheckLosFN(mob)) {
towho->Message(0, "...%s is out of sight.", mob->GetName());
towho->Message(Chat::White, "...%s is out of sight.", mob->GetName());
}
towho->Message(0, "...%s meets all conditions, I should be attacking them.", mob->GetName());
towho->Message(Chat::White, "...%s meets all conditions, I should be attacking them.", mob->GetName());
}
/*

View File

@ -1319,7 +1319,7 @@ void Mob::DoAttack(Mob *other, DamageHitInfo &hit, ExtraAttackOptions *opts)
if (other->AvoidDamage(this, hit)) {
int strike_through = itembonuses.StrikeThrough + spellbonuses.StrikeThrough + aabonuses.StrikeThrough;
if (strike_through && zone->random.Roll(strike_through)) {
Message_StringID(MT_StrikeThrough,
MessageString(Chat::StrikeThrough,
STRIKETHROUGH_STRING); // You strike through your opponents defenses!
hit.damage_done = 1; // set to one, we will check this to continue
}
@ -1340,9 +1340,9 @@ void Mob::DoAttack(Mob *other, DamageHitInfo &hit, ExtraAttackOptions *opts)
int stun_resist2 = other->spellbonuses.FrontalStunResist + other->itembonuses.FrontalStunResist + other->aabonuses.FrontalStunResist;
int stun_resist = other->spellbonuses.StunResist + other->itembonuses.StunResist + other->aabonuses.StunResist;
if (zone->random.Roll(stun_resist2)) {
other->Message_StringID(MT_Stun, AVOID_STUNNING_BLOW);
other->MessageString(Chat::Stun, AVOID_STUNNING_BLOW);
} else if (zone->random.Roll(stun_resist)) {
other->Message_StringID(MT_Stun, SHAKE_OFF_STUN);
other->MessageString(Chat::Stun, SHAKE_OFF_STUN);
} else {
other->Stun(3000); // yuck -- 3 seconds
}
@ -1392,7 +1392,7 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
if (DivineAura() && !GetGM()) {//cant attack while invulnerable unless your a gm
Log(Logs::Detail, Logs::Combat, "Attack canceled, Divine Aura is in effect.");
Message_StringID(MT_DefaultText, DIVINE_AURA_NO_ATK); //You can't attack while invulnerable!
MessageString(Chat::DefaultText, DIVINE_AURA_NO_ATK); //You can't attack while invulnerable!
return false;
}
@ -1615,16 +1615,16 @@ bool Client::Death(Mob* killerMob, int32 damage, uint16 spell, EQEmu::skills::Sk
if (killerMob && killerMob->IsClient() && (spell != SPELL_UNKNOWN) && damage > 0) {
char val1[20] = { 0 };
entity_list.MessageClose_StringID(
entity_list.MessageCloseString(
this, /* Sender */
false, /* Skip Sender */
RuleI(Range, DamageMessages),
MT_NonMelee, /* 283 */
Chat::NonMelee, /* 283 */
HIT_NON_MELEE, /* %1 hit %2 for %3 points of non-melee damage. */
killerMob->GetCleanName(), /* Message1 */
GetCleanName(), /* Message2 */
ConvertArray(damage, val1)/* Message3 */
);
);
}
int exploss = 0;
@ -1914,7 +1914,7 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
//Check that we can attack before we calc heading and face our target
if (!IsAttackAllowed(other)) {
if (this->GetOwnerID())
this->Say_StringID(NOT_LEGAL_TARGET);
this->SayString(NOT_LEGAL_TARGET);
if (other) {
if (other->IsClient())
other->CastToClient()->RemoveXTarget(this, false);
@ -2129,7 +2129,7 @@ void NPC::Damage(Mob* other, int32 damage, uint16 spell_id, EQEmu::skills::Skill
{
if (IsLDoNTrapped())
{
Message_StringID(13, LDON_ACCIDENT_SETOFF2);
MessageString(Chat::Red, LDON_ACCIDENT_SETOFF2);
SpellFinished(GetLDoNTrapSpellID(), other, EQEmu::spells::CastingSlot::Item, 0, -1, spells[GetLDoNTrapSpellID()].ResistDiff, false);
SetLDoNTrapSpellID(0);
SetLDoNTrapped(false);
@ -2169,16 +2169,16 @@ bool NPC::Death(Mob* killer_mob, int32 damage, uint16 spell, EQEmu::skills::Skil
if (killer_mob->IsClient() && (spell != SPELL_UNKNOWN) && damage > 0) {
char val1[20] = { 0 };
entity_list.MessageClose_StringID(
entity_list.MessageCloseString(
this, /* Sender */
false, /* Skip Sender */
RuleI(Range, DamageMessages),
MT_NonMelee, /* 283 */
Chat::NonMelee, /* 283 */
HIT_NON_MELEE, /* %1 hit %2 for %3 points of non-melee damage. */
killer_mob->GetCleanName(), /* Message1 */
GetCleanName(), /* Message2 */
ConvertArray(damage, val1) /* Message3 */
);
);
}
}
else {
@ -3425,7 +3425,7 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
//we used to do a message to the client, but its gone now.
// emote goes with every one ... even npcs
entity_list.MessageClose(this, true, RuleI(Range, SpellMessages), MT_Emote, "%s beams a smile at %s", attacker->GetCleanName(), this->GetCleanName());
entity_list.MessageClose(this, true, RuleI(Range, SpellMessages), Chat::Emote, "%s beams a smile at %s", attacker->GetCleanName(), this->GetCleanName());
}
} //end `if there is some damage being done and theres anattacker person involved`
@ -3439,7 +3439,7 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
Log(Logs::Detail, Logs::Aggro, "Sending pet %s into battle due to attack.", pet->GetName());
pet->AddToHateList(attacker, 1, 0, true, false, false, spell_id);
pet->SetTarget(attacker);
Message_StringID(10, PET_ATTACKING, pet->GetCleanName(), attacker->GetCleanName());
MessageString(Chat::NPCQuestSay, PET_ATTACKING, pet->GetCleanName(), attacker->GetCleanName());
}
}
@ -3459,7 +3459,7 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
damage = AffectMagicalDamage(damage, spell_id, iBuffTic, attacker);
if (origdmg != damage && attacker && attacker->IsClient()) {
if (attacker->CastToClient()->GetFilter(FilterDamageShields) != FilterHide)
attacker->Message(15, "The Spellshield absorbed %d of %d points of damage", origdmg - damage, origdmg);
attacker->Message(Chat::Yellow, "The Spellshield absorbed %d of %d points of damage", origdmg - damage, origdmg);
}
if (damage == 0 && attacker && origdmg != damage && IsClient()) {
//Kayen: Probably need to add a filter for this - Not sure if this msg is correct but there should be a message for spell negate/runes.
@ -3507,15 +3507,15 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
//fade mez if we are mezzed
if (IsMezzed() && attacker) {
Log(Logs::Detail, Logs::Combat, "Breaking mez due to attack.");
entity_list.MessageClose_StringID(
entity_list.MessageCloseString(
this, /* Sender */
true, /* Skip Sender */
RuleI(Range, SpellMessages),
MT_WornOff, /* 284 */
Chat::SpellWornOff, /* 284 */
HAS_BEEN_AWAKENED, // %1 has been awakened by %2.
GetCleanName(), /* Message1 */
attacker->GetCleanName() /* Message2 */
);
);
BuffFadeByEffect(SE_Mez);
}
@ -3564,13 +3564,13 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
else {
// stun resist passed!
if (IsClient())
Message_StringID(MT_Stun, SHAKE_OFF_STUN);
MessageString(Chat::Stun, SHAKE_OFF_STUN);
}
}
else {
// stun resist 2 passed!
if (IsClient())
Message_StringID(MT_Stun, AVOID_STUNNING_BLOW);
MessageString(Chat::Stun, AVOID_STUNNING_BLOW);
}
}
else {
@ -3650,7 +3650,7 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
if (((spell_id != SPELL_UNKNOWN) || (FromDamageShield)) && damage>0) {
//special crap for spell damage, looks hackish to me
char val1[20] = { 0 };
owner->Message_StringID(MT_NonMelee, OTHER_HIT_NONMELEE, GetCleanName(), ConvertArray(damage, val1));
owner->MessageString(Chat::NonMelee, OTHER_HIT_NONMELEE, GetCleanName(), ConvertArray(damage, val1));
}
else {
if (damage > 0) {
@ -3680,19 +3680,19 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
char val1[20] = { 0 };
if (FromDamageShield) {
if (attacker->CastToClient()->GetFilter(FilterDamageShields) != FilterHide)
attacker->Message_StringID(MT_DS, OTHER_HIT_NONMELEE, GetCleanName(), ConvertArray(damage, val1));
attacker->MessageString(Chat::DamageShield, OTHER_HIT_NONMELEE, GetCleanName(), ConvertArray(damage, val1));
}
else {
entity_list.MessageClose_StringID(
entity_list.MessageCloseString(
this, /* Sender */
true, /* Skip Sender */
RuleI(Range, SpellMessages),
MT_NonMelee, /* 283 */
Chat::NonMelee, /* 283 */
HIT_NON_MELEE, /* %1 hit %2 for %3 points of non-melee damage. */
attacker->GetCleanName(), /* Message1 */
GetCleanName(), /* Message2 */
ConvertArray(damage, val1) /* Message3 */
);
);
}
}
else {
@ -3754,22 +3754,22 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
// So we can see our dot dmg like live shows it.
if (spell_id != SPELL_UNKNOWN && damage > 0 && attacker && attacker != this && attacker->IsClient()) {
//might filter on (attack_skill>200 && attack_skill<250), but I dont think we need it
attacker->FilteredMessage_StringID(attacker, MT_DoTDamage, FilterDOT,
attacker->FilteredMessageString(attacker, Chat::DotDamage, FilterDOT,
YOUR_HIT_DOT, GetCleanName(), itoa(damage), spells[spell_id].name);
/* older clients don't have the below String ID, but it will be filtered */
entity_list.FilteredMessageClose_StringID(
entity_list.FilteredMessageCloseString(
attacker, /* Sender */
true, /* Skip Sender */
RuleI(Range, SpellMessages),
MT_DoTDamage, /* Type: 325 */
Chat::DotDamage, /* Type: 325 */
FilterDOT, /* FilterType: 19 */
OTHER_HIT_DOT, /* MessageFormat: %1 has taken %2 damage from %3 by %4. */
GetCleanName(), /* Message1 */
itoa(damage), /* Message2 */
attacker->GetCleanName(), /* Message3 */
spells[spell_id].name /* Message4 */
);
);
}
} //end packet sending
@ -3792,42 +3792,42 @@ void Mob::HealDamage(uint32 amount, Mob *caster, uint16 spell_id)
// message to caster
if (caster->IsClient() && caster == this) {
if (caster->CastToClient()->ClientVersionBit() & EQEmu::versions::maskSoFAndLater)
FilteredMessage_StringID(caster, MT_NonMelee, FilterHealOverTime,
FilteredMessageString(caster, Chat::NonMelee, FilterHealOverTime,
HOT_HEAL_SELF, itoa(acthealed), spells[spell_id].name);
else
FilteredMessage_StringID(caster, MT_NonMelee, FilterHealOverTime,
FilteredMessageString(caster, Chat::NonMelee, FilterHealOverTime,
YOU_HEALED, GetCleanName(), itoa(acthealed));
}
else if (caster->IsClient() && caster != this) {
if (caster->CastToClient()->ClientVersionBit() & EQEmu::versions::maskSoFAndLater)
caster->FilteredMessage_StringID(caster, MT_NonMelee, FilterHealOverTime,
caster->FilteredMessageString(caster, Chat::NonMelee, FilterHealOverTime,
HOT_HEAL_OTHER, GetCleanName(), itoa(acthealed),
spells[spell_id].name);
else
caster->FilteredMessage_StringID(caster, MT_NonMelee, FilterHealOverTime,
caster->FilteredMessageString(caster, Chat::NonMelee, FilterHealOverTime,
YOU_HEAL, GetCleanName(), itoa(acthealed));
}
// message to target
if (IsClient() && caster != this) {
if (CastToClient()->ClientVersionBit() & EQEmu::versions::maskSoFAndLater)
FilteredMessage_StringID(this, MT_NonMelee, FilterHealOverTime,
FilteredMessageString(this, Chat::NonMelee, FilterHealOverTime,
HOT_HEALED_OTHER, caster->GetCleanName(),
itoa(acthealed), spells[spell_id].name);
else
FilteredMessage_StringID(this, MT_NonMelee, FilterHealOverTime,
FilteredMessageString(this, Chat::NonMelee, FilterHealOverTime,
YOU_HEALED, caster->GetCleanName(), itoa(acthealed));
}
}
else { // normal heals
FilteredMessage_StringID(caster, MT_NonMelee, FilterSpellDamage,
FilteredMessageString(caster, Chat::NonMelee, FilterSpellDamage,
YOU_HEALED, caster->GetCleanName(), itoa(acthealed));
if (caster != this)
caster->FilteredMessage_StringID(caster, MT_NonMelee, FilterSpellDamage,
caster->FilteredMessageString(caster, Chat::NonMelee, FilterSpellDamage,
YOU_HEAL, GetCleanName(), itoa(acthealed));
}
}
else {
Message(MT_NonMelee, "You have been healed for %d points of damage.", acthealed);
Message(Chat::NonMelee, "You have been healed for %d points of damage.", acthealed);
}
}
@ -3993,10 +3993,10 @@ void Mob::TryWeaponProc(const EQEmu::ItemInstance *inst, const EQEmu::ItemData *
if (IsPet()) {
Mob *own = GetOwner();
if (own)
own->Message_StringID(13, PROC_PETTOOLOW);
own->MessageString(Chat::Red, PROC_PETTOOLOW);
}
else {
Message_StringID(13, PROC_TOOLOW);
MessageString(Chat::Red, PROC_TOOLOW);
}
}
else {
@ -4030,10 +4030,10 @@ void Mob::TryWeaponProc(const EQEmu::ItemInstance *inst, const EQEmu::ItemData *
if (IsPet()) {
Mob *own = GetOwner();
if (own)
own->Message_StringID(13, PROC_PETTOOLOW);
own->MessageString(Chat::Red, PROC_PETTOOLOW);
}
else {
Message_StringID(13, PROC_TOOLOW);
MessageString(Chat::Red, PROC_TOOLOW);
}
}
else {
@ -4183,16 +4183,16 @@ void Mob::TryPetCriticalHit(Mob *defender, DamageHitInfo &hit)
hit.damage_done += 5;
hit.damage_done = (hit.damage_done * critMod) / 100;
entity_list.FilteredMessageClose_StringID(
entity_list.FilteredMessageCloseString(
this, /* Sender */
false, /* Skip Sender */
RuleI(Range, CriticalDamage),
MT_CritMelee, /* Type: 301 */
Chat::MeleeCrit, /* Type: 301 */
FilterMeleeCrits, /* FilterType: 12 */
CRITICAL_HIT, /* MessageFormat: %1 scores a critical hit! (%2) */
GetCleanName(), /* Message1 */
itoa(hit.damage_done + hit.min_damage) /* Message2 */
);
);
}
}
@ -4243,29 +4243,29 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
/* Female */
if (GetGender() == 1) {
entity_list.FilteredMessageClose_StringID(
entity_list.FilteredMessageCloseString(
this, /* Sender */
false, /* Skip Sender */
RuleI(Range, CriticalDamage),
MT_CritMelee, /* Type: 301 */
Chat::MeleeCrit, /* Type: 301 */
FilterMeleeCrits, /* FilterType: 12 */
FEMALE_SLAYUNDEAD, /* MessageFormat: %1's holy blade cleanses her target!(%2) */
GetCleanName(), /* Message1 */
itoa(hit.damage_done + hit.min_damage) /* Message2 */
);
);
}
/* Males and Neuter */
else {
entity_list.FilteredMessageClose_StringID(
entity_list.FilteredMessageCloseString(
this, /* Sender */
false, /* Skip Sender */
RuleI(Range, CriticalDamage),
MT_CritMelee, /* Type: 301 */
Chat::MeleeCrit, /* Type: 301 */
FilterMeleeCrits, /* FilterType: 12 */
MALE_SLAYUNDEAD, /* MessageFormat: %1's holy blade cleanses his target!(%2) */
GetCleanName(), /* Message1 */
itoa(hit.damage_done + hit.min_damage) /* Message2 */
);
);
}
return;
}
@ -4340,16 +4340,16 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
}
hit.damage_done = hit.damage_done * 200 / 100;
entity_list.FilteredMessageClose_StringID(
entity_list.FilteredMessageCloseString(
this, /* Sender */
false, /* Skip Sender */
RuleI(Range, CriticalDamage),
MT_CritMelee, /* Type: 301 */
Chat::MeleeCrit, /* Type: 301 */
FilterMeleeCrits, /* FilterType: 12 */
DEADLY_STRIKE, /* MessageFormat: %1 scores a Deadly Strike!(%2) */
GetCleanName(), /* Message1 */
itoa(hit.damage_done + hit.min_damage) /* Message2 */
);
);
return;
}
}
@ -4368,16 +4368,16 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
hit.damage_done += og_damage * 119 / 100;
Log(Logs::Detail, Logs::Combat, "Crip damage %d", hit.damage_done);
entity_list.FilteredMessageClose_StringID(
entity_list.FilteredMessageCloseString(
this, /* Sender */
false, /* Skip Sender */
RuleI(Range, CriticalDamage),
MT_CritMelee, /* Type: 301 */
Chat::MeleeCrit, /* Type: 301 */
FilterMeleeCrits, /* FilterType: 12 */
CRIPPLING_BLOW, /* MessageFormat: %1 lands a Crippling Blow!(%2) */
GetCleanName(), /* Message1 */
itoa(hit.damage_done + hit.min_damage) /* Message2 */
);
);
// Crippling blows also have a chance to stun
// Kayen: Crippling Blow would cause a chance to interrupt for npcs < 55, with a
@ -4390,16 +4390,16 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
}
/* Normal Critical hit message */
entity_list.FilteredMessageClose_StringID(
entity_list.FilteredMessageCloseString(
this, /* Sender */
false, /* Skip Sender */
RuleI(Range, CriticalDamage),
MT_CritMelee, /* Type: 301 */
Chat::MeleeCrit, /* Type: 301 */
FilterMeleeCrits, /* FilterType: 12 */
CRITICAL_HIT, /* MessageFormat: %1 scores a critical hit! (%2) */
GetCleanName(), /* Message1 */
itoa(hit.damage_done + hit.min_damage) /* Message2 */
);
);
}
}
}
@ -4427,15 +4427,15 @@ bool Mob::TryFinishingBlow(Mob *defender, int &damage)
(ProcChance >= zone->random.Int(1, 1000))) {
/* Finishing Blow Critical Message */
entity_list.FilteredMessageClose_StringID(
entity_list.FilteredMessageCloseString(
this, /* Sender */
false, /* Skip Sender */
RuleI(Range, CriticalDamage),
MT_CritMelee, /* Type: 301 */
Chat::MeleeCrit, /* Type: 301 */
FilterMeleeCrits, /* FilterType: 12 */
FINISHING_BLOW, /* MessageFormat: %1 scores a Finishing Blow!!) */
GetCleanName() /* Message1 */
);
);
damage = FB_Dmg;
return true;
@ -4453,7 +4453,7 @@ void Mob::DoRiposte(Mob *defender)
// so ahhh the angle you can riposte is larger than the angle you can hit :P
if (!defender->IsFacingMob(this)) {
defender->Message_StringID(MT_TooFarAway, CANT_SEE_TARGET);
defender->MessageString(Chat::TooFarAway, CANT_SEE_TARGET);
return;
}
@ -5042,7 +5042,7 @@ void Mob::CommonOutgoingHitSuccess(Mob* defender, DamageHitInfo &hit, ExtraAttac
else if (GetClass() == RANGER && GetLevel() > 50) { // no double dmg on headshot
if ((defender->IsNPC() && !defender->IsMoving() && !defender->IsRooted()) || !RuleB(Combat, ArcheryBonusRequiresStationary)) {
hit.damage_done *= 2;
Message_StringID(MT_CritMelee, BOW_DOUBLE_DAMAGE);
MessageString(Chat::MeleeCrit, BOW_DOUBLE_DAMAGE);
}
}
}
@ -5347,7 +5347,7 @@ void Client::DoAttackRounds(Mob *target, int hand, bool IsFromSpell)
Attack(target, hand, false, false, IsFromSpell);
if (zone->random.Roll(flurrychance))
Attack(target, hand, false, false, IsFromSpell);
Message_StringID(MT_NPCFlurry, YOU_FLURRY);
MessageString(Chat::NPCFlurry, YOU_FLURRY);
}
}
}

View File

@ -710,13 +710,13 @@ void Mob::MakeAura(uint16 spell_id)
AuraRecord record;
if (!database.GetAuraEntry(spell_id, record)) {
Message(13, "Unable to find data for aura %s", spells[spell_id].name);
Message(Chat::Red, "Unable to find data for aura %s", spells[spell_id].name);
Log(Logs::General, Logs::Error, "Unable to find data for aura %d, check auras table.", spell_id);
return;
}
if (!IsValidSpell(record.spell_id)) {
Message(13, "Casted spell (%d) is not valid for aura %s", record.spell_id, spells[spell_id].name);
Message(Chat::Red, "Casted spell (%d) is not valid for aura %s", record.spell_id, spells[spell_id].name);
Log(Logs::General, Logs::Error, "Casted spell (%d) is not valid for aura %d, check auras table.",
record.spell_id, spell_id);
return;
@ -744,7 +744,7 @@ void Mob::MakeAura(uint16 spell_id)
const auto base = database.LoadNPCTypesData(record.npc_type);
if (base == nullptr) {
Message(13, "Unable to load NPC data for aura %s", spells[spell_id].teleport_zone);
Message(Chat::Red, "Unable to load NPC data for aura %s", spells[spell_id].teleport_zone);
Log(Logs::General, Logs::Error,
"Unable to load NPC data for aura %s (NPC ID %d), check auras and npc_types tables.",
spells[spell_id].teleport_zone, record.npc_type);
@ -841,10 +841,10 @@ void Mob::AddTrap(Aura *aura, AuraRecord &record)
bool Mob::CanSpawnAura(bool trap)
{
if (trap && !HasFreeTrapSlots()) {
Message_StringID(MT_SpellFailure, NO_MORE_TRAPS);
MessageString(Chat::SpellFailure, NO_MORE_TRAPS);
return false;
} else if (!trap && !HasFreeAuraSlots()) {
Message_StringID(MT_SpellFailure, NO_MORE_AURAS);
MessageString(Chat::SpellFailure, NO_MORE_AURAS);
return false;
}
@ -878,8 +878,6 @@ void Mob::RemoveAllAuras()
}
trap_mgr.count = 0;
return;
}
void Mob::RemoveAura(int spawn_id, bool skip_strip, bool expired)
@ -891,7 +889,7 @@ void Mob::RemoveAura(int spawn_id, bool skip_strip, bool expired)
aura.aura->Depop(skip_strip);
if (expired && IsClient()) {
CastToClient()->SendColoredText(
CC_Yellow, StringFormat("%s has expired.", aura.name)); // TODO: verify color
Chat::Yellow, StringFormat("%s has expired.", aura.name)); // TODO: verify color
// need to update client UI too
auto app = new EQApplicationPacket(OP_UpdateAura, sizeof(AuraDestory_Struct));
auto ads = (AuraDestory_Struct *)app->pBuffer;
@ -920,7 +918,7 @@ void Mob::RemoveAura(int spawn_id, bool skip_strip, bool expired)
aura.aura->Depop(skip_strip);
if (expired && IsClient())
CastToClient()->SendColoredText(
CC_Yellow, StringFormat("%s has expired.", aura.name)); // TODO: verify color
Chat::Yellow, StringFormat("%s has expired.", aura.name)); // TODO: verify color
while (trap_mgr.count - 1 > i) {
i++;
aura.spawn_id = trap_mgr.auras[i].spawn_id;

View File

@ -159,9 +159,9 @@ Bot::Bot(uint32 botID, uint32 botOwnerCharacterID, uint32 botSpellsID, double to
bool stance_flag = false;
if (!database.botdb.LoadStance(this, stance_flag) && bot_owner)
bot_owner->Message(13, "%s for '%s'", BotDatabase::fail::LoadStance(), GetCleanName());
bot_owner->Message(Chat::Red, "%s for '%s'", BotDatabase::fail::LoadStance(), GetCleanName());
if (!stance_flag && bot_owner)
bot_owner->Message(13, "Could not locate stance for '%s'", GetCleanName());
bot_owner->Message(Chat::Red, "Could not locate stance for '%s'", GetCleanName());
SetTaunting((GetClass() == WARRIOR || GetClass() == PALADIN || GetClass() == SHADOWKNIGHT) && (GetBotStance() == EQEmu::constants::stanceAggressive));
SetPauseAI(false);
@ -178,17 +178,17 @@ Bot::Bot(uint32 botID, uint32 botOwnerCharacterID, uint32 botSpellsID, double to
memset(&_botInspectMessage, 0, sizeof(InspectMessage_Struct));
if (!database.botdb.LoadInspectMessage(GetBotID(), _botInspectMessage) && bot_owner)
bot_owner->Message(13, "%s for '%s'", BotDatabase::fail::LoadInspectMessage(), GetCleanName());
bot_owner->Message(Chat::Red, "%s for '%s'", BotDatabase::fail::LoadInspectMessage(), GetCleanName());
if (!database.botdb.LoadGuildMembership(GetBotID(), _guildId, _guildRank, _guildName) && bot_owner)
bot_owner->Message(13, "%s for '%s'", BotDatabase::fail::LoadGuildMembership(), GetCleanName());
bot_owner->Message(Chat::Red, "%s for '%s'", BotDatabase::fail::LoadGuildMembership(), GetCleanName());
std::string error_message;
EquipBot(&error_message);
if(!error_message.empty()) {
if(bot_owner)
bot_owner->Message(13, error_message.c_str());
bot_owner->Message(Chat::Red, error_message.c_str());
error_message.clear();
}
@ -206,12 +206,12 @@ Bot::Bot(uint32 botID, uint32 botOwnerCharacterID, uint32 botSpellsID, double to
GenerateBaseStats();
if (!database.botdb.LoadTimers(this) && bot_owner)
bot_owner->Message(13, "%s for '%s'", BotDatabase::fail::LoadTimers(), GetCleanName());
bot_owner->Message(Chat::Red, "%s for '%s'", BotDatabase::fail::LoadTimers(), GetCleanName());
LoadAAs();
if (!database.botdb.LoadBuffs(this) && bot_owner)
bot_owner->Message(13, "&s for '%s'", BotDatabase::fail::LoadBuffs(), GetCleanName());
bot_owner->Message(Chat::Red, "&s for '%s'", BotDatabase::fail::LoadBuffs(), GetCleanName());
CalcBotStats(false);
hp_regen = CalcHPRegen();
@ -1701,28 +1701,28 @@ bool Bot::Save()
if(!GetBotID()) { // New bot record
uint32 bot_id = 0;
if (!database.botdb.SaveNewBot(this, bot_id) || !bot_id) {
bot_owner->Message(13, "%s '%s'", BotDatabase::fail::SaveNewBot(), GetCleanName());
bot_owner->Message(Chat::Red, "%s '%s'", BotDatabase::fail::SaveNewBot(), GetCleanName());
return false;
}
SetBotID(bot_id);
}
else { // Update existing bot record
if (!database.botdb.SaveBot(this)) {
bot_owner->Message(13, "%s '%s'", BotDatabase::fail::SaveBot(), GetCleanName());
bot_owner->Message(Chat::Red, "%s '%s'", BotDatabase::fail::SaveBot(), GetCleanName());
return false;
}
}
// All of these continue to process if any fail
if (!database.botdb.SaveBuffs(this))
bot_owner->Message(13, "%s for '%s'", BotDatabase::fail::SaveBuffs(), GetCleanName());
bot_owner->Message(Chat::Red, "%s for '%s'", BotDatabase::fail::SaveBuffs(), GetCleanName());
if (!database.botdb.SaveTimers(this))
bot_owner->Message(13, "%s for '%s'", BotDatabase::fail::SaveTimers(), GetCleanName());
bot_owner->Message(Chat::Red, "%s for '%s'", BotDatabase::fail::SaveTimers(), GetCleanName());
if (!database.botdb.SaveStance(this))
bot_owner->Message(13, "%s for '%s'", BotDatabase::fail::SaveStance(), GetCleanName());
bot_owner->Message(Chat::Red, "%s for '%s'", BotDatabase::fail::SaveStance(), GetCleanName());
if (!SavePet())
bot_owner->Message(13, "Failed to save pet for '%s'", GetCleanName());
bot_owner->Message(Chat::Red, "Failed to save pet for '%s'", GetCleanName());
return true;
}
@ -1734,26 +1734,26 @@ bool Bot::DeleteBot()
return false;
if (!database.botdb.DeleteHealRotation(GetBotID())) {
bot_owner->Message(13, "%s", BotDatabase::fail::DeleteHealRotation());
bot_owner->Message(Chat::Red, "%s", BotDatabase::fail::DeleteHealRotation());
return false;
}
std::string query = StringFormat("DELETE FROM `bot_heal_rotation_members` WHERE `bot_id` = '%u'", GetBotID());
auto results = database.QueryDatabase(query);
if (!results.Success()) {
bot_owner->Message(13, "Failed to delete heal rotation member '%s'", GetCleanName());
bot_owner->Message(Chat::Red, "Failed to delete heal rotation member '%s'", GetCleanName());
return false;
}
query = StringFormat("DELETE FROM `bot_heal_rotation_targets` WHERE `target_name` LIKE '%s'", GetCleanName());
results = database.QueryDatabase(query);
if (!results.Success()) {
bot_owner->Message(13, "Failed to delete heal rotation target '%s'", GetCleanName());
bot_owner->Message(Chat::Red, "Failed to delete heal rotation target '%s'", GetCleanName());
return false;
}
if (!DeletePet()) {
bot_owner->Message(13, "Failed to delete pet for '%s'", GetCleanName());
bot_owner->Message(Chat::Red, "Failed to delete pet for '%s'", GetCleanName());
return false;
}
@ -1763,32 +1763,32 @@ bool Bot::DeleteBot()
std::string error_message;
if (!database.botdb.RemoveMemberFromBotGroup(GetBotID())) {
bot_owner->Message(13, "%s - '%s'", BotDatabase::fail::RemoveMemberFromBotGroup(), GetCleanName());
bot_owner->Message(Chat::Red, "%s - '%s'", BotDatabase::fail::RemoveMemberFromBotGroup(), GetCleanName());
return false;
}
if (!database.botdb.DeleteItems(GetBotID())) {
bot_owner->Message(13, "%s for '%s'", BotDatabase::fail::DeleteItems(), GetCleanName());
bot_owner->Message(Chat::Red, "%s for '%s'", BotDatabase::fail::DeleteItems(), GetCleanName());
return false;
}
if (!database.botdb.DeleteTimers(GetBotID())) {
bot_owner->Message(13, "%s for '%s'", BotDatabase::fail::DeleteTimers(), GetCleanName());
bot_owner->Message(Chat::Red, "%s for '%s'", BotDatabase::fail::DeleteTimers(), GetCleanName());
return false;
}
if (!database.botdb.DeleteBuffs(GetBotID())) {
bot_owner->Message(13, "%s for '%s'", BotDatabase::fail::DeleteBuffs(), GetCleanName());
bot_owner->Message(Chat::Red, "%s for '%s'", BotDatabase::fail::DeleteBuffs(), GetCleanName());
return false;
}
if (!database.botdb.DeleteStance(GetBotID())) {
bot_owner->Message(13, "%s for '%s'", BotDatabase::fail::DeleteStance(), GetCleanName());
bot_owner->Message(Chat::Red, "%s for '%s'", BotDatabase::fail::DeleteStance(), GetCleanName());
return false;
}
if (!database.botdb.DeleteBot(GetBotID())) {
bot_owner->Message(13, "%s '%s'", BotDatabase::fail::DeleteBot(), GetCleanName());
bot_owner->Message(Chat::Red, "%s '%s'", BotDatabase::fail::DeleteBot(), GetCleanName());
return false;
}
@ -1832,7 +1832,7 @@ bool Bot::LoadPet()
uint32 pet_index = 0;
if (!database.botdb.LoadPetIndex(GetBotID(), pet_index)) {
bot_owner->Message(13, "%s for %s's pet", BotDatabase::fail::LoadPetIndex(), GetCleanName());
bot_owner->Message(Chat::Red, "%s for %s's pet", BotDatabase::fail::LoadPetIndex(), GetCleanName());
return false;
}
if (!pet_index)
@ -1840,10 +1840,10 @@ bool Bot::LoadPet()
uint32 saved_pet_spell_id = 0;
if (!database.botdb.LoadPetSpellID(GetBotID(), saved_pet_spell_id)) {
bot_owner->Message(13, "%s for %s's pet", BotDatabase::fail::LoadPetSpellID(), GetCleanName());
bot_owner->Message(Chat::Red, "%s for %s's pet", BotDatabase::fail::LoadPetSpellID(), GetCleanName());
}
if (!IsValidSpell(saved_pet_spell_id)) {
bot_owner->Message(13, "Invalid spell id for %s's pet", GetCleanName());
bot_owner->Message(Chat::Red, "Invalid spell id for %s's pet", GetCleanName());
DeletePet();
return false;
}
@ -1854,7 +1854,7 @@ bool Bot::LoadPet()
uint32 pet_spell_id = 0;
if (!database.botdb.LoadPetStats(GetBotID(), pet_name, pet_mana, pet_hp, pet_spell_id)) {
bot_owner->Message(13, "%s for %s's pet", BotDatabase::fail::LoadPetStats(), GetCleanName());
bot_owner->Message(Chat::Red, "%s for %s's pet", BotDatabase::fail::LoadPetStats(), GetCleanName());
return false;
}
@ -1869,12 +1869,12 @@ bool Bot::LoadPet()
SpellBuff_Struct pet_buffs[PET_BUFF_COUNT];
memset(pet_buffs, 0, (sizeof(SpellBuff_Struct) * PET_BUFF_COUNT));
if (!database.botdb.LoadPetBuffs(GetBotID(), pet_buffs))
bot_owner->Message(13, "%s for %s's pet", BotDatabase::fail::LoadPetBuffs(), GetCleanName());
bot_owner->Message(Chat::Red, "%s for %s's pet", BotDatabase::fail::LoadPetBuffs(), GetCleanName());
uint32 pet_items[EQEmu::invslot::EQUIPMENT_COUNT];
memset(pet_items, 0, (sizeof(uint32) * EQEmu::invslot::EQUIPMENT_COUNT));
if (!database.botdb.LoadPetItems(GetBotID(), pet_items))
bot_owner->Message(13, "%s for %s's pet", BotDatabase::fail::LoadPetItems(), GetCleanName());
bot_owner->Message(Chat::Red, "%s for %s's pet", BotDatabase::fail::LoadPetItems(), GetCleanName());
pet_inst->SetPetState(pet_buffs, pet_items);
pet_inst->CalcBonuses();
@ -1913,14 +1913,14 @@ bool Bot::SavePet()
std::string error_message;
if (!database.botdb.SavePetStats(GetBotID(), pet_name_str, pet_inst->GetMana(), pet_inst->GetHP(), pet_inst->GetPetSpellID())) {
bot_owner->Message(13, "%s for %s's pet", BotDatabase::fail::SavePetStats(), GetCleanName());
bot_owner->Message(Chat::Red, "%s for %s's pet", BotDatabase::fail::SavePetStats(), GetCleanName());
return false;
}
if (!database.botdb.SavePetBuffs(GetBotID(), pet_buffs))
bot_owner->Message(13, "%s for %s's pet", BotDatabase::fail::SavePetBuffs(), GetCleanName());
bot_owner->Message(Chat::Red, "%s for %s's pet", BotDatabase::fail::SavePetBuffs(), GetCleanName());
if (!database.botdb.SavePetItems(GetBotID(), pet_items))
bot_owner->Message(13, "%s for %s's pet", BotDatabase::fail::SavePetItems(), GetCleanName());
bot_owner->Message(Chat::Red, "%s for %s's pet", BotDatabase::fail::SavePetItems(), GetCleanName());
return true;
}
@ -1934,15 +1934,15 @@ bool Bot::DeletePet()
std::string error_message;
if (!database.botdb.DeletePetItems(GetBotID())) {
bot_owner->Message(13, "%s for %s's pet", BotDatabase::fail::DeletePetItems(), GetCleanName());
bot_owner->Message(Chat::Red, "%s for %s's pet", BotDatabase::fail::DeletePetItems(), GetCleanName());
return false;
}
if (!database.botdb.DeletePetBuffs(GetBotID())) {
bot_owner->Message(13, "%s for %s's pet", BotDatabase::fail::DeletePetBuffs(), GetCleanName());
bot_owner->Message(Chat::Red, "%s for %s's pet", BotDatabase::fail::DeletePetBuffs(), GetCleanName());
return false;
}
if (!database.botdb.DeletePetStats(GetBotID())) {
bot_owner->Message(13, "%s for %s's pet", BotDatabase::fail::DeletePetStats(), GetCleanName());
bot_owner->Message(Chat::Red, "%s for %s's pet", BotDatabase::fail::DeletePetStats(), GetCleanName());
return false;
}
@ -2276,12 +2276,12 @@ void Bot::AI_Process() {
// Berserk updates should occur if primary AI criteria are met
if (GetClass() == WARRIOR || GetClass() == BERSERKER) {
if (!berserk && GetHP() > 0 && GetHPRatio() < 30.0f) {
entity_list.MessageClose_StringID(this, false, 200, 0, BERSERK_START, GetName());
entity_list.MessageCloseString(this, false, 200, 0, BERSERK_START, GetName());
berserk = true;
}
if (berserk && GetHPRatio() >= 30.0f) {
entity_list.MessageClose_StringID(this, false, 200, 0, BERSERK_END, GetName());
entity_list.MessageCloseString(this, false, 200, 0, BERSERK_END, GetName());
berserk = false;
}
}
@ -2808,7 +2808,7 @@ void Bot::AI_Process() {
int32 flurrychance = (aabonuses.FlurryChance + spellbonuses.FlurryChance + itembonuses.FlurryChance);
if (flurrychance) {
if (zone->random.Int(0, 100) < flurrychance) {
Message_StringID(MT_NPCFlurry, YOU_FLURRY);
MessageString(Chat::NPCFlurry, YOU_FLURRY);
Attack(tar, EQEmu::invslot::slotPrimary, false);
TEST_TARGET();
@ -3256,9 +3256,9 @@ bool Bot::Spawn(Client* botCharacterOwner) {
this->texture = 0; //0xFF;
if(this->Save())
this->GetBotOwner()->CastToClient()->Message(0, "%s saved.", this->GetCleanName());
this->GetBotOwner()->CastToClient()->Message(Chat::White, "%s saved.", this->GetCleanName());
else
this->GetBotOwner()->CastToClient()->Message(13, "%s save failed!", this->GetCleanName());
this->GetBotOwner()->CastToClient()->Message(Chat::Red, "%s save failed!", this->GetCleanName());
// Spawn the bot at the bow owner's loc
this->m_Position.x = botCharacterOwner->GetX();
@ -3331,7 +3331,7 @@ uint32 Bot::GetBotItemBySlot(uint32 slotID)
if (!database.botdb.LoadItemBySlot(GetBotID(), slotID, item_id)) {
if (GetBotOwner() && GetBotOwner()->IsClient())
GetBotOwner()->CastToClient()->Message(13, "%s", BotDatabase::fail::LoadItemBySlot());
GetBotOwner()->CastToClient()->Message(Chat::Red, "%s", BotDatabase::fail::LoadItemBySlot());
}
return item_id;
@ -3434,7 +3434,7 @@ void Bot::LoadAndSpawnAllZonedBots(Client* botOwner) {
std::list<uint32> ActiveBots;
// Modified LoadGroupedBotsByGroupID to require a CharacterID
if (!database.botdb.LoadGroupedBotsByGroupID(botOwner->CharacterID(), TempGroupId, ActiveBots)) {
botOwner->Message(13, "%s", BotDatabase::fail::LoadGroupedBotsByGroupID());
botOwner->Message(Chat::Red, "%s", BotDatabase::fail::LoadGroupedBotsByGroupID());
return;
}
@ -3838,32 +3838,32 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli
}
if (client != GetOwner()) {
client->Message(CC_Red, "You are not the owner of this bot - Trade Canceled.");
client->Message(Chat::Red, "You are not the owner of this bot - Trade Canceled.");
client->ResetTrade();
return;
}
if ((beginSlotID != invslot::TRADE_BEGIN) && (beginSlotID != invslot::slotCursor)) {
client->Message(CC_Red, "Trade request processing from illegal 'begin' slot - Trade Canceled.");
client->Message(Chat::Red, "Trade request processing from illegal 'begin' slot - Trade Canceled.");
client->ResetTrade();
return;
}
if ((endSlotID != invslot::TRADE_END) && (endSlotID != invslot::slotCursor)) {
client->Message(CC_Red, "Trade request processing from illegal 'end' slot - Trade Canceled.");
client->Message(Chat::Red, "Trade request processing from illegal 'end' slot - Trade Canceled.");
client->ResetTrade();
return;
}
if (((beginSlotID == invslot::slotCursor) && (endSlotID != invslot::slotCursor)) || ((beginSlotID != invslot::slotCursor) && (endSlotID == invslot::slotCursor))) {
client->Message(CC_Red, "Trade request processing illegal slot range - Trade Canceled.");
client->Message(Chat::Red, "Trade request processing illegal slot range - Trade Canceled.");
client->ResetTrade();
return;
}
if (endSlotID < beginSlotID) {
client->Message(CC_Red, "Trade request processing in reverse slot order - Trade Canceled.");
client->Message(Chat::Red, "Trade request processing in reverse slot order - Trade Canceled.");
client->ResetTrade();
return;
}
if (client->IsEngaged() || IsEngaged()) {
client->Message(CC_Yellow, "You may not perform a trade while engaged - Trade Canceled!");
client->Message(Chat::Yellow, "You may not perform a trade while engaged - Trade Canceled!");
client->ResetTrade();
return;
}
@ -3879,23 +3879,23 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli
if (!trade_instance->GetItem()) {
// TODO: add logging
client->Message(CC_Red, "A server error was encountered while processing client slot %i - Trade Canceled.", trade_index);
client->Message(Chat::Red, "A server error was encountered while processing client slot %i - Trade Canceled.", trade_index);
client->ResetTrade();
return;
}
if ((trade_index != invslot::slotCursor) && !trade_instance->IsDroppable()) {
// TODO: add logging
client->Message(CC_Red, "Trade hack detected - Trade Canceled.");
client->Message(Chat::Red, "Trade hack detected - Trade Canceled.");
client->ResetTrade();
return;
}
if (trade_instance->IsStackable() && (trade_instance->GetCharges() < trade_instance->GetItem()->StackSize)) { // temp until partial stacks are implemented
client->Message(CC_Yellow, "'%s' is only a partially stacked item - Trade Canceled!", trade_instance->GetItem()->Name);
client->Message(Chat::Yellow, "'%s' is only a partially stacked item - Trade Canceled!", trade_instance->GetItem()->Name);
client->ResetTrade();
return;
}
if (CheckLoreConflict(trade_instance->GetItem())) {
client->Message(CC_Yellow, "This bot already has lore equipment matching the item '%s' - Trade Canceled!", trade_instance->GetItem()->Name);
client->Message(Chat::Yellow, "This bot already has lore equipment matching the item '%s' - Trade Canceled!", trade_instance->GetItem()->Name);
client->ResetTrade();
return;
}
@ -3925,13 +3925,13 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli
if ((trade_iterator.tradeItemInstance->GetItem()->LoreGroup == -1) && (check_iterator.tradeItemInstance->GetItem()->ID == trade_iterator.tradeItemInstance->GetItem()->ID)) {
// TODO: add logging
client->Message(CC_Red, "Trade hack detected - Trade Canceled.");
client->Message(Chat::Red, "Trade hack detected - Trade Canceled.");
client->ResetTrade();
return;
}
if ((trade_iterator.tradeItemInstance->GetItem()->LoreGroup > 0) && (check_iterator.tradeItemInstance->GetItem()->LoreGroup == trade_iterator.tradeItemInstance->GetItem()->LoreGroup)) {
// TODO: add logging
client->Message(CC_Red, "Trade hack detected - Trade Canceled.");
client->Message(Chat::Red, "Trade hack detected - Trade Canceled.");
client->ResetTrade();
return;
}
@ -4040,14 +4040,14 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli
if (!return_instance->GetItem()) {
// TODO: add logging
client->Message(CC_Red, "A server error was encountered while processing bot slot %i - Trade Canceled.", return_iterator.fromBotSlot);
client->Message(Chat::Red, "A server error was encountered while processing bot slot %i - Trade Canceled.", return_iterator.fromBotSlot);
client->ResetTrade();
return;
}
// non-failing checks above are causing this to trigger (i.e., !ItemClassCommon and !IsEquipable{race, class, min_level})
// this process is hindered by not having bots use the inventory trade method (TODO: implement bot inventory use)
if (client->CheckLoreConflict(return_instance->GetItem())) {
client->Message(CC_Yellow, "You already have lore equipment matching the item '%s' - Trade Canceled!", return_instance->GetItem()->Name);
client->Message(Chat::Yellow, "You already have lore equipment matching the item '%s' - Trade Canceled!", return_instance->GetItem()->Name);
client->ResetTrade();
return;
}
@ -4104,7 +4104,7 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli
}
if (return_iterator.toClientSlot == invslot::SLOT_INVALID) {
client->Message(CC_Yellow, "You do not have room to complete this trade - Trade Canceled!");
client->Message(Chat::Yellow, "You do not have room to complete this trade - Trade Canceled!");
client->ResetTrade();
return;
}
@ -4130,7 +4130,7 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli
//}
if (!database.botdb.DeleteItemBySlot(GetBotID(), return_iterator.fromBotSlot))
client->Message(CC_Red, "%s (slot: %i, name: '%s')", BotDatabase::fail::DeleteItemBySlot(), return_iterator.fromBotSlot, (return_instance ? return_instance->GetItem()->Name : "nullptr"));
client->Message(Chat::Red, "%s (slot: %i, name: '%s')", BotDatabase::fail::DeleteItemBySlot(), return_iterator.fromBotSlot, (return_instance ? return_instance->GetItem()->Name : "nullptr"));
BotRemoveEquipItem(return_iterator.fromBotSlot);
if (return_instance)
@ -4145,7 +4145,7 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli
// TODO: code for stackables
if (!database.botdb.SaveItemBySlot(this, trade_iterator.toBotSlot, trade_iterator.tradeItemInstance))
client->Message(CC_Red, "%s (slot: %i, name: '%s')", BotDatabase::fail::SaveItemBySlot(), trade_iterator.toBotSlot, (trade_iterator.tradeItemInstance ? trade_iterator.tradeItemInstance->GetItem()->Name : "nullptr"));
client->Message(Chat::Red, "%s (slot: %i, name: '%s')", BotDatabase::fail::SaveItemBySlot(), trade_iterator.toBotSlot, (trade_iterator.tradeItemInstance ? trade_iterator.tradeItemInstance->GetItem()->Name : "nullptr"));
m_inv.PutItem(trade_iterator.toBotSlot, *trade_iterator.tradeItemInstance);
this->BotAddEquipItem(trade_iterator.toBotSlot, (trade_iterator.tradeItemInstance ? trade_iterator.tradeItemInstance->GetID() : 0));
@ -4165,17 +4165,17 @@ void Bot::PerformTradeWithClient(int16 beginSlotID, int16 endSlotID, Client* cli
// trade messages
for (const auto& return_iterator : client_return) {
if (return_iterator.failedItemName.size())
client->Message(MT_Tell, "%s tells you, \"%s, I can't use this '%s.'\"", GetCleanName(), client->GetName(), return_iterator.failedItemName.c_str());
client->Message(Chat::Tell, "%s tells you, \"%s, I can't use this '%s.'\"", GetCleanName(), client->GetName(), return_iterator.failedItemName.c_str());
}
for (const auto& trade_iterator : client_trade) {
if (trade_iterator.acceptedItemName.size())
client->Message(MT_Tell, "%s tells you, \"Thank you for the '%s,' %s!\"", GetCleanName(), trade_iterator.acceptedItemName.c_str(), client->GetName());
client->Message(Chat::Tell, "%s tells you, \"Thank you for the '%s,' %s!\"", GetCleanName(), trade_iterator.acceptedItemName.c_str(), client->GetName());
}
size_t accepted_count = client_trade.size();
size_t returned_count = client_return.size();
client->Message(CC_Lime, "Trade with '%s' resulted in %i accepted item%s, %i returned item%s.", GetCleanName(), accepted_count, ((accepted_count == 1) ? "" : "s"), returned_count, ((returned_count == 1) ? "" : "s"));
client->Message(Chat::Lime, "Trade with '%s' resulted in %i accepted item%s, %i returned item%s.", GetCleanName(), accepted_count, ((accepted_count == 1) ? "" : "s"), returned_count, ((returned_count == 1) ? "" : "s"));
if (accepted_count)
CalcBotStats(client->GetBotOptionStatsUpdate());
@ -4190,9 +4190,9 @@ bool Bot::Death(Mob *killerMob, int32 damage, uint16 spell_id, EQEmu::skills::Sk
Mob *my_owner = GetBotOwner();
if (my_owner && my_owner->IsClient() && my_owner->CastToClient()->GetBotOptionDeathMarquee()) {
if (killerMob)
my_owner->CastToClient()->SendMarqueeMessage(CC_Yellow, 510, 0, 1000, 3000, StringFormat("%s has been slain by %s", GetCleanName(), killerMob->GetCleanName()));
my_owner->CastToClient()->SendMarqueeMessage(Chat::Yellow, 510, 0, 1000, 3000, StringFormat("%s has been slain by %s", GetCleanName(), killerMob->GetCleanName()));
else
my_owner->CastToClient()->SendMarqueeMessage(CC_Yellow, 510, 0, 1000, 3000, StringFormat("%s has been slain", GetCleanName()));
my_owner->CastToClient()->SendMarqueeMessage(Chat::Yellow, 510, 0, 1000, 3000, StringFormat("%s has been slain", GetCleanName()));
}
Mob *give_exp = hate_list.GetDamageTopOnHateList(this);
@ -4281,7 +4281,7 @@ void Bot::Damage(Mob *from, int32 damage, uint16 spell_id, EQEmu::skills::SkillT
int healed = GetActSpellHealing(spell_id, damage);
Log(Logs::Detail, Logs::Combat, "Applying lifetap heal of %d to %s", healed, GetCleanName());
HealDamage(healed);
entity_list.MessageClose(this, true, 300, MT_Spells, "%s beams a smile at %s", GetCleanName(), from->GetCleanName() );
entity_list.MessageClose(this, true, 300, Chat::Spells, "%s beams a smile at %s", GetCleanName(), from->GetCleanName() );
}
CommonDamage(from, damage, spell_id, attack_skill, avoidable, buffslot, iBuffTic, special);
@ -5364,7 +5364,7 @@ bool Bot::TryFinishingBlow(Mob *defender, int &damage)
if (defender->GetLevel() <= levelreq && (chance >= zone->random.Int(1, 1000))) {
Log(Logs::Detail, Logs::Combat, "Landed a finishing blow: levelreq at %d, other level %d",
levelreq, defender->GetLevel());
entity_list.MessageClose_StringID(this, false, 200, MT_CritMelee, FINISHING_BLOW, GetName());
entity_list.MessageCloseString(this, false, 200, Chat::MeleeCrit, FINISHING_BLOW, GetName());
damage = fb_damage;
return true;
} else {
@ -5572,7 +5572,7 @@ void Bot::TryBackstab(Mob *other, int ReuseTime) {
if (bIsBehind || bCanFrontalBS) {
int chance = (10 + (GetDEX() / 10) + (itembonuses.HeroicDEX / 10));
if(level >= 60 && other->GetLevel() <= 45 && !other->CastToNPC()->IsEngaged() && other->GetHP()<= 32000 && other->IsNPC() && zone->random.Real(0, 99) < chance) {
entity_list.MessageClose_StringID(this, false, 200, MT_CritMelee, ASSASSINATES, GetName());
entity_list.MessageCloseString(this, false, 200, Chat::MeleeCrit, ASSASSINATES, GetName());
RogueAssassinate(other);
} else {
RogueBackstab(other);
@ -5940,12 +5940,12 @@ void Bot::ProcessGuildInvite(Client* guildOfficer, Bot* botToGuild) {
if(guildOfficer && botToGuild) {
if(!botToGuild->IsInAGuild()) {
if (!guild_mgr.CheckPermission(guildOfficer->GuildID(), guildOfficer->GuildRank(), GUILD_INVITE)) {
guildOfficer->Message(13, "You dont have permission to invite.");
guildOfficer->Message(Chat::Red, "You dont have permission to invite.");
return;
}
if (!database.botdb.SaveGuildMembership(botToGuild->GetBotID(), guildOfficer->GuildID(), GUILD_MEMBER)) {
guildOfficer->Message(13, "%s for '%s'", BotDatabase::fail::SaveGuildMembership(), botToGuild->GetCleanName());
guildOfficer->Message(Chat::Red, "%s for '%s'", BotDatabase::fail::SaveGuildMembership(), botToGuild->GetCleanName());
return;
}
@ -5958,7 +5958,7 @@ void Bot::ProcessGuildInvite(Client* guildOfficer, Bot* botToGuild) {
safe_delete(pack);
} else {
guildOfficer->Message(13, "Bot is in a guild.");
guildOfficer->Message(Chat::Red, "Bot is in a guild.");
return;
}
}
@ -5974,10 +5974,10 @@ bool Bot::ProcessGuildRemoval(Client* guildOfficer, std::string botName) {
} else {
uint32 ownerId = 0;
if (!database.botdb.LoadOwnerID(botName, ownerId))
guildOfficer->Message(13, "%s for '%s'", BotDatabase::fail::LoadOwnerID(), botName.c_str());
guildOfficer->Message(Chat::Red, "%s for '%s'", BotDatabase::fail::LoadOwnerID(), botName.c_str());
uint32 botId = 0;
if (!database.botdb.LoadBotID(ownerId, botName, botId))
guildOfficer->Message(13, "%s for '%s'", BotDatabase::fail::LoadBotID(), botName.c_str());
guildOfficer->Message(Chat::Red, "%s for '%s'", BotDatabase::fail::LoadBotID(), botName.c_str());
if (botId && database.botdb.SaveGuildMembership(botId, 0, 0))
Result = true;
}
@ -5987,7 +5987,7 @@ bool Bot::ProcessGuildRemoval(Client* guildOfficer, std::string botName) {
GuildManageRemove_Struct* gm = (GuildManageRemove_Struct*) outapp->pBuffer;
gm->guildeqid = guildOfficer->GuildID();
strcpy(gm->member, botName.c_str());
guildOfficer->Message(0, "%s successfully removed from your guild.", botName.c_str());
guildOfficer->Message(Chat::White, "%s successfully removed from your guild.", botName.c_str());
entity_list.QueueClientsGuild(guildOfficer, outapp, false, gm->guildeqid);
safe_delete(outapp);
}
@ -6125,7 +6125,7 @@ int32 Bot::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) {
if(itembonuses.SpellDmg && spells[spell_id].classes[(GetClass() % 17) - 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(this, false, 100, Chat::SpellCrit, "%s delivers a critical blast! (%d)", GetName(), -value);
return value;
}
@ -6179,7 +6179,7 @@ int32 Bot::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
value += (value * target->GetHealRate(spell_id, this) / 100);
if (Critical)
entity_list.MessageClose(this, false, 100, MT_SpellCrits, "%s performs an exceptional heal! (%d)", GetName(), value);
entity_list.MessageClose(this, false, 100, Chat::SpellCrit, "%s performs an exceptional heal! (%d)", GetName(), value);
return value;
} else {
@ -6444,11 +6444,11 @@ bool Bot::CastSpell(uint16 spell_id, uint16 target_id, EQEmu::spells::CastingSlo
if(!IsValidSpell(spell_id) || casting_spell_id || delaytimer || spellend_timer.Enabled() || IsStunned() || IsFeared() || IsMezzed() || (IsSilenced() && !IsDiscipline(spell_id)) || (IsAmnesiad() && IsDiscipline(spell_id))) {
Log(Logs::Detail, Logs::Spells, "Spell casting canceled: not able to cast now. Valid? %d, casting %d, waiting? %d, spellend? %d, stunned? %d, feared? %d, mezed? %d, silenced? %d", IsValidSpell(spell_id), casting_spell_id, delaytimer, spellend_timer.Enabled(), IsStunned(), IsFeared(), IsMezzed(), IsSilenced() );
if(IsSilenced() && !IsDiscipline(spell_id))
Message_StringID(13, SILENCED_STRING);
MessageString(Chat::Red, SILENCED_STRING);
if(IsAmnesiad() && IsDiscipline(spell_id))
Message_StringID(13, MELEE_SILENCE);
MessageString(Chat::Red, MELEE_SILENCE);
if(casting_spell_id)
AI_Event_SpellCastFinished(false, static_cast<uint16>(casting_spell_slot));
@ -6458,7 +6458,7 @@ bool Bot::CastSpell(uint16 spell_id, uint16 target_id, EQEmu::spells::CastingSlo
}
if(IsDetrimentalSpell(spell_id) && !zone->CanDoCombat()){
Message_StringID(13, SPELL_WOULDNT_HOLD);
MessageString(Chat::Red, SPELL_WOULDNT_HOLD);
if(casting_spell_id)
AI_Event_SpellCastFinished(false, static_cast<uint16>(casting_spell_slot));
@ -8155,13 +8155,13 @@ void Bot::CalcBotStats(bool showtext) {
return;
if(showtext) {
GetBotOwner()->Message(15, "Updating %s...", GetCleanName());
GetBotOwner()->Message(Chat::Yellow, "Updating %s...", GetCleanName());
}
if(!IsValidRaceClassCombo()) {
GetBotOwner()->Message(15, "A %s - %s bot was detected. Is this Race/Class combination allowed?.", GetRaceIDName(GetRace()), GetClassIDName(GetClass(), GetLevel()));
GetBotOwner()->Message(15, "Previous Bots Code releases did not check Race/Class combinations during create.");
GetBotOwner()->Message(15, "Unless you are experiencing heavy lag, you should delete and remake this bot.");
GetBotOwner()->Message(Chat::Yellow, "A %s - %s bot was detected. Is this Race/Class combination allowed?.", GetRaceIDName(GetRace()), GetClassIDName(GetClass(), GetLevel()));
GetBotOwner()->Message(Chat::Yellow, "Previous Bots Code releases did not check Race/Class combinations during create.");
GetBotOwner()->Message(Chat::Yellow, "Unless you are experiencing heavy lag, you should delete and remake this bot.");
}
if(GetBotOwner()->GetLevel() != GetLevel())
@ -8170,37 +8170,37 @@ void Bot::CalcBotStats(bool showtext) {
GenerateSpecialAttacks();
if(showtext) {
GetBotOwner()->Message(15, "Base stats:");
GetBotOwner()->Message(15, "Level: %i HP: %i AC: %i Mana: %i STR: %i STA: %i DEX: %i AGI: %i INT: %i WIS: %i CHA: %i", GetLevel(), base_hp, AC, max_mana, STR, STA, DEX, AGI, INT, WIS, CHA);
GetBotOwner()->Message(15, "Resists-- Magic: %i, Poison: %i, Fire: %i, Cold: %i, Disease: %i, Corruption: %i.",MR,PR,FR,CR,DR,Corrup);
GetBotOwner()->Message(Chat::Yellow, "Base stats:");
GetBotOwner()->Message(Chat::Yellow, "Level: %i HP: %i AC: %i Mana: %i STR: %i STA: %i DEX: %i AGI: %i INT: %i WIS: %i CHA: %i", GetLevel(), base_hp, AC, max_mana, STR, STA, DEX, AGI, INT, WIS, CHA);
GetBotOwner()->Message(Chat::Yellow, "Resists-- Magic: %i, Poison: %i, Fire: %i, Cold: %i, Disease: %i, Corruption: %i.",MR,PR,FR,CR,DR,Corrup);
// Test Code
if(GetClass() == BARD)
GetBotOwner()->Message(15, "Bard Skills-- Brass: %i, Percussion: %i, Singing: %i, Stringed: %i, Wind: %i",
GetBotOwner()->Message(Chat::Yellow, "Bard Skills-- Brass: %i, Percussion: %i, Singing: %i, Stringed: %i, Wind: %i",
GetSkill(EQEmu::skills::SkillBrassInstruments), GetSkill(EQEmu::skills::SkillPercussionInstruments), GetSkill(EQEmu::skills::SkillSinging), GetSkill(EQEmu::skills::SkillStringedInstruments), GetSkill(EQEmu::skills::SkillWindInstruments));
}
//if(this->Save())
// this->GetBotOwner()->CastToClient()->Message(0, "%s saved.", this->GetCleanName());
// this->GetBotOwner()->CastToClient()->Message(Chat::White, "%s saved.", this->GetCleanName());
//else
// this->GetBotOwner()->CastToClient()->Message(13, "%s save failed!", this->GetCleanName());
// this->GetBotOwner()->CastToClient()->Message(Chat::Red, "%s save failed!", this->GetCleanName());
CalcBonuses();
AI_AddNPCSpells(this->GetBotSpellID());
if(showtext) {
GetBotOwner()->Message(15, "%s has been updated.", GetCleanName());
GetBotOwner()->Message(15, "Level: %i HP: %i AC: %i Mana: %i STR: %i STA: %i DEX: %i AGI: %i INT: %i WIS: %i CHA: %i", GetLevel(), max_hp, GetAC(), max_mana, GetSTR(), GetSTA(), GetDEX(), GetAGI(), GetINT(), GetWIS(), GetCHA());
GetBotOwner()->Message(15, "Resists-- Magic: %i, Poison: %i, Fire: %i, Cold: %i, Disease: %i, Corruption: %i.",GetMR(),GetPR(),GetFR(),GetCR(),GetDR(),GetCorrup());
GetBotOwner()->Message(Chat::Yellow, "%s has been updated.", GetCleanName());
GetBotOwner()->Message(Chat::Yellow, "Level: %i HP: %i AC: %i Mana: %i STR: %i STA: %i DEX: %i AGI: %i INT: %i WIS: %i CHA: %i", GetLevel(), max_hp, GetAC(), max_mana, GetSTR(), GetSTA(), GetDEX(), GetAGI(), GetINT(), GetWIS(), GetCHA());
GetBotOwner()->Message(Chat::Yellow, "Resists-- Magic: %i, Poison: %i, Fire: %i, Cold: %i, Disease: %i, Corruption: %i.",GetMR(),GetPR(),GetFR(),GetCR(),GetDR(),GetCorrup());
// Test Code
if(GetClass() == BARD) {
GetBotOwner()->Message(15, "Bard Skills-- Brass: %i, Percussion: %i, Singing: %i, Stringed: %i, Wind: %i",
GetBotOwner()->Message(Chat::Yellow, "Bard Skills-- Brass: %i, Percussion: %i, Singing: %i, Stringed: %i, Wind: %i",
GetSkill(EQEmu::skills::SkillBrassInstruments) + GetBrassMod(),
GetSkill(EQEmu::skills::SkillPercussionInstruments) + GetPercMod(),
GetSkill(EQEmu::skills::SkillSinging) + GetSingMod(),
GetSkill(EQEmu::skills::SkillStringedInstruments) + GetStringMod(),
GetSkill(EQEmu::skills::SkillWindInstruments) + GetWindMod());
GetBotOwner()->Message(15, "Bard Skill Mods-- Brass: %i, Percussion: %i, Singing: %i, Stringed: %i, Wind: %i", GetBrassMod(), GetPercMod(), GetSingMod(), GetStringMod(), GetWindMod());
GetBotOwner()->Message(Chat::Yellow, "Bard Skill Mods-- Brass: %i, Percussion: %i, Singing: %i, Stringed: %i, Wind: %i", GetBrassMod(), GetPercMod(), GetSingMod(), GetStringMod(), GetWindMod());
}
}
}
@ -8868,7 +8868,7 @@ bool Bot::UseDiscipline(uint32 spell_id, uint32 target) {
SetDisciplineRecastTimer(spells[spell_id].EndurTimerIndex, spell.recast_time);
} else {
uint32 remain = (GetDisciplineRemainingTime(this, spells[spell_id].EndurTimerIndex) / 1000);
GetOwner()->Message(0, "%s can use this discipline in %d minutes %d seconds.", GetCleanName(), (remain / 60), (remain % 60));
GetOwner()->Message(Chat::White, "%s can use this discipline in %d minutes %d seconds.", GetCleanName(), (remain / 60), (remain % 60));
return false;
}
}
@ -9070,7 +9070,7 @@ bool Bot::DyeArmor(int16 slot_id, uint32 rgb, bool all_flag, bool save_flag)
if (!database.botdb.SaveEquipmentColor(GetBotID(), save_slot, rgb)) {
if (GetBotOwner() && GetBotOwner()->IsClient())
GetBotOwner()->CastToClient()->Message(13, "%s", BotDatabase::fail::SaveEquipmentColor());
GetBotOwner()->CastToClient()->Message(Chat::Red, "%s", BotDatabase::fail::SaveEquipmentColor());
return false;
}
}

View File

@ -84,12 +84,12 @@ namespace
{
//#define BCSTSPELLDUMP // only needed if you're adding/tailoring bot command spells and need a file dump
#define m_message CC_WhiteSmoke
#define m_action CC_Yellow
#define m_note CC_Gray
#define m_usage CC_Cyan
#define m_fail CC_Red
#define m_unknown CC_Magenta
#define m_message Chat::White
#define m_action Chat::Yellow
#define m_note Chat::Gray
#define m_usage Chat::Cyan
#define m_fail Chat::Red
#define m_unknown Chat::Magenta
#define HP_RATIO_DELTA 5.0f
@ -4833,7 +4833,7 @@ void bot_subcommand_bot_inspect_message(Client *c, const Seperator *sep)
set_flag = true;
}
else if (strcasecmp(sep->arg[1], "clear")) {
c->Message(15, "This command requires a [set | clear] argument");
c->Message(Chat::Yellow, "This command requires a [set | clear] argument");
return;
}
@ -7284,7 +7284,7 @@ void bot_subcommand_inventory_remove(Client *c, const Seperator *sep)
int ab_mask = (ActionableBots::ABM_Target | ActionableBots::ABM_ByName);
if (c->GetTradeskillObject() || (c->trade->state == Trading)) {
c->Message_StringID(MT_Tell, MERCHANT_BUSY);
c->MessageString(Chat::Tell, MERCHANT_BUSY);
return;
}
@ -7310,7 +7310,7 @@ void bot_subcommand_inventory_remove(Client *c, const Seperator *sep)
itm = itminst->GetItem();
if (itminst && itm && c->CheckLoreConflict(itm)) {
c->Message_StringID(0, PICK_LORE);
c->MessageString(Chat::White, PICK_LORE);
return;
}
@ -7324,7 +7324,7 @@ void bot_subcommand_inventory_remove(Client *c, const Seperator *sep)
if (!c->CheckLoreConflict(itma->GetItem()))
continue;
c->Message_StringID(0, PICK_LORE);
c->MessageString(Chat::White, PICK_LORE);
return;
}
@ -7454,7 +7454,7 @@ void bot_subcommand_pet_get_lost(Client *c, const Seperator *sep)
if (!bot_iter->GetPet() || bot_iter->GetPet()->IsCharmed())
continue;
bot_iter->GetPet()->Say_StringID(PET_GETLOST_STRING);
bot_iter->GetPet()->SayString(PET_GETLOST_STRING);
bot_iter->GetPet()->Depop(false);
bot_iter->SetPetID(0);
database.botdb.DeletePetItems(bot_iter->GetBotID());
@ -7500,7 +7500,7 @@ void bot_subcommand_pet_remove(Client *c, const Seperator *sep)
}
if (bot_iter->GetPet()) {
bot_iter->GetPet()->Say_StringID(PET_GETLOST_STRING);
bot_iter->GetPet()->SayString(PET_GETLOST_STRING);
bot_iter->GetPet()->Depop(false);
bot_iter->SetPetID(0);
}

View File

@ -914,7 +914,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
{
case ChatChannel_Guild: { /* Guild Chat */
if (!IsInAGuild())
Message_StringID(MT_DefaultText, GUILD_NOT_MEMBER2); //You are not a member of any guild.
MessageString(Chat::DefaultText, GUILD_NOT_MEMBER2); //You are not a member of any guild.
else if (!guild_mgr.CheckPermission(GuildID(), GuildRank(), GUILD_SPEAK))
Message(0, "Error: You dont have permission to speak to the guild.");
else if (!worldserver.SendChannelMessage(this, targetname, chan_num, GuildID(), language, lang_skill, message))
@ -1097,11 +1097,11 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
if(parse->PlayerHasQuestSub(EVENT_COMMAND)) {
int i = parse->EventPlayer(EVENT_COMMAND, this, message, 0);
if(i == 0 && !RuleB(Chat, SuppressCommandErrors)) {
Message(13, "Command '%s' not recognized.", message);
Message(Chat::Red, "Command '%s' not recognized.", message);
}
} else {
if(!RuleB(Chat, SuppressCommandErrors))
Message(13, "Command '%s' not recognized.", message);
Message(Chat::Red, "Command '%s' not recognized.", message);
}
}
break;
@ -1116,12 +1116,12 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
if (parse->PlayerHasQuestSub(EVENT_COMMAND)) {
int i = parse->EventPlayer(EVENT_COMMAND, this, message, 0);
if (i == 0 && !RuleB(Chat, SuppressCommandErrors)) {
Message(13, "Bot command '%s' not recognized.", message);
Message(Chat::Red, "Bot command '%s' not recognized.", message);
}
}
else {
if (!RuleB(Chat, SuppressCommandErrors))
Message(13, "Bot command '%s' not recognized.", message);
Message(Chat::Red, "Bot command '%s' not recognized.", message);
}
}
break;
@ -1265,11 +1265,11 @@ void Client::ChannelMessageSend(const char* from, const char* to, uint8 chan_num
}
void Client::Message(uint32 type, const char* message, ...) {
if (GetFilter(FilterSpellDamage) == FilterHide && type == MT_NonMelee)
if (GetFilter(FilterSpellDamage) == FilterHide && type == Chat::NonMelee)
return;
if (GetFilter(FilterMeleeCrits) == FilterHide && type == MT_CritMelee) //98 is self...
if (GetFilter(FilterMeleeCrits) == FilterHide && type == Chat::MeleeCrit) //98 is self...
return;
if (GetFilter(FilterSpellCrits) == FilterHide && type == MT_SpellCrits)
if (GetFilter(FilterSpellCrits) == FilterHide && type == Chat::SpellCrit)
return;
va_list argptr;
@ -1509,7 +1509,7 @@ void Client::IncreaseLanguageSkill(int skill_id, int value) {
QueuePacket(outapp);
safe_delete(outapp);
Message_StringID( MT_Skills, LANG_SKILL_IMPROVED ); //Notify client
MessageString( Chat::Skills, LANG_SKILL_IMPROVED ); //Notify client
}
void Client::AddSkill(EQEmu::skills::SkillType skillid, uint16 value) {
@ -2047,7 +2047,7 @@ bool Client::ChangeFirstName(const char* in_firstname, const char* gmname)
void Client::SetGM(bool toggle) {
m_pp.gm = toggle ? 1 : 0;
m_inv.SetGMInventory((bool)m_pp.gm);
Message(13, "You are %s a GM.", m_pp.gm ? "now" : "no longer");
Message(Chat::Red, "You are %s a GM.", m_pp.gm ? "now" : "no longer");
SendAppearancePacket(AT_GM, m_pp.gm);
Save();
UpdateWho();
@ -2550,7 +2550,7 @@ uint16 Client::GetMaxSkillAfterSpecializationRules(EQEmu::skills::SkillType skil
}
else
{
Message(13, "Your spell casting specializations skills have been reset. "
Message(Chat::Red, "Your spell casting specializations skills have been reset. "
"Only %i primary specialization skill is allowed.", MaxSpecializations);
for (int i = EQEmu::skills::SkillSpecializeAbjure; i <= EQEmu::skills::SkillSpecializeEvocation; ++i)
@ -2578,9 +2578,9 @@ void Client::SetPVP(bool toggle, bool message) {
if (message) {
if(GetPVP())
this->Message_StringID(MT_Shout,PVP_ON);
this->MessageString(Chat::Shout,PVP_ON);
else
Message(13, "You no longer follow the ways of discord.");
Message(Chat::Red, "You no longer follow the ways of discord.");
}
SendAppearancePacket(AT_PVP, GetPVP());
@ -2714,22 +2714,22 @@ void Client::Disarm(Client* disarmer, int chance) {
if (matslot != EQEmu::textures::materialInvalid)
SendWearChange(matslot);
}
Message_StringID(MT_Skills, DISARMED);
MessageString(Chat::Skills, DISARMED);
if (disarmer != this)
disarmer->Message_StringID(MT_Skills, DISARM_SUCCESS, this->GetCleanName());
disarmer->MessageString(Chat::Skills, DISARM_SUCCESS, this->GetCleanName());
if (chance != 1000)
disarmer->CheckIncreaseSkill(EQEmu::skills::SkillDisarm, nullptr, 4);
CalcBonuses();
// CalcEnduranceWeightFactor();
return;
}
disarmer->Message_StringID(MT_Skills, DISARM_FAILED);
disarmer->MessageString(Chat::Skills, DISARM_FAILED);
if (chance != 1000)
disarmer->CheckIncreaseSkill(EQEmu::skills::SkillDisarm, nullptr, 2);
return;
}
}
disarmer->Message_StringID(MT_Skills, DISARM_FAILED);
disarmer->MessageString(Chat::Skills, DISARM_FAILED);
}
bool Client::BindWound(Mob *bindmob, bool start, bool fail)
@ -2771,7 +2771,7 @@ bool Client::BindWound(Mob *bindmob, bool start, bool fail)
} else {
// send bindmob "stand still"
if (!bindmob->IsAIControlled() && bindmob != this) {
bindmob->CastToClient()->Message_StringID(clientMessageYellow,
bindmob->CastToClient()->MessageString(Chat::Yellow,
YOU_ARE_BEING_BANDAGED);
} else if (bindmob->IsAIControlled() && bindmob != this) {
; // Tell IPC to stand still?
@ -2855,7 +2855,7 @@ bool Client::BindWound(Mob *bindmob, bool start, bool fail)
}
else {
// I dont have the real, live
Message(15, "You cannot bind wounds above %d%% hitpoints.",
Message(Chat::Yellow, "You cannot bind wounds above %d%% hitpoints.",
max_percent);
if (bindmob != this && bindmob->IsClient())
bindmob->CastToClient()->Message(
@ -2916,9 +2916,9 @@ bool Client::BindWound(Mob *bindmob, bool start, bool fail)
bindmob->SendHPUpdate();
}
else {
Message(15, "You cannot bind wounds above %d%% hitpoints", max_percent);
Message(Chat::Yellow, "You cannot bind wounds above %d%% hitpoints", max_percent);
if (bindmob != this && bindmob->IsClient())
bindmob->CastToClient()->Message(15, "You cannot have your wounds bound above %d%% hitpoints", max_percent);
bindmob->CastToClient()->Message(Chat::Yellow, "You cannot have your wounds bound above %d%% hitpoints", max_percent);
}
}
}
@ -3075,13 +3075,13 @@ void Client::ServerFilter(SetServerFilter_Struct* filter){
}
// this version is for messages with no parameters
void Client::Message_StringID(uint32 type, uint32 string_id, uint32 distance)
void Client::MessageString(uint32 type, uint32 string_id, uint32 distance)
{
if (GetFilter(FilterSpellDamage) == FilterHide && type == MT_NonMelee)
if (GetFilter(FilterSpellDamage) == FilterHide && type == Chat::NonMelee)
return;
if (GetFilter(FilterMeleeCrits) == FilterHide && type == MT_CritMelee) //98 is self...
if (GetFilter(FilterMeleeCrits) == FilterHide && type == Chat::MeleeCrit) //98 is self...
return;
if (GetFilter(FilterSpellCrits) == FilterHide && type == MT_SpellCrits)
if (GetFilter(FilterSpellCrits) == FilterHide && type == Chat::SpellCrit)
return;
auto outapp = new EQApplicationPacket(OP_SimpleMessage, 12);
SimpleMessage_Struct* sms = (SimpleMessage_Struct*)outapp->pBuffer;
@ -3103,30 +3103,30 @@ void Client::Message_StringID(uint32 type, uint32 string_id, uint32 distance)
// to load the eqstr file and count them in the string.
// This hack sucks but it's gonna work for now.
//
void Client::Message_StringID(uint32 type, uint32 string_id, const char* message1,
void Client::MessageString(uint32 type, uint32 string_id, const char* message1,
const char* message2,const char* message3,const char* message4,
const char* message5,const char* message6,const char* message7,
const char* message8,const char* message9, uint32 distance)
{
if (GetFilter(FilterSpellDamage) == FilterHide && type == MT_NonMelee)
if (GetFilter(FilterSpellDamage) == FilterHide && type == Chat::NonMelee)
return;
if (GetFilter(FilterMeleeCrits) == FilterHide && type == MT_CritMelee) //98 is self...
if (GetFilter(FilterMeleeCrits) == FilterHide && type == Chat::MeleeCrit) //98 is self...
return;
if (GetFilter(FilterSpellCrits) == FilterHide && type == MT_SpellCrits)
if (GetFilter(FilterSpellCrits) == FilterHide && type == Chat::SpellCrit)
return;
if (GetFilter(FilterDamageShields) == FilterHide && type == MT_DS)
if (GetFilter(FilterDamageShields) == FilterHide && type == Chat::DamageShield)
return;
int i = 0, argcount = 0, length = 0;
char *bufptr = nullptr;
const char *message_arg[9] = {0};
if(type==MT_Emote)
if(type==Chat::Emote)
type=4;
if(!message1)
{
Message_StringID(type, string_id); // use the simple message instead
MessageString(type, string_id); // use the simple message instead
return;
}
@ -3205,7 +3205,7 @@ bool Client::FilteredMessageCheck(Mob *sender, eqFilterType filter)
return true;
}
void Client::FilteredMessage_StringID(Mob *sender, uint32 type,
void Client::FilteredMessageString(Mob *sender, uint32 type,
eqFilterType filter, uint32 string_id)
{
if (!FilteredMessageCheck(sender, filter))
@ -3224,7 +3224,7 @@ void Client::FilteredMessage_StringID(Mob *sender, uint32 type,
return;
}
void Client::FilteredMessage_StringID(Mob *sender, uint32 type, eqFilterType filter, uint32 string_id,
void Client::FilteredMessageString(Mob *sender, uint32 type, eqFilterType filter, uint32 string_id,
const char *message1, const char *message2, const char *message3,
const char *message4, const char *message5, const char *message6,
const char *message7, const char *message8, const char *message9)
@ -3236,11 +3236,11 @@ void Client::FilteredMessage_StringID(Mob *sender, uint32 type, eqFilterType fil
char *bufptr = nullptr;
const char *message_arg[9] = {0};
if (type == MT_Emote)
if (type == Chat::Emote)
type = 4;
if (!message1) {
FilteredMessage_StringID(sender, type, filter, string_id); // use the simple message instead
FilteredMessageString(sender, type, filter, string_id); // use the simple message instead
return;
}
@ -3281,7 +3281,7 @@ void Client::Tell_StringID(uint32 string_id, const char *who, const char *messag
char string_id_str[10];
snprintf(string_id_str, 10, "%d", string_id);
Message_StringID(MT_TellEcho, TELL_QUEUED_MESSAGE, who, string_id_str, message);
MessageString(Chat::EchoTell, TELL_QUEUED_MESSAGE, who, string_id_str, message);
}
void Client::SetTint(int16 in_slot, uint32 color) {
@ -3344,7 +3344,7 @@ void Client::SetLanguageSkill(int langid, int value)
QueuePacket(outapp);
safe_delete(outapp);
Message_StringID( MT_Skills, LANG_SKILL_IMPROVED ); //Notify the client
MessageString( Chat::Skills, LANG_SKILL_IMPROVED ); //Notify the client
}
void Client::LinkDead()
@ -3432,7 +3432,7 @@ void Client::Escape()
entity_list.RemoveFromTargets(this, true);
SetInvisible(1);
Message_StringID(MT_Skills, ESCAPE);
MessageString(Chat::Skills, ESCAPE);
}
float Client::CalcPriceMod(Mob* other, bool reverse)
@ -3828,9 +3828,9 @@ void Client::EnteringMessages(Client* client)
uint8 flag = database.GetAgreementFlag(client->AccountID());
if(!flag)
{
client->Message(13,"You must agree to the Rules, before you can move. (type #serverrules to view the rules)");
client->Message(13,"You must agree to the Rules, before you can move. (type #serverrules to view the rules)");
client->Message(13,"You must agree to the Rules, before you can move. (type #serverrules to view the rules)");
client->Message(Chat::Red,"You must agree to the Rules, before you can move. (type #serverrules to view the rules)");
client->Message(Chat::Red,"You must agree to the Rules, before you can move. (type #serverrules to view the rules)");
client->Message(Chat::Red,"You must agree to the Rules, before you can move. (type #serverrules to view the rules)");
client->SendAppearancePacket(AT_Anim, ANIM_FREEZE);
}
}
@ -3845,7 +3845,7 @@ void Client::SendRules(Client* client)
auto lines = SplitString(rules, '\n');
for (auto&& e : lines)
client->Message(0, "%s", e.c_str());
client->Message(Chat::White, "%s", e.c_str());
}
void Client::SetEndurance(int32 newEnd)
@ -3872,13 +3872,13 @@ void Client::SacrificeConfirm(Client *caster)
}
if (GetLevel() < RuleI(Spells, SacrificeMinLevel)) {
caster->Message_StringID(13, SAC_TOO_LOW); // This being is not a worthy sacrifice.
caster->MessageString(Chat::Red, SAC_TOO_LOW); // This being is not a worthy sacrifice.
safe_delete(outapp);
return;
}
if (GetLevel() > RuleI(Spells, SacrificeMaxLevel)) {
caster->Message_StringID(13, SAC_TOO_HIGH);
caster->MessageString(Chat::Red, SAC_TOO_HIGH);
safe_delete(outapp);
return;
}
@ -3947,7 +3947,7 @@ void Client::Sacrifice(Client *caster)
caster->SummonItem(RuleI(Spells, SacrificeItemID));
}
} else {
caster->Message_StringID(13, SAC_TOO_LOW); // This being is not a worthy sacrifice.
caster->MessageString(Chat::Red, SAC_TOO_LOW); // This being is not a worthy sacrifice.
}
}
@ -4222,7 +4222,7 @@ void Client::KeyRingAdd(uint32 item_id)
return;
}
Message(4,"Added to keyring.");
Message(Chat::LightBlue,"Added to keyring.");
keyring.push_back(item_id);
}
@ -4238,11 +4238,11 @@ bool Client::KeyRingCheck(uint32 item_id)
void Client::KeyRingList()
{
Message(4,"Keys on Keyring:");
Message(Chat::LightBlue,"Keys on Keyring:");
const EQEmu::ItemData *item = nullptr;
for (auto iter = keyring.begin(); iter != keyring.end(); ++iter) {
if ((item = database.GetItem(*iter))!=nullptr) {
Message(4,item->Name);
Message(Chat::LightBlue,item->Name);
}
}
}
@ -4414,8 +4414,8 @@ bool Client::GroupFollow(Client* inviter) {
if (group->GetID() == 0)
{
Message(13, "Unable to get new group id. Cannot create group.");
inviter->Message(13, "Unable to get new group id. Cannot create group.");
Message(Chat::Red, "Unable to get new group id. Cannot create group.");
inviter->Message(Chat::Red, "Unable to get new group id. Cannot create group.");
return false;
}
@ -4924,7 +4924,7 @@ void Client::HandleLDoNOpen(NPC *target)
{
Log(Logs::General, Logs::None, "%s tried to open %s but %s was out of range",
GetName(), target->GetName(), target->GetName());
Message(13, "Treasure chest out of range.");
Message(Chat::Red, "Treasure chest out of range.");
return;
}
@ -4932,7 +4932,7 @@ void Client::HandleLDoNOpen(NPC *target)
{
if(target->GetLDoNTrapSpellID() != 0)
{
Message_StringID(13, LDON_ACCIDENT_SETOFF2);
MessageString(Chat::Red, LDON_ACCIDENT_SETOFF2);
target->SpellFinished(target->GetLDoNTrapSpellID(), this, EQEmu::spells::CastingSlot::Item, 0, -1, spells[target->GetLDoNTrapSpellID()].ResistDiff);
target->SetLDoNTrapSpellID(0);
target->SetLDoNTrapped(false);
@ -4948,7 +4948,7 @@ void Client::HandleLDoNOpen(NPC *target)
if(target->IsLDoNLocked())
{
Message_StringID(MT_Skills, LDON_STILL_LOCKED, target->GetCleanName());
MessageString(Chat::Skills, LDON_STILL_LOCKED, target->GetCleanName());
return;
}
else
@ -4982,13 +4982,13 @@ void Client::HandleLDoNSenseTraps(NPC *target, uint16 skill, uint8 type)
{
if((target->GetLDoNTrapType() == LDoNTypeCursed || target->GetLDoNTrapType() == LDoNTypeMagical) && type != target->GetLDoNTrapType())
{
Message_StringID(MT_Skills, LDON_CANT_DETERMINE_TRAP, target->GetCleanName());
MessageString(Chat::Skills, LDON_CANT_DETERMINE_TRAP, target->GetCleanName());
return;
}
if(target->IsLDoNTrapDetected())
{
Message_StringID(MT_Skills, LDON_CERTAIN_TRAP, target->GetCleanName());
MessageString(Chat::Skills, LDON_CERTAIN_TRAP, target->GetCleanName());
}
else
{
@ -4997,10 +4997,10 @@ void Client::HandleLDoNSenseTraps(NPC *target, uint16 skill, uint8 type)
{
case -1:
case 0:
Message_StringID(MT_Skills, LDON_DONT_KNOW_TRAPPED, target->GetCleanName());
MessageString(Chat::Skills, LDON_DONT_KNOW_TRAPPED, target->GetCleanName());
break;
case 1:
Message_StringID(MT_Skills, LDON_CERTAIN_TRAP, target->GetCleanName());
MessageString(Chat::Skills, LDON_CERTAIN_TRAP, target->GetCleanName());
target->SetLDoNTrapDetected(true);
break;
default:
@ -5010,7 +5010,7 @@ void Client::HandleLDoNSenseTraps(NPC *target, uint16 skill, uint8 type)
}
else
{
Message_StringID(MT_Skills, LDON_CERTAIN_NOT_TRAP, target->GetCleanName());
MessageString(Chat::Skills, LDON_CERTAIN_NOT_TRAP, target->GetCleanName());
}
}
}
@ -5023,13 +5023,13 @@ void Client::HandleLDoNDisarm(NPC *target, uint16 skill, uint8 type)
{
if(!target->IsLDoNTrapped())
{
Message_StringID(MT_Skills, LDON_WAS_NOT_TRAPPED, target->GetCleanName());
MessageString(Chat::Skills, LDON_WAS_NOT_TRAPPED, target->GetCleanName());
return;
}
if((target->GetLDoNTrapType() == LDoNTypeCursed || target->GetLDoNTrapType() == LDoNTypeMagical) && type != target->GetLDoNTrapType())
{
Message_StringID(MT_Skills, LDON_HAVE_NOT_DISARMED, target->GetCleanName());
MessageString(Chat::Skills, LDON_HAVE_NOT_DISARMED, target->GetCleanName());
return;
}
@ -5048,13 +5048,13 @@ void Client::HandleLDoNDisarm(NPC *target, uint16 skill, uint8 type)
target->SetLDoNTrapDetected(false);
target->SetLDoNTrapped(false);
target->SetLDoNTrapSpellID(0);
Message_StringID(MT_Skills, LDON_HAVE_DISARMED, target->GetCleanName());
MessageString(Chat::Skills, LDON_HAVE_DISARMED, target->GetCleanName());
break;
case 0:
Message_StringID(MT_Skills, LDON_HAVE_NOT_DISARMED, target->GetCleanName());
MessageString(Chat::Skills, LDON_HAVE_NOT_DISARMED, target->GetCleanName());
break;
case -1:
Message_StringID(13, LDON_ACCIDENT_SETOFF2);
MessageString(Chat::Red, LDON_ACCIDENT_SETOFF2);
target->SpellFinished(target->GetLDoNTrapSpellID(), this, EQEmu::spells::CastingSlot::Item, 0, -1, spells[target->GetLDoNTrapSpellID()].ResistDiff);
target->SetLDoNTrapSpellID(0);
target->SetLDoNTrapped(false);
@ -5073,7 +5073,7 @@ void Client::HandleLDoNPickLock(NPC *target, uint16 skill, uint8 type)
{
if(target->IsLDoNTrapped())
{
Message_StringID(13, LDON_ACCIDENT_SETOFF2);
MessageString(Chat::Red, LDON_ACCIDENT_SETOFF2);
target->SpellFinished(target->GetLDoNTrapSpellID(), this, EQEmu::spells::CastingSlot::Item, 0, -1, spells[target->GetLDoNTrapSpellID()].ResistDiff);
target->SetLDoNTrapSpellID(0);
target->SetLDoNTrapped(false);
@ -5082,13 +5082,13 @@ void Client::HandleLDoNPickLock(NPC *target, uint16 skill, uint8 type)
if(!target->IsLDoNLocked())
{
Message_StringID(MT_Skills, LDON_WAS_NOT_LOCKED, target->GetCleanName());
MessageString(Chat::Skills, LDON_WAS_NOT_LOCKED, target->GetCleanName());
return;
}
if((target->GetLDoNTrapType() == LDoNTypeCursed || target->GetLDoNTrapType() == LDoNTypeMagical) && type != target->GetLDoNTrapType())
{
Message(MT_Skills, "You cannot unlock %s with this skill.", target->GetCleanName());
Message(Chat::Skills, "You cannot unlock %s with this skill.", target->GetCleanName());
return;
}
@ -5098,11 +5098,11 @@ void Client::HandleLDoNPickLock(NPC *target, uint16 skill, uint8 type)
{
case 0:
case -1:
Message_StringID(MT_Skills, LDON_PICKLOCK_FAILURE, target->GetCleanName());
MessageString(Chat::Skills, LDON_PICKLOCK_FAILURE, target->GetCleanName());
break;
case 1:
target->SetLDoNLocked(false);
Message_StringID(MT_Skills, LDON_PICKLOCK_SUCCESS, target->GetCleanName());
MessageString(Chat::Skills, LDON_PICKLOCK_SUCCESS, target->GetCleanName());
break;
}
}
@ -5161,7 +5161,7 @@ void Client::SummonAndRezzAllCorpses()
int CorpseCount = database.SummonAllCharacterCorpses(CharacterID(), zone->GetZoneID(), zone->GetInstanceID(), GetPosition());
if(CorpseCount <= 0)
{
Message(clientMessageYellow, "You have no corpses to summnon.");
Message(Chat::Yellow, "You have no corpses to summnon.");
return;
}
@ -5170,7 +5170,7 @@ void Client::SummonAndRezzAllCorpses()
if(RezzExp > 0)
SetEXP(GetEXP() + RezzExp, GetAAXP(), true);
Message(clientMessageYellow, "All your corpses have been summoned to your feet and have received a 100% resurrection.");
Message(Chat::Yellow, "All your corpses have been summoned to your feet and have received a 100% resurrection.");
}
void Client::SummonAllCorpses(const glm::vec4& position)
@ -5250,7 +5250,7 @@ void Client::SetStartZone(uint32 zoneid, float x, float y, float z)
// setting city to zero allows the player to use /setstartcity to set the city themselves
if(zoneid == 0) {
m_pp.binds[4].zoneId = 0;
this->Message(15,"Your starting city has been reset. Use /setstartcity to choose a new one");
this->Message(Chat::Yellow,"Your starting city has been reset. Use /setstartcity to choose a new one");
return;
}
@ -5579,7 +5579,7 @@ void Client::SuspendMinion()
if(m_suspendedminion.SpellID > 0)
{
if (m_suspendedminion.SpellID >= SPDAT_RECORDS) {
Message(13, "Invalid suspended minion spell id (%u).", m_suspendedminion.SpellID);
Message(Chat::Red, "Invalid suspended minion spell id (%u).", m_suspendedminion.SpellID);
memset(&m_suspendedminion, 0, sizeof(PetInfo));
return;
}
@ -5591,7 +5591,7 @@ void Client::SuspendMinion()
if(!CurrentPet)
{
Message(13, "Failed to recall suspended minion.");
Message(Chat::Red, "Failed to recall suspended minion.");
return;
}
@ -5607,7 +5607,7 @@ void Client::SuspendMinion()
CurrentPet->SetMana(m_suspendedminion.Mana);
Message_StringID(clientMessageTell, SUSPEND_MINION_UNSUSPEND, CurrentPet->GetCleanName());
MessageString(Chat::Magenta, SUSPEND_MINION_UNSUSPEND, CurrentPet->GetCleanName());
memset(&m_suspendedminion, 0, sizeof(struct PetInfo));
// TODO: These pet command states need to be synced ...
@ -5637,19 +5637,19 @@ void Client::SuspendMinion()
{
if(m_suspendedminion.SpellID > 0)
{
Message_StringID(clientMessageError,ONLY_ONE_PET);
MessageString(Chat::Red,ONLY_ONE_PET);
return;
}
else if(CurrentPet->IsEngaged())
{
Message_StringID(clientMessageError,SUSPEND_MINION_FIGHTING);
MessageString(Chat::Red,SUSPEND_MINION_FIGHTING);
return;
}
else if(entity_list.Fighting(CurrentPet))
{
Message_StringID(clientMessageBlue,SUSPEND_MINION_HAS_AGGRO);
MessageString(Chat::Blue,SUSPEND_MINION_HAS_AGGRO);
}
else
{
@ -5666,7 +5666,7 @@ void Client::SuspendMinion()
else
strn0cpy(m_suspendedminion.Name, CurrentPet->GetName(), 64); // Name stays even at rank 1
Message_StringID(clientMessageTell, SUSPEND_MINION_SUSPEND, CurrentPet->GetCleanName());
MessageString(Chat::Magenta, SUSPEND_MINION_SUSPEND, CurrentPet->GetCleanName());
CurrentPet->Depop(false);
@ -5675,7 +5675,7 @@ void Client::SuspendMinion()
}
else
{
Message_StringID(clientMessageError, ONLY_SUMMONED_PETS);
MessageString(Chat::Red, ONLY_SUMMONED_PETS);
return;
}
@ -5748,7 +5748,7 @@ void Client::ProcessInspectRequest(Client* requestee, Client* requester) {
strcpy(insr->text, requestee->GetInspectMessage().text);
// There could be an OP for this..or not... (Ti clients are not processed here..this message is generated client-side)
if(requestee->IsClient() && (requestee != requester)) { requestee->Message(0, "%s is looking at your equipment...", requester->GetName()); }
if(requestee->IsClient() && (requestee != requester)) { requestee->Message(Chat::White, "%s is looking at your equipment...", requester->GetName()); }
requester->QueuePacket(outapp); // Send answer to requester
safe_delete(outapp);
@ -6149,16 +6149,16 @@ void Client::LocateCorpse()
if(ClosestCorpse)
{
Message_StringID(MT_Spells, SENSE_CORPSE_DIRECTION);
MessageString(Chat::Spells, SENSE_CORPSE_DIRECTION);
SetHeading(CalculateHeadingToTarget(ClosestCorpse->GetX(), ClosestCorpse->GetY()));
SetTarget(ClosestCorpse);
SendTargetCommand(ClosestCorpse->GetID());
SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0, true);
}
else if(!GetTarget())
Message_StringID(clientMessageError, SENSE_CORPSE_NONE);
MessageString(Chat::Red, SENSE_CORPSE_NONE);
else
Message_StringID(clientMessageError, SENSE_CORPSE_NOT_NAME);
MessageString(Chat::Red, SENSE_CORPSE_NOT_NAME);
}
void Client::NPCSpawn(NPC *target_npc, const char *identifier, uint32 extra)
@ -6218,7 +6218,7 @@ void Client::DragCorpses()
if (!corpse || !corpse->IsPlayerCorpse() ||
corpse->CastToCorpse()->IsBeingLooted() ||
!corpse->CastToCorpse()->Summon(this, false, false)) {
Message_StringID(MT_DefaultText, CORPSEDRAG_STOP);
MessageString(Chat::DefaultText, CORPSEDRAG_STOP);
It = DraggedCorpses.erase(It);
if (It == DraggedCorpses.end())
break;
@ -6235,7 +6235,7 @@ void Client::Doppelganger(uint16 spell_id, Mob *target, const char *name_overrid
if(!database.GetPetEntry(spells[spell_id].teleport_zone, &record))
{
Log(Logs::General, Logs::Error, "Unknown doppelganger spell id: %d, check pets table", spell_id);
Message(13, "Unable to find data for pet %s", spells[spell_id].teleport_zone);
Message(Chat::Red, "Unable to find data for pet %s", spells[spell_id].teleport_zone);
return;
}
@ -6850,35 +6850,35 @@ void Client::SendStatsWindow(Client* client, bool use_window)
goto Extra_Info;
}
else {
client->Message(15, "The window has exceeded its character limit, displaying stats to chat window:");
client->Message(Chat::Yellow, "The window has exceeded its character limit, displaying stats to chat window:");
}
}
client->Message(15, "~~~~~ %s %s ~~~~~", GetCleanName(), GetLastName());
client->Message(0, " Level: %i Class: %i Race: %i DS: %i/%i Size: %1.1f Weight: %.1f/%d ", GetLevel(), GetClass(), GetRace(), GetDS(), RuleI(Character, ItemDamageShieldCap), GetSize(), (float)CalcCurrentWeight() / 10.0f, GetSTR());
client->Message(0, " HP: %i/%i HP Regen: %i/%i",GetHP(), GetMaxHP(), CalcHPRegen(), CalcHPRegenCap());
client->Message(0, " compute_tohit: %i TotalToHit: %i", compute_tohit(skill), GetTotalToHit(skill, 0));
client->Message(0, " compute_defense: %i TotalDefense: %i", compute_defense(), GetTotalDefense());
client->Message(0, " offense: %i mitigation ac: %i", offense(skill), GetMitigationAC());
client->Message(Chat::Yellow, "~~~~~ %s %s ~~~~~", GetCleanName(), GetLastName());
client->Message(Chat::White, " Level: %i Class: %i Race: %i DS: %i/%i Size: %1.1f Weight: %.1f/%d ", GetLevel(), GetClass(), GetRace(), GetDS(), RuleI(Character, ItemDamageShieldCap), GetSize(), (float)CalcCurrentWeight() / 10.0f, GetSTR());
client->Message(Chat::White, " HP: %i/%i HP Regen: %i/%i",GetHP(), GetMaxHP(), CalcHPRegen(), CalcHPRegenCap());
client->Message(Chat::White, " compute_tohit: %i TotalToHit: %i", compute_tohit(skill), GetTotalToHit(skill, 0));
client->Message(Chat::White, " compute_defense: %i TotalDefense: %i", compute_defense(), GetTotalDefense());
client->Message(Chat::White, " offense: %i mitigation ac: %i", offense(skill), GetMitigationAC());
if(CalcMaxMana() > 0)
client->Message(0, " Mana: %i/%i Mana Regen: %i/%i", GetMana(), GetMaxMana(), CalcManaRegen(), CalcManaRegenCap());
client->Message(0, " End.: %i/%i End. Regen: %i/%i",GetEndurance(), GetMaxEndurance(), CalcEnduranceRegen(), CalcEnduranceRegenCap());
client->Message(0, " ATK: %i Worn/Spell ATK %i/%i Server Side ATK: %i", GetTotalATK(), RuleI(Character, ItemATKCap), GetATKBonus(), GetATK());
client->Message(0, " Haste: %i / %i (Item: %i + Spell: %i + Over: %i)", GetHaste(), RuleI(Character, HasteCap), itembonuses.haste, spellbonuses.haste + spellbonuses.hastetype2, spellbonuses.hastetype3 + ExtraHaste);
client->Message(0, " STR: %i STA: %i DEX: %i AGI: %i INT: %i WIS: %i CHA: %i", GetSTR(), GetSTA(), GetDEX(), GetAGI(), GetINT(), GetWIS(), GetCHA());
client->Message(0, " hSTR: %i hSTA: %i hDEX: %i hAGI: %i hINT: %i hWIS: %i hCHA: %i", GetHeroicSTR(), GetHeroicSTA(), GetHeroicDEX(), GetHeroicAGI(), GetHeroicINT(), GetHeroicWIS(), GetHeroicCHA());
client->Message(0, " MR: %i PR: %i FR: %i CR: %i DR: %i Corruption: %i PhR: %i", GetMR(), GetPR(), GetFR(), GetCR(), GetDR(), GetCorrup(), GetPhR());
client->Message(0, " hMR: %i hPR: %i hFR: %i hCR: %i hDR: %i hCorruption: %i", GetHeroicMR(), GetHeroicPR(), GetHeroicFR(), GetHeroicCR(), GetHeroicDR(), GetHeroicCorrup());
client->Message(0, " Shielding: %i Spell Shield: %i DoT Shielding: %i Stun Resist: %i Strikethrough: %i Avoidance: %i Accuracy: %i Combat Effects: %i", GetShielding(), GetSpellShield(), GetDoTShield(), GetStunResist(), GetStrikeThrough(), GetAvoidance(), GetAccuracy(), GetCombatEffects());
client->Message(0, " Heal Amt.: %i Spell Dmg.: %i Clairvoyance: %i DS Mitigation: %i", GetHealAmt(), GetSpellDmg(), GetClair(), GetDSMit());
client->Message(Chat::White, " Mana: %i/%i Mana Regen: %i/%i", GetMana(), GetMaxMana(), CalcManaRegen(), CalcManaRegenCap());
client->Message(Chat::White, " End.: %i/%i End. Regen: %i/%i",GetEndurance(), GetMaxEndurance(), CalcEnduranceRegen(), CalcEnduranceRegenCap());
client->Message(Chat::White, " ATK: %i Worn/Spell ATK %i/%i Server Side ATK: %i", GetTotalATK(), RuleI(Character, ItemATKCap), GetATKBonus(), GetATK());
client->Message(Chat::White, " Haste: %i / %i (Item: %i + Spell: %i + Over: %i)", GetHaste(), RuleI(Character, HasteCap), itembonuses.haste, spellbonuses.haste + spellbonuses.hastetype2, spellbonuses.hastetype3 + ExtraHaste);
client->Message(Chat::White, " STR: %i STA: %i DEX: %i AGI: %i INT: %i WIS: %i CHA: %i", GetSTR(), GetSTA(), GetDEX(), GetAGI(), GetINT(), GetWIS(), GetCHA());
client->Message(Chat::White, " hSTR: %i hSTA: %i hDEX: %i hAGI: %i hINT: %i hWIS: %i hCHA: %i", GetHeroicSTR(), GetHeroicSTA(), GetHeroicDEX(), GetHeroicAGI(), GetHeroicINT(), GetHeroicWIS(), GetHeroicCHA());
client->Message(Chat::White, " MR: %i PR: %i FR: %i CR: %i DR: %i Corruption: %i PhR: %i", GetMR(), GetPR(), GetFR(), GetCR(), GetDR(), GetCorrup(), GetPhR());
client->Message(Chat::White, " hMR: %i hPR: %i hFR: %i hCR: %i hDR: %i hCorruption: %i", GetHeroicMR(), GetHeroicPR(), GetHeroicFR(), GetHeroicCR(), GetHeroicDR(), GetHeroicCorrup());
client->Message(Chat::White, " Shielding: %i Spell Shield: %i DoT Shielding: %i Stun Resist: %i Strikethrough: %i Avoidance: %i Accuracy: %i Combat Effects: %i", GetShielding(), GetSpellShield(), GetDoTShield(), GetStunResist(), GetStrikeThrough(), GetAvoidance(), GetAccuracy(), GetCombatEffects());
client->Message(Chat::White, " Heal Amt.: %i Spell Dmg.: %i Clairvoyance: %i DS Mitigation: %i", GetHealAmt(), GetSpellDmg(), GetClair(), GetDSMit());
if(GetClass() == BARD)
client->Message(0, " Singing: %i Brass: %i String: %i Percussion: %i Wind: %i", GetSingMod(), GetBrassMod(), GetStringMod(), GetPercMod(), GetWindMod());
client->Message(Chat::White, " Singing: %i Brass: %i String: %i Percussion: %i Wind: %i", GetSingMod(), GetBrassMod(), GetStringMod(), GetPercMod(), GetWindMod());
Extra_Info:
client->Message(0, " BaseRace: %i Gender: %i BaseGender: %i Texture: %i HelmTexture: %i", GetBaseRace(), GetGender(), GetBaseGender(), GetTexture(), GetHelmTexture());
client->Message(Chat::White, " BaseRace: %i Gender: %i BaseGender: %i Texture: %i HelmTexture: %i", GetBaseRace(), GetGender(), GetBaseGender(), GetTexture(), GetHelmTexture());
if (client->Admin() >= 100) {
client->Message(0, " CharID: %i EntityID: %i PetID: %i OwnerID: %i AIControlled: %i Targetted: %i", CharacterID(), GetID(), GetPetID(), GetOwnerID(), IsAIControlled(), targeted);
client->Message(Chat::White, " CharID: %i EntityID: %i PetID: %i OwnerID: %i AIControlled: %i Targetted: %i", CharacterID(), GetID(), GetPetID(), GetOwnerID(), IsAIControlled(), targeted);
}
}
@ -7248,17 +7248,17 @@ void Client::ShowXTargets(Client *c)
return;
for(int i = 0; i < GetMaxXTargets(); ++i)
c->Message(0, "Xtarget Slot: %i, Type: %2i, ID: %4i, Name: %s", i, XTargets[i].Type, XTargets[i].ID, XTargets[i].Name);
c->Message(Chat::White, "Xtarget Slot: %i, Type: %2i, ID: %4i, Name: %s", i, XTargets[i].Type, XTargets[i].ID, XTargets[i].Name);
auto &list = GetXTargetAutoMgr()->get_list();
// yeah, I kept having to do something for debugging to tell if managers were the same object or not :P
// so lets use the address as an "ID"
c->Message(0, "XTargetAutoMgr ID %p size %d", GetXTargetAutoMgr(), list.size());
c->Message(Chat::White, "XTargetAutoMgr ID %p size %d", GetXTargetAutoMgr(), list.size());
int count = 0;
for (auto &e : list) {
c->Message(0, "spawn id %d count %d", e.spawn_id, e.count);
c->Message(Chat::White, "spawn id %d count %d", e.spawn_id, e.count);
count++;
if (count == 20) { // lets not spam too many ...
c->Message(0, " ... ");
c->Message(Chat::White, " ... ");
break;
}
}
@ -7623,7 +7623,7 @@ void Client::DuplicateLoreMessage(uint32 ItemID)
{
if (!(m_ClientVersionBit & EQEmu::versions::maskRoFAndLater))
{
Message_StringID(0, PICK_LORE);
MessageString(Chat::White, PICK_LORE);
return;
}
@ -7632,7 +7632,7 @@ void Client::DuplicateLoreMessage(uint32 ItemID)
if(!item)
return;
Message_StringID(0, PICK_LORE, item->Name);
MessageString(Chat::White, PICK_LORE, item->Name);
}
void Client::GarbleMessage(char *message, uint8 variance)
@ -7796,7 +7796,7 @@ void Client::SetFactionLevel(uint32 char_id, uint32 npc_id, uint8 char_class, ui
UpdatePersonalFaction(char_id, npc_value[i], faction_id[i], &current_value, temp[i], this_faction_min, this_faction_max);
//Message(14, "Min(%d) Max(%d) Before(%d), After(%d)\n", this_faction_min, this_faction_max, faction_before_hit, current_value);
//Message(Chat::Lime, "Min(%d) Max(%d) Before(%d), After(%d)\n", this_faction_min, this_faction_max, faction_before_hit, current_value);
SendFactionMessage(npc_value[i], faction_id[i], faction_before_hit, current_value, temp[i], this_faction_min, this_faction_max);
}
@ -7839,7 +7839,7 @@ void Client::SetFactionLevel2(uint32 char_id, int32 faction_id, uint8 char_class
UpdatePersonalFaction(char_id, value, faction_id, &current_value, temp, this_faction_min, this_faction_max);
//Message(14, "Min(%d) Max(%d) Before(%d), After(%d)\n", this_faction_min, this_faction_max, faction_before_hit, current_value);
//Message(Chat::Lime, "Min(%d) Max(%d) Before(%d), After(%d)\n", this_faction_min, this_faction_max, faction_before_hit, current_value);
SendFactionMessage(value, faction_id, faction_before_hit, current_value, temp, this_faction_min, this_faction_max);
}
@ -7948,7 +7948,7 @@ void Client::MerchantRejectMessage(Mob *merchant, int primaryfaction)
}
// If no primary faction or biggest influence is your faction hit
if (primaryfaction <= 0 || lowestvalue == tmpFactionValue) {
merchant->Say_StringID(zone->random.Int(WONT_SELL_DEEDS1, WONT_SELL_DEEDS6));
merchant->SayString(zone->random.Int(WONT_SELL_DEEDS1, WONT_SELL_DEEDS6));
} else if (lowestvalue == fmod.race_mod) { // race biggest
// Non-standard race (ex. illusioned to wolf)
if (GetRace() > PLAYER_RACE_COUNT) {
@ -7967,7 +7967,7 @@ void Client::MerchantRejectMessage(Mob *merchant, int primaryfaction)
messageid = WONT_SELL_NONSTDRACE1;
break;
}
merchant->Say_StringID(messageid);
merchant->SayString(messageid);
} else { // normal player races
messageid = zone->random.Int(1, 4);
switch (messageid) {
@ -7987,15 +7987,15 @@ void Client::MerchantRejectMessage(Mob *merchant, int primaryfaction)
messageid = WONT_SELL_RACE1;
break;
}
merchant->Say_StringID(messageid, itoa(GetRace()));
merchant->SayString(messageid, itoa(GetRace()));
}
} else if (lowestvalue == fmod.class_mod) {
merchant->Say_StringID(zone->random.Int(WONT_SELL_CLASS1, WONT_SELL_CLASS5), itoa(GetClass()));
merchant->SayString(zone->random.Int(WONT_SELL_CLASS1, WONT_SELL_CLASS5), itoa(GetClass()));
} else {
// Must be deity - these two sound the best for that.
// Can't use a message with a field, GUI wants class/race names.
// for those message IDs. These are straight text.
merchant->Say_StringID(zone->random.Int(WONT_SELL_DEEDS1, WONT_SELL_DEEDS2));
merchant->SayString(zone->random.Int(WONT_SELL_DEEDS1, WONT_SELL_DEEDS2));
}
return;
}
@ -8031,15 +8031,15 @@ void Client::SendFactionMessage(int32 tmpvalue, int32 faction_id, int32 faction_
if (tmpvalue == 0 || temp == 1 || temp == 2)
return;
else if (faction_value >= this_faction_max)
Message_StringID(15, FACTION_BEST, name);
MessageString(Chat::Yellow, FACTION_BEST, name);
else if (faction_value <= this_faction_min)
Message_StringID(15, FACTION_WORST, name);
MessageString(Chat::Yellow, FACTION_WORST, name);
else if (tmpvalue > 0 && faction_value < this_faction_max && !RuleB(Client, UseLiveFactionMessage))
Message_StringID(15, FACTION_BETTER, name);
MessageString(Chat::Yellow, FACTION_BETTER, name);
else if (tmpvalue < 0 && faction_value > this_faction_min && !RuleB(Client, UseLiveFactionMessage))
Message_StringID(15, FACTION_WORSE, name);
MessageString(Chat::Yellow, FACTION_WORSE, name);
else if (RuleB(Client, UseLiveFactionMessage))
Message(15, "Your faction standing with %s has been adjusted by %i.", name, tmpvalue); //New Live faction message (14261)
Message(Chat::Yellow, "Your faction standing with %s has been adjusted by %i.", name, tmpvalue); //New Live faction message (14261)
return;
}
@ -8365,7 +8365,7 @@ void Client::Consume(const EQEmu::ItemData *item, uint8 type, int16 slot, bool a
DeleteItemInInventory(slot, 1, false);
if (!auto_consume) // no message if the client consumed for us
entity_list.MessageClose_StringID(this, true, 50, 0, EATING_MESSAGE, GetName(), item->Name);
entity_list.MessageCloseString(this, true, 50, 0, EATING_MESSAGE, GetName(), item->Name);
Log(Logs::General, Logs::Food, "Eating from slot: %i", (int)slot);
@ -8383,7 +8383,7 @@ void Client::Consume(const EQEmu::ItemData *item, uint8 type, int16 slot, bool a
increase, m_pp.thirst_level);
if (!auto_consume) // no message if the client consumed for us
entity_list.MessageClose_StringID(this, true, 50, 0, DRINKING_MESSAGE, GetName(), item->Name);
entity_list.MessageCloseString(this, true, 50, 0, DRINKING_MESSAGE, GetName(), item->Name);
Log(Logs::General, Logs::Food, "Drinking from slot: %i", (int)slot);
}
@ -8428,7 +8428,7 @@ void Client::ExpeditionSay(const char *str, int ExpID) {
return;
if(results.RowCount() == 0) {
this->Message(14, "You say to the expedition, '%s'", str);
this->Message(Chat::Lime, "You say to the expedition, '%s'", str);
return;
}
@ -8531,7 +8531,7 @@ void Client::SendHPUpdateMarquee(){
return;
std::string health_update_notification = StringFormat("Health: %u%%", health_percentage);
this->SendMarqueeMessage(15, 510, 0, 3000, 3000, health_update_notification);
this->SendMarqueeMessage(Chat::Yellow, 510, 0, 3000, 3000, health_update_notification);
}
uint32 Client::GetMoney(uint8 type, uint8 subtype) {
@ -9044,7 +9044,7 @@ void Client::SetPrimaryWeaponOrnamentation(uint32 model_id)
SendItemPacket(EQEmu::invslot::slotPrimary, primary_item, ItemPacketTrade);
WearChange(EQEmu::textures::weaponPrimary, static_cast<uint16>(model_id), 0);
Message(15, "Your primary weapon appearance has been modified");
Message(Chat::Yellow, "Your primary weapon appearance has been modified");
}
}
@ -9067,7 +9067,7 @@ void Client::SetSecondaryWeaponOrnamentation(uint32 model_id)
SendItemPacket(EQEmu::invslot::slotSecondary, secondary_item, ItemPacketTrade);
WearChange(EQEmu::textures::weaponSecondary, static_cast<uint16>(model_id), 0);
Message(15, "Your secondary weapon appearance has been modified");
Message(Chat::Yellow, "Your secondary weapon appearance has been modified");
}
}
@ -9107,7 +9107,7 @@ bool Client::GotoPlayer(std::string player_name)
auto heading = static_cast<float>(atof(row[5]));
if (instance_id > 0 && !database.CheckInstanceExists(instance_id)) {
this->Message(15, "Instance no longer exists...");
this->Message(Chat::Yellow, "Instance no longer exists...");
return false;
}

View File

@ -90,23 +90,6 @@ public:
bool ack_req;
};
enum { //Type arguments to the Message* routines.
//all not explicitly listed are the same grey color
clientMessageWhite0 = 0,
clientMessageLoot = 2, //dark green
clientMessageTradeskill = 4, //light blue
clientMessageTell = 5, //magenta
clientMessageWhite = 7,
clientMessageWhite2 = 10,
clientMessageLightGrey = 12,
clientMessageError = 13, //red
clientMessageGreen = 14,
clientMessageYellow = 15,
clientMessageBlue = 16,
clientMessageGroup = 18, //cyan
clientMessageWhite3 = 20,
};
#define SPELLBAR_UNLOCK 0x2bc
enum { //scribing argument to MemorizeSpell
memSpellUnknown = -1, // this modifies some state data
@ -295,11 +278,11 @@ public:
void SendBazaarWelcome();
void DyeArmor(EQEmu::TintProfile* dye);
uint8 SlotConvert(uint8 slot,bool bracer=false);
void Message_StringID(uint32 type, uint32 string_id, uint32 distance = 0);
void Message_StringID(uint32 type, uint32 string_id, const char* message,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0, uint32 distance = 0);
void MessageString(uint32 type, uint32 string_id, uint32 distance = 0);
void MessageString(uint32 type, uint32 string_id, const char* message,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0, uint32 distance = 0);
bool FilteredMessageCheck(Mob *sender, eqFilterType filter);
void FilteredMessage_StringID(Mob *sender, uint32 type, eqFilterType filter, uint32 string_id);
void FilteredMessage_StringID(Mob *sender, uint32 type, eqFilterType filter,
void FilteredMessageString(Mob *sender, uint32 type, eqFilterType filter, uint32 string_id);
void FilteredMessageString(Mob *sender, uint32 type, eqFilterType filter,
uint32 string_id, const char *message1, const char *message2 = nullptr,
const char *message3 = nullptr, const char *message4 = nullptr,
const char *message5 = nullptr, const char *message6 = nullptr,

File diff suppressed because it is too large Load Diff

View File

@ -378,10 +378,10 @@ bool Client::Process() {
}
if (!CombatRange(auto_attack_target)) {
Message_StringID(MT_TooFarAway, TARGET_TOO_FAR);
MessageString(Chat::TooFarAway, TARGET_TOO_FAR);
}
else if (auto_attack_target == this) {
Message_StringID(MT_TooFarAway, TRY_ATTACKING_SOMEONE);
MessageString(Chat::TooFarAway, TRY_ATTACKING_SOMEONE);
}
else if (!los_status || !los_status_facing) {
//you can't see your target
@ -401,11 +401,11 @@ bool Client::Process() {
if (GetClass() == WARRIOR || GetClass() == BERSERKER) {
if (!dead && !IsBerserk() && GetHPRatio() < RuleI(Combat, BerserkerFrenzyStart)) {
entity_list.MessageClose_StringID(this, false, 200, 0, BERSERK_START, GetName());
entity_list.MessageCloseString(this, false, 200, 0, BERSERK_START, GetName());
berserk = true;
}
if (IsBerserk() && GetHPRatio() > RuleI(Combat, BerserkerFrenzyEnd)) {
entity_list.MessageClose_StringID(this, false, 200, 0, BERSERK_END, GetName());
entity_list.MessageCloseString(this, false, 200, 0, BERSERK_END, GetName());
berserk = false;
}
}
@ -416,11 +416,11 @@ bool Client::Process() {
// Range check
if (!CombatRange(auto_attack_target)) {
// this is a duplicate message don't use it.
//Message_StringID(MT_TooFarAway,TARGET_TOO_FAR);
//MessageString(Chat::TooFarAway,TARGET_TOO_FAR);
}
// Don't attack yourself
else if (auto_attack_target == this) {
//Message_StringID(MT_TooFarAway,TRY_ATTACKING_SOMEONE);
//MessageString(Chat::TooFarAway,TRY_ATTACKING_SOMEONE);
}
else if (!los_status || !los_status_facing)
{
@ -465,7 +465,8 @@ bool Client::Process() {
{
if (!CombatRange(shield_target))
{
entity_list.MessageClose_StringID(this, false, 100, 0,
entity_list.MessageCloseString(
this, false, 100, 0,
END_SHIELDING, GetCleanName(), shield_target->GetCleanName());
for (int y = 0; y < 2; y++)
{
@ -951,9 +952,9 @@ void Client::BulkSendMerchantInventory(int merchant_id, int npcid) {
sprintf(handy_id, "%i", greet_id);
if (greet_id != MERCHANT_GREETING)
Message_StringID(10, GENERIC_STRINGID_SAY, merch->GetCleanName(), handy_id, this->GetName(), handyitem->Name);
MessageString(Chat::NPCQuestSay, GENERIC_STRINGID_SAY, merch->GetCleanName(), handy_id, this->GetName(), handyitem->Name);
else
Message_StringID(10, GENERIC_STRINGID_SAY, merch->GetCleanName(), handy_id, this->GetName());
MessageString(Chat::NPCQuestSay, GENERIC_STRINGID_SAY, merch->GetCleanName(), handy_id, this->GetName());
}
// safe_delete_array(cpi);
@ -989,7 +990,7 @@ void Client::OPRezzAnswer(uint32 Action, uint32 SpellID, uint16 ZoneID, uint16 I
if(PendingRezzXP < 0) {
// pendingrezexp is set to -1 if we are not expecting an OP_RezzAnswer
Log(Logs::Detail, Logs::Spells, "Unexpected OP_RezzAnswer. Ignoring it.");
Message(13, "You have already been resurrected.\n");
Message(Chat::Red, "You have already been resurrected.\n");
return;
}
@ -1043,7 +1044,7 @@ void Client::OPTGB(const EQApplicationPacket *app)
uint32 tgb_flag = *(uint32 *)app->pBuffer;
if(tgb_flag == 2)
Message_StringID(0, TGB() ? TGB_ON : TGB_OFF);
MessageString(Chat::White, TGB() ? TGB_ON : TGB_OFF);
else
tgb = tgb_flag;
}
@ -1061,7 +1062,7 @@ void Client::OPMemorizeSpell(const EQApplicationPacket* app)
if(!IsValidSpell(memspell->spell_id))
{
Message(13, "Unexpected error: spell id out of range");
Message(Chat::Red, "Unexpected error: spell id out of range");
return;
}
@ -1072,8 +1073,8 @@ void Client::OPMemorizeSpell(const EQApplicationPacket* app)
)
{
char val1[20]={0};
Message_StringID(13,SPELL_LEVEL_TO_LOW,ConvertArray(spells[memspell->spell_id].classes[GetClass()-1],val1),spells[memspell->spell_id].name);
//Message(13, "Unexpected error: Class cant use this spell at your level!");
MessageString(Chat::Red,SPELL_LEVEL_TO_LOW,ConvertArray(spells[memspell->spell_id].classes[GetClass()-1],val1),spells[memspell->spell_id].name);
//Message(Chat::Red, "Unexpected error: Class cant use this spell at your level!");
return;
}
@ -1087,7 +1088,7 @@ void Client::OPMemorizeSpell(const EQApplicationPacket* app)
const EQEmu::ItemData* item = inst->GetItem();
if (RuleB(Character, RestrictSpellScribing) && !item->IsEquipable(GetRace(), GetClass())) {
Message_StringID(13, CANNOT_USE_ITEM);
MessageString(Chat::Red, CANNOT_USE_ITEM);
break;
}
@ -1439,7 +1440,7 @@ void Client::OPMoveCoin(const EQApplicationPacket* app)
}
else{
if (to_bucket == &m_pp.platinum_shared || from_bucket == &m_pp.platinum_shared){
this->Message(13, "::: WARNING! ::: SHARED BANK IS DISABLED AND YOUR PLATINUM WILL BE DESTROYED IF YOU PUT IT HERE");
this->Message(Chat::Red, "::: WARNING! ::: SHARED BANK IS DISABLED AND YOUR PLATINUM WILL BE DESTROYED IF YOU PUT IT HERE");
}
}
}
@ -1455,8 +1456,8 @@ void Client::OPMoveCoin(const EQApplicationPacket* app)
with->trade->state = Trading;
Client* recipient = trader->CastToClient();
recipient->Message(15, "%s adds some coins to the trade.", GetName());
recipient->Message(15, "The total trade is: %i PP, %i GP, %i SP, %i CP",
recipient->Message(Chat::Yellow, "%s adds some coins to the trade.", GetName());
recipient->Message(Chat::Yellow, "The total trade is: %i PP, %i GP, %i SP, %i CP",
trade->pp, trade->gp,
trade->sp, trade->cp
);
@ -1526,7 +1527,7 @@ void Client::OPGMTraining(const EQApplicationPacket *app)
// welcome message
if (pTrainer && pTrainer->IsNPC())
{
pTrainer->Say_StringID(zone->random.Int(1204, 1207), GetCleanName());
pTrainer->SayString(zone->random.Int(1204, 1207), GetCleanName());
}
}
@ -1555,7 +1556,7 @@ void Client::OPGMEndTraining(const EQApplicationPacket *app)
// goodbye message
if (pTrainer->IsNPC())
{
pTrainer->Say_StringID(zone->random.Int(1208, 1211), GetCleanName());
pTrainer->SayString(zone->random.Int(1208, 1211), GetCleanName());
}
}
@ -1645,7 +1646,7 @@ void Client::OPGMTrainSkill(const EQApplicationPacket *app)
case EQEmu::skills::SkillJewelryMaking:
case EQEmu::skills::SkillPottery:
if(skilllevel >= RuleI(Skills, MaxTrainTradeskills)) {
Message_StringID(13, MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
MessageString(Chat::Red, MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
return;
}
break;
@ -1655,7 +1656,7 @@ void Client::OPGMTrainSkill(const EQApplicationPacket *app)
case EQEmu::skills::SkillSpecializeDivination:
case EQEmu::skills::SkillSpecializeEvocation:
if(skilllevel >= RuleI(Skills, MaxTrainSpecializations)) {
Message_StringID(13, MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
MessageString(Chat::Red, MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
return;
}
default:
@ -1666,7 +1667,7 @@ void Client::OPGMTrainSkill(const EQApplicationPacket *app)
if (skilllevel >= MaxSkillValue)
{
// Don't allow training over max skill level
Message_StringID(13, MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
MessageString(Chat::Red, MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
return;
}
@ -1676,7 +1677,7 @@ void Client::OPGMTrainSkill(const EQApplicationPacket *app)
if (skilllevel >= MaxSpecSkill)
{
// Restrict specialization training to follow the rules
Message_StringID(13, MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
MessageString(Chat::Red, MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
return;
}
}
@ -1919,7 +1920,7 @@ void Client::DoTracking()
Mob *m = entity_list.GetMob(TrackingID);
if (!m || m->IsCorpse()) {
Message_StringID(MT_Skills, TRACK_LOST_TARGET);
MessageString(Chat::Skills, TRACK_LOST_TARGET);
TrackingID = 0;
return;
}
@ -1930,23 +1931,23 @@ void Client::DoTracking()
RelativeHeading += 512;
if (RelativeHeading > 480)
Message_StringID(MT_Skills, TRACK_STRAIGHT_AHEAD, m->GetCleanName());
MessageString(Chat::Skills, TRACK_STRAIGHT_AHEAD, m->GetCleanName());
else if (RelativeHeading > 416)
Message_StringID(MT_Skills, TRACK_AHEAD_AND_TO, m->GetCleanName(), "left");
MessageString(Chat::Skills, TRACK_AHEAD_AND_TO, m->GetCleanName(), "left");
else if (RelativeHeading > 352)
Message_StringID(MT_Skills, TRACK_TO_THE, m->GetCleanName(), "left");
MessageString(Chat::Skills, TRACK_TO_THE, m->GetCleanName(), "left");
else if (RelativeHeading > 288)
Message_StringID(MT_Skills, TRACK_BEHIND_AND_TO, m->GetCleanName(), "left");
MessageString(Chat::Skills, TRACK_BEHIND_AND_TO, m->GetCleanName(), "left");
else if (RelativeHeading > 224)
Message_StringID(MT_Skills, TRACK_BEHIND_YOU, m->GetCleanName());
MessageString(Chat::Skills, TRACK_BEHIND_YOU, m->GetCleanName());
else if (RelativeHeading > 160)
Message_StringID(MT_Skills, TRACK_BEHIND_AND_TO, m->GetCleanName(), "right");
MessageString(Chat::Skills, TRACK_BEHIND_AND_TO, m->GetCleanName(), "right");
else if (RelativeHeading > 96)
Message_StringID(MT_Skills, TRACK_TO_THE, m->GetCleanName(), "right");
MessageString(Chat::Skills, TRACK_TO_THE, m->GetCleanName(), "right");
else if (RelativeHeading > 32)
Message_StringID(MT_Skills, TRACK_AHEAD_AND_TO, m->GetCleanName(), "right");
MessageString(Chat::Skills, TRACK_AHEAD_AND_TO, m->GetCleanName(), "right");
else if (RelativeHeading >= 0)
Message_StringID(MT_Skills, TRACK_STRAIGHT_AHEAD, m->GetCleanName());
MessageString(Chat::Skills, TRACK_STRAIGHT_AHEAD, m->GetCleanName());
}
void Client::HandleRespawnFromHover(uint32 Option)

File diff suppressed because it is too large Load Diff

View File

@ -182,6 +182,7 @@ void command_netstats(Client *c, const Seperator *sep);
void command_network(Client *c, const Seperator *sep);
void command_npccast(Client *c, const Seperator *sep);
void command_npcedit(Client *c, const Seperator *sep);
void command_npceditmass(Client *c, const Seperator *sep);
void command_npcemote(Client *c, const Seperator *sep);
void command_npcloot(Client *c, const Seperator *sep);
void command_npcsay(Client *c, const Seperator *sep);

View File

@ -889,14 +889,14 @@ void Corpse::MakeLootRequestPackets(Client* client, const EQApplicationPacket* a
if(IsPlayerCorpse() && !corpse_db_id) { // really should try to resave in this case
// SendLootReqErrorPacket(client, 0);
client->Message(13, "Warning: Corpse's dbid = 0! Corpse will not survive zone shutdown!");
client->Message(Chat::Red, "Warning: Corpse's dbid = 0! Corpse will not survive zone shutdown!");
std::cout << "Error: PlayerCorpse::MakeLootRequestPackets: dbid = 0!" << std::endl;
// return;
}
if(is_locked && client->Admin() < 100) {
SendLootReqErrorPacket(client, LootResponse::SomeoneElse);
client->Message(13, "Error: Corpse locked by GM.");
client->Message(Chat::Red, "Error: Corpse locked by GM.");
return;
}
@ -960,7 +960,7 @@ void Corpse::MakeLootRequestPackets(Client* client, const EQApplicationPacket* a
loot_coin = (tmp[0] == 1 && tmp[1] == '\0');
if (loot_request_type == LootRequestType::GMPeek || loot_request_type == LootRequestType::GMAllowed) {
client->Message(15, "This corpse contains %u platinum, %u gold, %u silver and %u copper.",
client->Message(Chat::Yellow, "This corpse contains %u platinum, %u gold, %u silver and %u copper.",
GetPlatinum(), GetGold(), GetSilver(), GetCopper());
auto outapp = new EQApplicationPacket(OP_MoneyOnCorpse, sizeof(moneyOnCorpseStruct));
@ -1035,7 +1035,7 @@ void Corpse::MakeLootRequestPackets(Client* client, const EQApplicationPacket* a
else {
Log(Logs::General, Logs::Inventory, "MakeLootRequestPackets() PlayerKillItem %i not found", pkitemid);
client->Message(CC_Red, "PlayerKillItem (id: %i) could not be found!", pkitemid);
client->Message(Chat::Red, "PlayerKillItem (id: %i) could not be found!", pkitemid);
}
client->QueuePacket(app);
@ -1129,7 +1129,7 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app)
/* To prevent item loss for a player using 'Loot All' who doesn't have inventory space for all their items. */
if (RuleB(Character, CheckCursorEmptyWhenLooting) && !client->GetInv().CursorEmpty()) {
client->Message(13, "You may not loot an item while you have an item on your cursor.");
client->Message(Chat::Red, "You may not loot an item while you have an item on your cursor.");
client->QueuePacket(app);
SendEndLootErrorPacket(client);
/* Unlock corpse for others */
@ -1146,7 +1146,7 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app)
if (IsPlayerCorpse() && !CanPlayerLoot(client->CharacterID()) && !become_npc &&
(char_id != client->CharacterID() && client->Admin() < 150)) {
client->Message(13, "Error: This is a player corpse and you dont own it.");
client->Message(Chat::Red, "Error: This is a player corpse and you dont own it.");
client->QueuePacket(app);
SendEndLootErrorPacket(client);
return;
@ -1155,13 +1155,13 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app)
if (is_locked && client->Admin() < 100) {
client->QueuePacket(app);
SendLootReqErrorPacket(client, LootResponse::SomeoneElse);
client->Message(13, "Error: Corpse locked by GM.");
client->Message(Chat::Red, "Error: Corpse locked by GM.");
return;
}
if (IsPlayerCorpse() && (char_id != client->CharacterID()) && CanPlayerLoot(client->CharacterID()) &&
GetPlayerKillItem() == 0) {
client->Message(13, "Error: You cannot loot any more items from this corpse.");
client->Message(Chat::Red, "Error: You cannot loot any more items from this corpse.");
client->QueuePacket(app);
SendEndLootErrorPacket(client);
ResetLooter();
@ -1201,7 +1201,7 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app)
if (client && inst) {
if (client->CheckLoreConflict(item)) {
client->Message_StringID(0, LOOT_LORE_ERROR);
client->MessageString(Chat::White, LOOT_LORE_ERROR);
client->QueuePacket(app);
SendEndLootErrorPacket(client);
ResetLooter();
@ -1214,7 +1214,7 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app)
EQEmu::ItemInstance *itm = inst->GetAugment(i);
if (itm) {
if (client->CheckLoreConflict(itm->GetItem())) {
client->Message_StringID(0, LOOT_LORE_ERROR);
client->MessageString(Chat::White, LOOT_LORE_ERROR);
client->QueuePacket(app);
SendEndLootErrorPacket(client);
ResetLooter();
@ -1236,7 +1236,7 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app)
args.push_back(this);
if (parse->EventPlayer(EVENT_LOOT, client, buf, 0, &args) != 0) {
lootitem->auto_loot = -1;
client->Message_StringID(CC_Red, LOOT_NOT_ALLOWED, inst->GetItem()->Name);
client->MessageString(Chat::Red, LOOT_NOT_ALLOWED, inst->GetItem()->Name);
client->QueuePacket(app);
delete inst;
return;
@ -1312,18 +1312,18 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app)
linker.GenerateLink();
client->Message_StringID(MT_LootMessages, LOOTED_MESSAGE, linker.Link().c_str());
client->MessageString(Chat::Loot, LOOTED_MESSAGE, linker.Link().c_str());
if (!IsPlayerCorpse()) {
Group *g = client->GetGroup();
if (g != nullptr) {
g->GroupMessage_StringID(client, MT_LootMessages, OTHER_LOOTED_MESSAGE,
g->GroupMessageString(client, Chat::Loot, OTHER_LOOTED_MESSAGE,
client->GetName(), linker.Link().c_str());
}
else {
Raid *r = client->GetRaid();
if (r != nullptr) {
r->RaidMessage_StringID(client, MT_LootMessages, OTHER_LOOTED_MESSAGE,
r->RaidMessageString(client, Chat::Loot, OTHER_LOOTED_MESSAGE,
client->GetName(), linker.Link().c_str());
}
}
@ -1371,7 +1371,7 @@ void Corpse::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
void Corpse::QueryLoot(Client* to) {
int x = 0, y = 0; // x = visible items, y = total items
to->Message(0, "Coin: %ip, %ig, %is, %ic", platinum, gold, silver, copper);
to->Message(Chat::White, "Coin: %ip, %ig, %is, %ic", platinum, gold, silver, copper);
ItemList::iterator cur,end;
cur = itemlist.begin();
@ -1405,19 +1405,19 @@ void Corpse::QueryLoot(Client* to) {
const EQEmu::ItemData* item = database.GetItem(sitem->item_id);
if (item)
to->Message(0, "LootSlot: %i Item: %s (%d), Count: %i", sitem->lootslot, item->Name, item->ID, sitem->charges);
to->Message(Chat::White, "LootSlot: %i Item: %s (%d), Count: %i", sitem->lootslot, item->Name, item->ID, sitem->charges);
else
to->Message(0, "Error: 0x%04x", sitem->item_id);
to->Message(Chat::White, "Error: 0x%04x", sitem->item_id);
y++;
}
}
if (IsPlayerCorpse()) {
to->Message(0, "%i visible %s (%i total) on %s (DBID: %i).", x, x==1?"item":"items", y, this->GetName(), this->GetCorpseDBID());
to->Message(Chat::White, "%i visible %s (%i total) on %s (DBID: %i).", x, x==1?"item":"items", y, this->GetName(), this->GetCorpseDBID());
}
else {
to->Message(0, "%i %s on %s.", y, y==1?"item":"items", this->GetName());
to->Message(Chat::White, "%i %s on %s.", y, y==1?"item":"items", this->GetName());
}
}
@ -1426,7 +1426,7 @@ bool Corpse::Summon(Client* client, bool spell, bool CheckDistance) {
if (!spell) {
if (this->GetCharID() == client->CharacterID()) {
if (IsLocked() && client->Admin() < 100) {
client->Message(13, "That corpse is locked by a GM.");
client->Message(Chat::Red, "That corpse is locked by a GM.");
return false;
}
if (!CheckDistance || (DistanceSquaredNoZ(m_Position, client->GetPosition()) <= dist2)) {
@ -1434,7 +1434,7 @@ bool Corpse::Summon(Client* client, bool spell, bool CheckDistance) {
is_corpse_changed = true;
}
else {
client->Message(0, "Corpse is too far away.");
client->Message(Chat::White, "Corpse is too far away.");
return false;
}
}
@ -1449,14 +1449,14 @@ bool Corpse::Summon(Client* client, bool spell, bool CheckDistance) {
is_corpse_changed = true;
}
else {
client->Message(0, "Corpse is too far away.");
client->Message(Chat::White, "Corpse is too far away.");
return false;
}
consented = true;
}
}
if(!consented) {
client->Message(0, "You do not have permission to move this corpse.");
client->Message(Chat::White, "You do not have permission to move this corpse.");
return false;
}
}

View File

@ -171,7 +171,7 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
if (RuleI(Adventure, ItemIDToEnablePorts) != 0) {
if (!sender->KeyRingCheck(RuleI(Adventure, ItemIDToEnablePorts))) {
if (sender->GetInv().HasItem(RuleI(Adventure, ItemIDToEnablePorts)) == INVALID_INDEX) {
sender->Message_StringID(13, DUNGEON_SEALED);
sender->MessageString(Chat::Red, DUNGEON_SEALED);
safe_delete(outapp);
return;
} else {
@ -267,7 +267,7 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
strcpy(door_message, "Door is locked by an unknown guild");
}
sender->Message(4, door_message);
sender->Message(Chat::LightBlue, door_message);
safe_delete(outapp);
return;
}
@ -275,13 +275,13 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
/**
* Key required
*/
sender->Message(4, "This is locked...");
sender->Message(Chat::LightBlue, "This is locked...");
/**
* GM can always open locks
*/
if (sender->GetGM()) {
sender->Message_StringID(4, DOORS_GM);
sender->MessageString(Chat::LightBlue, DOORS_GM);
if (!IsDoorOpen() || (open_type == 58)) {
move_door_packet->action = static_cast<uint8>(invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR);
@ -306,7 +306,7 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
sender->KeyRingAdd(player_key);
}
sender->Message(4, "You got it open!");
sender->Message(Chat::LightBlue, "You got it open!");
if (!IsDoorOpen() || (open_type == 58)) {
move_door_packet->action = static_cast<uint8>(invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR);
@ -333,19 +333,19 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
} else {
move_door_packet->action = static_cast<uint8>(invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR);
}
sender->Message_StringID(4, DOORS_SUCCESSFUL_PICK);
sender->MessageString(Chat::LightBlue, DOORS_SUCCESSFUL_PICK);
} else {
sender->Message_StringID(4, DOORS_INSUFFICIENT_SKILL);
sender->MessageString(Chat::LightBlue, DOORS_INSUFFICIENT_SKILL);
safe_delete(outapp);
return;
}
} else {
sender->Message_StringID(4, DOORS_NO_PICK);
sender->MessageString(Chat::LightBlue, DOORS_NO_PICK);
safe_delete(outapp);
return;
}
} else {
sender->Message_StringID(4, DOORS_CANT_PICK);
sender->MessageString(Chat::LightBlue, DOORS_CANT_PICK);
safe_delete(outapp);
return;
}
@ -361,14 +361,14 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
*/
if (sender->KeyRingCheck(required_key_item)) {
player_key = required_key_item;
sender->Message(4, "You got it open!"); // more debug spam
sender->Message(Chat::LightBlue, "You got it open!"); // more debug spam
if (!IsDoorOpen() || (open_type == 58)) {
move_door_packet->action = static_cast<uint8>(invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR);
} else {
move_door_packet->action = static_cast<uint8>(invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR);
}
} else {
sender->Message_StringID(4, DOORS_LOCKED);
sender->MessageString(Chat::LightBlue, DOORS_LOCKED);
safe_delete(outapp);
return;
}

View File

@ -122,11 +122,12 @@ int32 Mob::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) {
else if (IsNPC() && CastToNPC()->GetSpellScale())
value = int(static_cast<float>(value) * CastToNPC()->GetSpellScale() / 100.0f);
entity_list.MessageClose_StringID(this, true, 100, MT_SpellCrits,
OTHER_CRIT_BLAST, GetName(), itoa(-value));
entity_list.MessageCloseString(
this, true, 100, Chat::SpellCrit,
OTHER_CRIT_BLAST, GetName(), itoa(-value));
if (IsClient())
Message_StringID(MT_SpellCrits, YOU_CRIT_BLAST, itoa(-value));
MessageString(Chat::SpellCrit, YOU_CRIT_BLAST, itoa(-value));
return value;
}
@ -306,11 +307,12 @@ int32 Mob::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
value = int(static_cast<float>(value) * CastToNPC()->GetHealScale() / 100.0f);
if (Critical) {
entity_list.MessageClose_StringID(this, true, 100, MT_SpellCrits,
OTHER_CRIT_HEAL, GetName(), itoa(value));
entity_list.MessageCloseString(
this, true, 100, Chat::SpellCrit,
OTHER_CRIT_HEAL, GetName(), itoa(value));
if (IsClient())
Message_StringID(MT_SpellCrits, YOU_CRIT_HEAL, itoa(value));
MessageString(Chat::SpellCrit, YOU_CRIT_HEAL, itoa(value));
}
return value;
@ -432,13 +434,13 @@ bool Client::TrainDiscipline(uint32 itemid) {
//get the item info
const EQEmu::ItemData *item = database.GetItem(itemid);
if(item == nullptr) {
Message(13, "Unable to find the tome you turned in!");
Message(Chat::Red, "Unable to find the tome you turned in!");
Log(Logs::General, Logs::Error, "Unable to find turned in tome id %lu\n", (unsigned long)itemid);
return(false);
}
if (!item->IsClassCommon() || item->ItemType != EQEmu::item::ItemTypeSpell) {
Message(13, "Invalid item type, you cannot learn from this item.");
Message(Chat::Red, "Invalid item type, you cannot learn from this item.");
//summon them the item back...
SummonItem(itemid);
return(false);
@ -462,7 +464,7 @@ bool Client::TrainDiscipline(uint32 itemid) {
item->Name[5] == ':' &&
item->Name[6] == ' '
)) {
Message(13, "This item is not a tome.");
Message(Chat::Red, "This item is not a tome.");
//summon them the item back...
SummonItem(itemid);
return(false);
@ -470,7 +472,7 @@ bool Client::TrainDiscipline(uint32 itemid) {
int myclass = GetClass();
if(myclass == WIZARD || myclass == ENCHANTER || myclass == MAGICIAN || myclass == NECROMANCER) {
Message(13, "Your class cannot learn from this tome.");
Message(Chat::Red, "Your class cannot learn from this tome.");
//summon them the item back...
SummonItem(itemid);
return(false);
@ -480,7 +482,7 @@ bool Client::TrainDiscipline(uint32 itemid) {
//can we use the item?
uint32 cbit = 1 << (myclass-1);
if(!(item->Classes & cbit)) {
Message(13, "Your class cannot learn from this tome.");
Message(Chat::Red, "Your class cannot learn from this tome.");
//summon them the item back...
SummonItem(itemid);
return(false);
@ -488,7 +490,7 @@ bool Client::TrainDiscipline(uint32 itemid) {
uint32 spell_id = item->Scroll.Effect;
if(!IsValidSpell(spell_id)) {
Message(13, "This tome contains invalid knowledge.");
Message(Chat::Red, "This tome contains invalid knowledge.");
return(false);
}
@ -496,14 +498,14 @@ bool Client::TrainDiscipline(uint32 itemid) {
const SPDat_Spell_Struct &spell = spells[spell_id];
uint8 level_to_use = spell.classes[myclass - 1];
if(level_to_use == 255) {
Message(13, "Your class cannot learn from this tome.");
Message(Chat::Red, "Your class cannot learn from this tome.");
//summon them the item back...
SummonItem(itemid);
return(false);
}
if(level_to_use > GetLevel()) {
Message(13, "You must be at least level %d to learn this discipline.", level_to_use);
Message(Chat::Red, "You must be at least level %d to learn this discipline.", level_to_use);
//summon them the item back...
SummonItem(itemid);
return(false);
@ -513,7 +515,7 @@ bool Client::TrainDiscipline(uint32 itemid) {
int r;
for(r = 0; r < MAX_PP_DISCIPLINES; r++) {
if(m_pp.disciplines.values[r] == spell_id) {
Message(13, "You already know this discipline.");
Message(Chat::Red, "You already know this discipline.");
//summon them the item back...
SummonItem(itemid);
return(false);
@ -525,7 +527,7 @@ bool Client::TrainDiscipline(uint32 itemid) {
return(true);
}
}
Message(13, "You have learned too many disciplines and can learn no more.");
Message(Chat::Red, "You have learned too many disciplines and can learn no more.");
return(false);
}
@ -537,7 +539,7 @@ void Client::TrainDiscBySpellID(int32 spell_id)
m_pp.disciplines.values[i] = spell_id;
database.SaveCharacterDisc(this->CharacterID(), i, spell_id);
SendDisciplineUpdate();
Message(15, "You have learned a new combat ability!");
Message(Chat::Yellow, "You have learned a new combat ability!");
return;
}
}
@ -581,7 +583,7 @@ bool Client::UseDiscipline(uint32 spell_id, uint32 target) {
//make sure we can use it..
if(!IsValidSpell(spell_id)) {
Message(13, "This tome contains invalid knowledge.");
Message(Chat::Red, "This tome contains invalid knowledge.");
return(false);
}
@ -589,13 +591,13 @@ bool Client::UseDiscipline(uint32 spell_id, uint32 target) {
const SPDat_Spell_Struct &spell = spells[spell_id];
uint8 level_to_use = spell.classes[GetClass() - 1];
if(level_to_use == 255) {
Message(13, "Your class cannot learn from this tome.");
Message(Chat::Red, "Your class cannot learn from this tome.");
//should summon them a new one...
return(false);
}
if(level_to_use > GetLevel()) {
Message_StringID(13, DISC_LEVEL_USE_ERROR);
MessageString(Chat::Red, DISC_LEVEL_USE_ERROR);
//should summon them a new one...
return(false);
}
@ -607,7 +609,7 @@ bool Client::UseDiscipline(uint32 spell_id, uint32 target) {
// sneak attack discs require you to be hidden for 4 seconds before use
if (spell.sneak && (!hidden || (hidden && (Timer::GetCurrentTime() - tmHidden) < 4000))) {
Message_StringID(MT_SpellFailure, SNEAK_RESTRICT);
MessageString(Chat::SpellFailure, SNEAK_RESTRICT);
return false;
}
@ -621,7 +623,7 @@ bool Client::UseDiscipline(uint32 spell_id, uint32 target) {
/*char val1[20]={0};*/ //unused
/*char val2[20]={0};*/ //unused
uint32 remain = p_timers.GetRemainingTime(DiscTimer);
//Message_StringID(0, DISCIPLINE_CANUSEIN, ConvertArray((remain)/60,val1), ConvertArray(remain%60,val2));
//MessageString(Chat::White, DISCIPLINE_CANUSEIN, ConvertArray((remain)/60,val1), ConvertArray(remain%60,val2));
Message(0, "You can use this discipline in %d minutes %d seconds.", ((remain)/60), (remain%60));
return(false);
}

View File

@ -160,7 +160,7 @@ XS(XS__say) {
opts.speak_mode = Journal::SpeakMode::Say;
opts.journal_mode = Journal::Mode::Log2;
opts.language = 0;
opts.message_type = MT_NPCQuestSay;
opts.message_type = Chat::NPCQuestSay;
if (items == 0 || items > 5) {
Perl_croak(aTHX_ "Usage: quest::say(string message, [int language_id], [int message_type], [int speak_mode], [int journal_mode])");
} else if (items == 2) {

View File

@ -1671,9 +1671,9 @@ void EntityList::DuelMessage(Mob *winner, Mob *loser, bool flee)
//might want some sort of distance check in here?
if (cur != winner && cur != loser) {
if (flee)
cur->Message_StringID(15, DUEL_FLED, winner->GetName(),loser->GetName(),loser->GetName());
cur->MessageString(Chat::Yellow, DUEL_FLED, winner->GetName(),loser->GetName(),loser->GetName());
else
cur->Message_StringID(15, DUEL_FINISHED, winner->GetName(),loser->GetName());
cur->MessageString(Chat::Yellow, DUEL_FINISHED, winner->GetName(),loser->GetName());
}
++it;
}
@ -2071,7 +2071,7 @@ void EntityList::QueueClientsGuildBankItemUpdate(const GuildBankItemUpdate_Struc
void EntityList::MessageStatus(uint32 to_guild_id, int to_minstatus, uint32 type, const char *message, ...)
{
va_list argptr;
char buffer[4096];
char buffer[4096];
va_start(argptr, message);
vsnprintf(buffer, 4096, message, argptr);
@ -2080,75 +2080,242 @@ void EntityList::MessageStatus(uint32 to_guild_id, int to_minstatus, uint32 type
auto it = client_list.begin();
while (it != client_list.end()) {
Client *client = it->second;
if ((to_guild_id == 0 || client->IsInGuild(to_guild_id)) && client->Admin() >= to_minstatus)
if ((to_guild_id == 0 || client->IsInGuild(to_guild_id)) && client->Admin() >= to_minstatus) {
client->Message(type, buffer);
}
++it;
}
}
// works much like MessageClose, but with formatted strings
void EntityList::MessageClose_StringID(Mob *sender, bool skipsender, float dist, uint32 type, uint32 string_id, const char* message1,const char* message2,const char* message3,const char* message4,const char* message5,const char* message6,const char* message7,const char* message8,const char* message9)
/**
* @param sender
* @param skipsender
* @param dist
* @param type
* @param string_id
* @param message1
* @param message2
* @param message3
* @param message4
* @param message5
* @param message6
* @param message7
* @param message8
* @param message9
*/
void EntityList::MessageCloseString(
Mob *sender,
bool skipsender,
float dist,
uint32 type,
uint32 string_id,
const char *message1,
const char *message2,
const char *message3,
const char *message4,
const char *message5,
const char *message6,
const char *message7,
const char *message8,
const char *message9
)
{
Client *c;
float dist2 = dist * dist;
float dist2 = dist * dist;
for (auto it = client_list.begin(); it != client_list.end(); ++it) {
c = it->second;
if(c && DistanceSquared(c->GetPosition(), sender->GetPosition()) <= dist2 && (!skipsender || c != sender))
c->Message_StringID(type, string_id, message1, message2, message3, message4, message5, message6, message7, message8, message9);
for (auto & it : client_list) {
c = it.second;
if (c && DistanceSquared(c->GetPosition(), sender->GetPosition()) <= dist2 && (!skipsender || c != sender)) {
c->MessageString(
type,
string_id,
message1,
message2,
message3,
message4,
message5,
message6,
message7,
message8,
message9
);
}
}
}
void EntityList::FilteredMessageClose_StringID(Mob *sender, bool skipsender,
float dist, uint32 type, eqFilterType filter, uint32 string_id,
const char *message1, const char *message2, const char *message3,
const char *message4, const char *message5, const char *message6,
const char *message7, const char *message8, const char *message9)
/**
* @param sender
* @param skipsender
* @param dist
* @param type
* @param filter
* @param string_id
* @param message1
* @param message2
* @param message3
* @param message4
* @param message5
* @param message6
* @param message7
* @param message8
* @param message9
*/
void EntityList::FilteredMessageCloseString(
Mob *sender, bool skipsender,
float dist,
uint32 type,
eqFilterType filter,
uint32 string_id,
const char *message1,
const char *message2,
const char *message3,
const char *message4,
const char *message5,
const char *message6,
const char *message7,
const char *message8,
const char *message9
)
{
Client *c;
float dist2 = dist * dist;
float dist2 = dist * dist;
for (auto it = client_list.begin(); it != client_list.end(); ++it) {
c = it->second;
if (c && DistanceSquared(c->GetPosition(), sender->GetPosition()) <= dist2 && (!skipsender || c != sender))
c->FilteredMessage_StringID(sender, type, filter, string_id,
message1, message2, message3, message4, message5,
message6, message7, message8, message9);
for (auto & it : client_list) {
c = it.second;
if (c && DistanceSquared(c->GetPosition(), sender->GetPosition()) <= dist2 && (!skipsender || c != sender)) {
c->FilteredMessageString(
sender, type, filter, string_id,
message1, message2, message3, message4, message5,
message6, message7, message8, message9
);
}
}
}
void EntityList::Message_StringID(Mob *sender, bool skipsender, uint32 type, uint32 string_id, const char* message1,const char* message2,const char* message3,const char* message4,const char* message5,const char* message6,const char* message7,const char* message8,const char* message9)
/**
*
* @param sender
* @param skipsender
* @param type
* @param string_id
* @param message1
* @param message2
* @param message3
* @param message4
* @param message5
* @param message6
* @param message7
* @param message8
* @param message9
*/
void EntityList::MessageString(
Mob *sender,
bool skipsender,
uint32 type,
uint32 string_id,
const char *message1,
const char *message2,
const char *message3,
const char *message4,
const char *message5,
const char *message6,
const char *message7,
const char *message8,
const char *message9
)
{
Client *c;
for (auto it = client_list.begin(); it != client_list.end(); ++it) {
c = it->second;
if(c && (!skipsender || c != sender))
c->Message_StringID(type, string_id, message1, message2, message3, message4, message5, message6, message7, message8, message9);
for (auto & it : client_list) {
c = it.second;
if (c && (!skipsender || c != sender)) {
c->MessageString(
type,
string_id,
message1,
message2,
message3,
message4,
message5,
message6,
message7,
message8,
message9
);
}
}
}
void EntityList::FilteredMessage_StringID(Mob *sender, bool skipsender,
uint32 type, eqFilterType filter, uint32 string_id,
const char *message1, const char *message2, const char *message3,
const char *message4, const char *message5, const char *message6,
const char *message7, const char *message8, const char *message9)
/**
*
* @param sender
* @param skipsender
* @param type
* @param filter
* @param string_id
* @param message1
* @param message2
* @param message3
* @param message4
* @param message5
* @param message6
* @param message7
* @param message8
* @param message9
*/
void EntityList::FilteredMessageString(
Mob *sender,
bool skipsender,
uint32 type,
eqFilterType filter,
uint32 string_id,
const char *message1,
const char *message2,
const char *message3,
const char *message4,
const char *message5,
const char *message6,
const char *message7,
const char *message8,
const char *message9
)
{
Client *c;
for (auto it = client_list.begin(); it != client_list.end(); ++it) {
c = it->second;
if (c && (!skipsender || c != sender))
c->FilteredMessage_StringID(sender, type, filter, string_id,
message1, message2, message3, message4, message5, message6,
message7, message8, message9);
for (auto & it : client_list) {
c = it.second;
if (c && (!skipsender || c != sender)) {
c->FilteredMessageString(
sender,
type,
filter,
string_id,
message1,
message2,
message3,
message4,
message5,
message6,
message7,
message8,
message9
);
}
}
}
void EntityList::MessageClose(Mob* sender, bool skipsender, float dist, uint32 type, const char* message, ...)
/**
* @param sender
* @param skipsender
* @param dist
* @param type
* @param message
* @param ...
*/
void EntityList::MessageClose(Mob *sender, bool skipsender, float dist, uint32 type, const char *message, ...)
{
va_list argptr;
char buffer[4096];
char buffer[4096];
va_start(argptr, message);
vsnprintf(buffer, 4095, message, argptr);
@ -2158,16 +2325,26 @@ void EntityList::MessageClose(Mob* sender, bool skipsender, float dist, uint32 t
auto it = client_list.begin();
while (it != client_list.end()) {
if (DistanceSquared(it->second->GetPosition(), sender->GetPosition()) <= dist2 && (!skipsender || it->second != sender))
if (DistanceSquared(it->second->GetPosition(), sender->GetPosition()) <= dist2 &&
(!skipsender || it->second != sender)) {
it->second->Message(type, buffer);
}
++it;
}
}
void EntityList::FilteredMessageClose(Mob *sender, bool skipsender, float dist, uint32 type, eqFilterType filter, const char *message, ...)
void EntityList::FilteredMessageClose(
Mob *sender,
bool skipsender,
float dist,
uint32 type,
eqFilterType filter,
const char *message,
...
)
{
va_list argptr;
char buffer[4096];
char buffer[4096];
va_start(argptr, message);
vsnprintf(buffer, 4095, message, argptr);
@ -2177,8 +2354,10 @@ void EntityList::FilteredMessageClose(Mob *sender, bool skipsender, float dist,
auto it = client_list.begin();
while (it != client_list.end()) {
if (DistanceSquared(it->second->GetPosition(), sender->GetPosition()) <= dist2 && (!skipsender || it->second != sender))
it->second->FilteredMessage(sender, type, filter, buffer);
if (DistanceSquared(it->second->GetPosition(), sender->GetPosition()) <= dist2 &&
(!skipsender || it->second != sender)) {
it->second->FilteredMessage(sender, type, filter, buffer);
}
++it;
}
}
@ -2723,15 +2902,15 @@ void EntityList::ListNPCCorpses(Client *client)
uint32 x = 0;
auto it = corpse_list.begin();
client->Message(0, "NPC Corpses in the zone:");
client->Message(Chat::White, "NPC Corpses in the zone:");
while (it != corpse_list.end()) {
if (it->second->IsNPCCorpse()) {
client->Message(0, " %5d: %s", it->first, it->second->GetName());
client->Message(Chat::White, " %5d: %s", it->first, it->second->GetName());
x++;
}
++it;
}
client->Message(0, "%d npc corpses listed.", x);
client->Message(Chat::White, "%d npc corpses listed.", x);
}
void EntityList::ListPlayerCorpses(Client *client)
@ -2739,15 +2918,15 @@ void EntityList::ListPlayerCorpses(Client *client)
uint32 x = 0;
auto it = corpse_list.begin();
client->Message(0, "Player Corpses in the zone:");
client->Message(Chat::White, "Player Corpses in the zone:");
while (it != corpse_list.end()) {
if (it->second->IsPlayerCorpse()) {
client->Message(0, " %5d: %s", it->first, it->second->GetName());
client->Message(Chat::White, " %5d: %s", it->first, it->second->GetName());
x++;
}
++it;
}
client->Message(0, "%d player corpses listed.", x);
client->Message(Chat::White, "%d player corpses listed.", x);
}
// returns the number of corpses deleted. A negative number indicates an error code.
@ -2774,7 +2953,7 @@ void EntityList::CorpseFix(Client* c)
Corpse* corpse = it->second;
if (corpse->IsNPCCorpse()) {
if (DistanceNoZ(c->GetPosition(), corpse->GetPosition()) < 100) {
c->Message(15, "Attempting to fix %s", it->second->GetCleanName());
c->Message(Chat::Yellow, "Attempting to fix %s", it->second->GetCleanName());
corpse->GMMove(corpse->GetX(), corpse->GetY(), c->GetZ() + 2, 0);
}
}
@ -4632,7 +4811,7 @@ void EntityList::ExpeditionWarning(uint32 minutes_left)
auto it = client_list.begin();
while (it != client_list.end()) {
it->second->Message_StringID(15, EXPEDITION_MIN_REMAIN, itoa((int)minutes_left));
it->second->MessageString(Chat::Yellow, EXPEDITION_MIN_REMAIN, itoa((int)minutes_left));
it->second->QueuePacket(outapp);
++it;
}

View File

@ -321,10 +321,39 @@ public:
void MessageStatus(uint32 to_guilddbid, int to_minstatus, uint32 type, const char* message, ...);
void MessageClose(Mob* sender, bool skipsender, float dist, uint32 type, const char* message, ...);
void FilteredMessageClose(Mob* sender, bool skipsender, float dist, uint32 type, eqFilterType filter, const char* message, ...);
void Message_StringID(Mob *sender, bool skipsender, uint32 type, uint32 string_id, const char* message1=0,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0);
void FilteredMessage_StringID(Mob *sender, bool skipsender, uint32 type, eqFilterType filter, uint32 string_id, const char* message1=0,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0);
void MessageClose_StringID(Mob *sender, bool skipsender, float dist, uint32 type, uint32 string_id, const char* message1=0,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0);
void FilteredMessageClose_StringID(Mob *sender, bool skipsender, float dist, uint32 type, eqFilterType filter, uint32 string_id, const char* message1=0,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0);
void MessageString(Mob *sender, bool skipsender, uint32 type, uint32 string_id, const char* message1=0,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0);
void FilteredMessageString(Mob *sender, bool skipsender, uint32 type, eqFilterType filter, uint32 string_id, const char* message1=0,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0);
void MessageCloseString(
Mob *sender,
bool skipsender,
float dist,
uint32 type,
uint32 string_id,
const char *message1 = 0,
const char *message2 = 0,
const char *message3 = 0,
const char *message4 = 0,
const char *message5 = 0,
const char *message6 = 0,
const char *message7 = 0,
const char *message8 = 0,
const char *message9 = 0);
void FilteredMessageCloseString(
Mob *sender,
bool skipsender,
float dist,
uint32 type,
eqFilterType filter,
uint32 string_id,
const char *message1 = 0,
const char *message2 = 0,
const char *message3 = 0,
const char *message4 = 0,
const char *message5 = 0,
const char *message6 = 0,
const char *message7 = 0,
const char *message8 = 0,
const char *message9 = 0);
void ChannelMessageFromWorld(const char* from, const char* to, uint8 chan_num, uint32 guilddbid, uint8 language, uint8 lang_skill, const char* message);
void ChannelMessage(Mob* from, uint8 chan_num, uint8 language, const char* message, ...);
void ChannelMessage(Mob* from, uint8 chan_num, uint8 language, uint8 lang_skill, const char* message, ...);

View File

@ -333,18 +333,18 @@ void Client::CalculateLeadershipExp(uint32 &add_exp, uint8 conlevel)
uint32 mentor_exp = exp * (GetGroup()->GetMentorPercent() / 100.0f);
exp -= mentor_exp;
mentoree->AddLeadershipEXP(mentor_exp, 0); // ends up rounded down
mentoree->Message_StringID(MT_Leadership, GAIN_GROUP_LEADERSHIP_EXP);
mentoree->MessageString(Chat::LeaderShip, GAIN_GROUP_LEADERSHIP_EXP);
}
if (exp > 0)
{
// possible if you mentor 100% to the other client
AddLeadershipEXP(exp, 0); // ends up rounded up if mentored, no idea how live actually does it
Message_StringID(MT_Leadership, GAIN_GROUP_LEADERSHIP_EXP);
MessageString(Chat::LeaderShip, GAIN_GROUP_LEADERSHIP_EXP);
}
}
else
{
Message_StringID(MT_Leadership, MAX_GROUP_LEADERSHIP_POINTS);
MessageString(Chat::LeaderShip, MAX_GROUP_LEADERSHIP_POINTS);
}
}
else
@ -357,11 +357,11 @@ void Client::CalculateLeadershipExp(uint32 &add_exp, uint8 conlevel)
&& RuleI(Character, KillsPerRaidLeadershipAA) > 0)
{
AddLeadershipEXP(0, RAID_EXP_PER_POINT / RuleI(Character, KillsPerRaidLeadershipAA));
Message_StringID(MT_Leadership, GAIN_RAID_LEADERSHIP_EXP);
MessageString(Chat::LeaderShip, GAIN_RAID_LEADERSHIP_EXP);
}
else
{
Message_StringID(MT_Leadership, MAX_RAID_LEADERSHIP_POINTS);
MessageString(Chat::LeaderShip, MAX_RAID_LEADERSHIP_POINTS);
}
}
else
@ -378,17 +378,17 @@ void Client::CalculateLeadershipExp(uint32 &add_exp, uint8 conlevel)
uint32 mentor_exp = exp * (raid->GetMentorPercent(group_id) / 100.0f);
exp -= mentor_exp;
mentoree->AddLeadershipEXP(mentor_exp, 0);
mentoree->Message_StringID(MT_Leadership, GAIN_GROUP_LEADERSHIP_EXP);
mentoree->MessageString(Chat::LeaderShip, GAIN_GROUP_LEADERSHIP_EXP);
}
if (exp > 0)
{
AddLeadershipEXP(exp, 0);
Message_StringID(MT_Leadership, GAIN_GROUP_LEADERSHIP_EXP);
MessageString(Chat::LeaderShip, GAIN_GROUP_LEADERSHIP_EXP);
}
}
else
{
Message_StringID(MT_Leadership, MAX_GROUP_LEADERSHIP_POINTS);
MessageString(Chat::LeaderShip, MAX_GROUP_LEADERSHIP_POINTS);
}
}
}
@ -514,7 +514,7 @@ void Client::AddEXP(uint32 in_add_exp, uint8 conlevel, bool resexp) {
// AA Sanity Checking for players who set aa exp and deleveled below allowed aa level.
if (GetLevel() <= 50 && m_epp.perAA > 0) {
Message(15, "You are below the level allowed to gain AA Experience. AA Experience set to 0%");
Message(Chat::Yellow, "You are below the level allowed to gain AA Experience. AA Experience set to 0%");
aaexp = 0;
m_epp.perAA = 0;
}
@ -528,7 +528,7 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) {
auto max_AAXP = GetRequiredAAExperience();
if (max_AAXP == 0 || GetEXPForLevel(GetLevel()) == 0xFFFFFFFF) {
Message(13, "Error in Client::SetEXP. EXP not set.");
Message(Chat::Red, "Error in Client::SetEXP. EXP not set.");
return; // Must be invalid class/race
}
uint32 i = 0;
@ -564,23 +564,23 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) {
if (isrezzexp) {
if (RuleI(Character, ShowExpValues) > 0)
Message(MT_Experience, "You regain %s experience from resurrection. %s", exp_amount_message.c_str(), exp_percent_message.c_str());
else Message_StringID(MT_Experience, REZ_REGAIN);
Message(Chat::Experience, "You regain %s experience from resurrection. %s", exp_amount_message.c_str(), exp_percent_message.c_str());
else MessageString(Chat::Experience, REZ_REGAIN);
} else {
if (membercount > 1) {
if (RuleI(Character, ShowExpValues) > 0)
Message(MT_Experience, "You have gained %s party experience! %s", exp_amount_message.c_str(), exp_percent_message.c_str());
else Message_StringID(MT_Experience, GAIN_GROUPXP);
Message(Chat::Experience, "You have gained %s party experience! %s", exp_amount_message.c_str(), exp_percent_message.c_str());
else MessageString(Chat::Experience, GAIN_GROUPXP);
}
else if (IsRaidGrouped()) {
if (RuleI(Character, ShowExpValues) > 0)
Message(MT_Experience, "You have gained %s raid experience! %s", exp_amount_message.c_str(), exp_percent_message.c_str());
else Message_StringID(MT_Experience, GAIN_RAIDEXP);
Message(Chat::Experience, "You have gained %s raid experience! %s", exp_amount_message.c_str(), exp_percent_message.c_str());
else MessageString(Chat::Experience, GAIN_RAIDEXP);
}
else {
if (RuleI(Character, ShowExpValues) > 0)
Message(MT_Experience, "You have gained %s experience! %s", exp_amount_message.c_str(), exp_percent_message.c_str());
else Message_StringID(MT_Experience, GAIN_XP);
Message(Chat::Experience, "You have gained %s experience! %s", exp_amount_message.c_str(), exp_percent_message.c_str());
else MessageString(Chat::Experience, GAIN_XP);
}
}
}
@ -588,9 +588,9 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) {
uint32 exp_lost = m_pp.exp - set_exp;
float exp_percent = (float)((float)exp_lost / (float)(GetEXPForLevel(GetLevel() + 1) - GetEXPForLevel(GetLevel())))*(float)100;
if (RuleI(Character, ShowExpValues) == 1 && exp_lost > 0) Message(15, "You have lost %i experience.", exp_lost);
else if (RuleI(Character, ShowExpValues) == 2 && exp_lost > 0) Message(15, "You have lost %i experience. (%.3f%%)", exp_lost, exp_percent);
else Message(15, "You have lost experience.");
if (RuleI(Character, ShowExpValues) == 1 && exp_lost > 0) Message(Chat::Yellow, "You have lost %i experience.", exp_lost);
else if (RuleI(Character, ShowExpValues) == 2 && exp_lost > 0) Message(Chat::Yellow, "You have lost %i experience. (%.3f%%)", exp_lost, exp_percent);
else Message(Chat::Yellow, "You have lost experience.");
}
//check_level represents the level we should be when we have
@ -654,9 +654,9 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) {
//figure out how many points were actually gained
/*uint32 gained = m_pp.aapoints - last_unspentAA;*/ //unused
//Message(15, "You have gained %d skill points!!", m_pp.aapoints - last_unspentAA);
//Message(Chat::Yellow, "You have gained %d skill points!!", m_pp.aapoints - last_unspentAA);
char val1[20]={0};
Message_StringID(MT_Experience, GAIN_ABILITY_POINT, ConvertArray(m_pp.aapoints, val1),m_pp.aapoints == 1 ? "" : "(s)"); //You have gained an ability point! You now have %1 ability point%2.
MessageString(Chat::Experience, GAIN_ABILITY_POINT, ConvertArray(m_pp.aapoints, val1),m_pp.aapoints == 1 ? "" : "(s)"); //You have gained an ability point! You now have %1 ability point%2.
/* QS: PlayerLogAARate */
if (RuleB(QueryServ, PlayerLogAARate)){
@ -665,7 +665,7 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) {
QServ->SendQuery(query.c_str());
}
//Message(15, "You now have %d skill points available to spend.", m_pp.aapoints);
//Message(Chat::Yellow, "You now have %d skill points available to spend.", m_pp.aapoints);
}
uint8 maxlevel = RuleI(Character, MaxExpLevel) + 1;
@ -699,18 +699,18 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) {
if (level_increase)
{
if (level_count == 1)
Message_StringID(MT_Experience, GAIN_LEVEL, ConvertArray(check_level, val1));
MessageString(Chat::Experience, GAIN_LEVEL, ConvertArray(check_level, val1));
else
Message(15, "Welcome to level %i!", check_level);
Message(Chat::Yellow, "Welcome to level %i!", check_level);
if (check_level == RuleI(Character, DeathItemLossLevel))
Message_StringID(15, CORPSE_ITEM_LOST);
MessageString(Chat::Yellow, CORPSE_ITEM_LOST);
if (check_level == RuleI(Character, DeathExpLossLevel))
Message_StringID(15, CORPSE_EXP_LOST);
MessageString(Chat::Yellow, CORPSE_EXP_LOST);
}
else
Message_StringID(MT_Experience, LOSE_LEVEL, ConvertArray(check_level, val1));
MessageString(Chat::Experience, LOSE_LEVEL, ConvertArray(check_level, val1));
#ifdef BOTS
uint8 myoldlevel = GetLevel();
@ -758,7 +758,7 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) {
char val1[20]={0};
char val2[20]={0};
char val3[20]={0};
Message_StringID(MT_Experience, GM_GAINXP, ConvertArray(set_aaxp,val1),ConvertArray(set_exp,val2),ConvertArray(GetEXPForLevel(GetLevel()+1),val3)); //[GM] You have gained %1 AXP and %2 EXP (%3).
MessageString(Chat::Experience, GM_GAINXP, ConvertArray(set_aaxp,val1),ConvertArray(set_exp,val2),ConvertArray(GetEXPForLevel(GetLevel()+1),val3)); //[GM] You have gained %1 AXP and %2 EXP (%3).
}
}
@ -812,7 +812,7 @@ void Client::SetLevel(uint8 set_level, bool command)
m_pp.level = set_level;
if (command){
m_pp.exp = GetEXPForLevel(set_level);
Message(15, "Welcome to level %i!", set_level);
Message(Chat::Yellow, "Welcome to level %i!", set_level);
lu->exp = 0;
}
else {
@ -1077,12 +1077,12 @@ void Client::SetLeadershipEXP(uint32 group_exp, uint32 raid_exp) {
while(group_exp >= GROUP_EXP_PER_POINT) {
group_exp -= GROUP_EXP_PER_POINT;
m_pp.group_leadership_points++;
Message_StringID(MT_Leadership, GAIN_GROUP_LEADERSHIP_POINT);
MessageString(Chat::LeaderShip, GAIN_GROUP_LEADERSHIP_POINT);
}
while(raid_exp >= RAID_EXP_PER_POINT) {
raid_exp -= RAID_EXP_PER_POINT;
m_pp.raid_leadership_points++;
Message_StringID(MT_Leadership, GAIN_RAID_LEADERSHIP_POINT);
MessageString(Chat::LeaderShip, GAIN_RAID_LEADERSHIP_POINT);
}
m_pp.group_leadership_exp = group_exp;

View File

@ -161,14 +161,14 @@ bool Client::CanFish() {
if (!Pole || !Pole->IsClassCommon() || Pole->GetItem()->ItemType != EQEmu::item::ItemTypeFishingPole) {
if (m_inv.HasItemByUse(EQEmu::item::ItemTypeFishingPole, 1, invWhereWorn | invWherePersonal | invWhereBank | invWhereSharedBank | invWhereTrading | invWhereCursor)) //We have a fishing pole somewhere, just not equipped
Message_StringID(MT_Skills, FISHING_EQUIP_POLE); //You need to put your fishing pole in your primary hand.
MessageString(Chat::Skills, FISHING_EQUIP_POLE); //You need to put your fishing pole in your primary hand.
else //We don't have a fishing pole anywhere
Message_StringID(MT_Skills, FISHING_NO_POLE); //You can't fish without a fishing pole, go buy one.
MessageString(Chat::Skills, FISHING_NO_POLE); //You can't fish without a fishing pole, go buy one.
return false;
}
if (!Bait || !Bait->IsClassCommon() || Bait->GetItem()->ItemType != EQEmu::item::ItemTypeFishingBait) {
Message_StringID(MT_Skills, FISHING_NO_BAIT); //You can't fish without fishing bait, go buy some.
MessageString(Chat::Skills, FISHING_NO_BAIT); //You can't fish without fishing bait, go buy some.
return false;
}
@ -190,7 +190,7 @@ bool Client::CanFish() {
float bestz = zone->zonemap->FindBestZ(rodPosition, nullptr);
float len = m_Position.z - bestz;
if(len > LineLength || len < 0.0f) {
Message_StringID(MT_Skills, FISHING_LAND);
MessageString(Chat::Skills, FISHING_LAND);
return false;
}
@ -203,7 +203,7 @@ bool Client::CanFish() {
bool in_water = zone->watermap->InWater(dest) || zone->watermap->InVWater(dest);
if (in_lava) {
Message_StringID(MT_Skills, FISHING_LAVA); //Trying to catch a fire elemental or something?
MessageString(Chat::Skills, FISHING_LAVA); //Trying to catch a fire elemental or something?
return false;
}
@ -212,7 +212,7 @@ bool Client::CanFish() {
}
}
Message_StringID(MT_Skills, FISHING_LAND);
MessageString(Chat::Skills, FISHING_LAND);
return false;
}
return true;
@ -223,7 +223,7 @@ void Client::GoFish()
//TODO: generate a message if we're already fishing
/*if (!fishing_timer.Check()) { //this isn't the right check, may need to add something to the Client class like 'bool is_fishing'
Message_StringID(0, ALREADY_FISHING); //You are already fishing!
MessageString(Chat::White, ALREADY_FISHING); //You are already fishing!
return;
}*/
@ -293,12 +293,12 @@ void Client::GoFish()
entity_list.AddNPC(npc);
Message(MT_Emote,
Message(Chat::Emote,
"You fish up a little more than you bargained for...");
}
}
else {
Message(MT_Emote, "You notice something lurking just below the water's surface...");
Message(Chat::Emote, "You notice something lurking just below the water's surface...");
}
}
}
@ -315,17 +315,17 @@ void Client::GoFish()
const EQEmu::ItemData* food_item = database.GetItem(food_id);
if (food_item->ItemType != EQEmu::item::ItemTypeFood) {
Message_StringID(MT_Skills, FISHING_SUCCESS);
MessageString(Chat::Skills, FISHING_SUCCESS);
}
else {
Message_StringID(MT_Skills, FISHING_SUCCESS_FISH_NAME, food_item->Name);
MessageString(Chat::Skills, FISHING_SUCCESS_FISH_NAME, food_item->Name);
}
EQEmu::ItemInstance* inst = database.CreateItem(food_item, 1);
if(inst != nullptr) {
if(CheckLoreConflict(inst->GetItem()))
{
Message_StringID(0, DUP_LORE);
MessageString(Chat::White, DUP_LORE);
safe_delete(inst);
}
else
@ -351,13 +351,13 @@ void Client::GoFish()
//chance to use bait when you dont catch anything...
if (zone->random.Int(0, 4) == 1) {
DeleteItemInInventory(bslot, 1, true); //do we need client update?
Message_StringID(MT_Skills, FISHING_LOST_BAIT); //You lost your bait!
MessageString(Chat::Skills, FISHING_LOST_BAIT); //You lost your bait!
} else {
if (zone->random.Int(0, 15) == 1) //give about a 1 in 15 chance to spill your beer. we could make this a rule, but it doesn't really seem worth it
//TODO: check for & consume an alcoholic beverage from inventory when this triggers, and set it as a rule that's disabled by default
Message_StringID(MT_Skills, FISHING_SPILL_BEER); //You spill your beer while bringing in your line.
MessageString(Chat::Skills, FISHING_SPILL_BEER); //You spill your beer while bringing in your line.
else
Message_StringID(MT_Skills, FISHING_FAILED); //You didn't catch anything.
MessageString(Chat::Skills, FISHING_FAILED); //You didn't catch anything.
}
parse->EventPlayer(EVENT_FISH_FAILURE, this, "", 0);
@ -367,7 +367,7 @@ void Client::GoFish()
//this is potentially exploitable in that they can fish
//and then swap out items in primary slot... too lazy to fix right now
if (zone->random.Int(0, 49) == 1) {
Message_StringID(MT_Skills, FISHING_POLE_BROKE); //Your fishing pole broke!
MessageString(Chat::Skills, FISHING_POLE_BROKE); //Your fishing pole broke!
DeleteItemInInventory(EQEmu::invslot::slotPrimary, 0, true);
}
@ -434,13 +434,13 @@ void Client::ForageItem(bool guarantee) {
break;
}
Message_StringID(MT_Skills, stringid);
MessageString(Chat::Skills, stringid);
EQEmu::ItemInstance* inst = database.CreateItem(food_item, 1);
if(inst != nullptr) {
// check to make sure it isn't a foraged lore item
if(CheckLoreConflict(inst->GetItem()))
{
Message_StringID(0, DUP_LORE);
MessageString(Chat::White, DUP_LORE);
safe_delete(inst);
}
else {
@ -462,12 +462,12 @@ void Client::ForageItem(bool guarantee) {
int ChanceSecondForage = aabonuses.ForageAdditionalItems + itembonuses.ForageAdditionalItems + spellbonuses.ForageAdditionalItems;
if(!guarantee && zone->random.Roll(ChanceSecondForage)) {
Message_StringID(MT_Skills, FORAGE_MASTERY);
MessageString(Chat::Skills, FORAGE_MASTERY);
ForageItem(true);
}
} else {
Message_StringID(MT_Skills, FORAGE_FAILED);
MessageString(Chat::Skills, FORAGE_FAILED);
parse->EventPlayer(EVENT_FORAGE_FAILURE, this, "", 0);
}

View File

@ -21,14 +21,14 @@ std::vector<int> GlobalLootManager::GetGlobalLootTables(NPC *mob) const
void GlobalLootManager::ShowZoneGlobalLoot(Client *to) const
{
for (auto &e : m_entries)
to->Message(0, " %s : %d table %d", e.GetDescription().c_str(), e.GetID(), e.GetLootTableID());
to->Message(Chat::White, " %s : %d table %d", e.GetDescription().c_str(), e.GetID(), e.GetLootTableID());
}
void GlobalLootManager::ShowNPCGlobalLoot(Client *to, NPC *who) const
{
for (auto &e : m_entries) {
if (e.PassesRules(who))
to->Message(0, " %s : %d table %d", e.GetDescription().c_str(), e.GetID(), e.GetLootTableID());
to->Message(Chat::White, " %s : %d table %d", e.GetDescription().c_str(), e.GetID(), e.GetLootTableID());
}
}

View File

@ -199,7 +199,7 @@ void Group::SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinu
Client *c = members[i]->CastToClient();
//I could not get MoneyOnCorpse to work, so we use this
c->AddMoneyToPP(cpsplit, spsplit, gpsplit, ppsplit, true);
c->Message(2, msg.c_str());
c->Message(Chat::Green, msg.c_str());
}
}
}
@ -1236,7 +1236,7 @@ void Group::VerifyGroup() {
}
}
void Group::GroupMessage_StringID(Mob* sender, uint32 type, uint32 string_id, const char* message,const char* message2,const char* message3,const char* message4,const char* message5,const char* message6,const char* message7,const char* message8,const char* message9, uint32 distance) {
void Group::GroupMessageString(Mob* sender, uint32 type, uint32 string_id, const char* message,const char* message2,const char* message3,const char* message4,const char* message5,const char* message6,const char* message7,const char* message8,const char* message9, uint32 distance) {
uint32 i;
for (i = 0; i < MAX_GROUP_MEMBERS; i++) {
if(members[i] == nullptr)
@ -1248,7 +1248,7 @@ void Group::GroupMessage_StringID(Mob* sender, uint32 type, uint32 string_id, co
if(!members[i]->IsClient())
continue;
members[i]->Message_StringID(type, string_id, message, message2, message3, message4, message5, message6, message7, message8, message9, 0);
members[i]->MessageString(type, string_id, message, message2, message3, message4, message5, message6, message7, message8, message9, 0);
}
}
@ -1680,9 +1680,9 @@ void Group::NotifyMainTank(Client *c, uint8 toggle)
if (c->ClientVersion() < EQEmu::versions::ClientVersion::SoD)
{
if(toggle)
c->Message(0, "%s is now Main Tank.", MainTankName.c_str());
c->Message(Chat::White, "%s is now Main Tank.", MainTankName.c_str());
else
c->Message(0, "%s is no longer Main Tank.", MainTankName.c_str());
c->Message(Chat::White, "%s is no longer Main Tank.", MainTankName.c_str());
}
else
{
@ -1775,9 +1775,9 @@ void Group::NotifyPuller(Client *c, uint8 toggle)
if (c->ClientVersion() < EQEmu::versions::ClientVersion::SoD)
{
if(toggle)
c->Message(0, "%s is now Puller.", PullerName.c_str());
c->Message(Chat::White, "%s is now Puller.", PullerName.c_str());
else
c->Message(0, "%s is no longer Puller.", PullerName.c_str());
c->Message(Chat::White, "%s is no longer Puller.", PullerName.c_str());
}
else
{

View File

@ -74,7 +74,7 @@ public:
void GroupBardPulse(Mob* caster,uint16 spellid);
void SplitExp(uint32 exp, Mob* other);
void GroupMessage(Mob* sender,uint8 language,uint8 lang_skill,const char* message);
void GroupMessage_StringID(Mob* sender, uint32 type, uint32 string_id, const char* message,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0, uint32 distance = 0);
void GroupMessageString(Mob* sender, uint32 type, uint32 string_id, const char* message,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0, uint32 distance = 0);
uint32 GetTotalGroupDamage(Mob* other);
void SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinum, Client *splitter = nullptr);
inline void SetLeader(Mob* newleader){ leader=newleader; };

View File

@ -189,7 +189,7 @@ uint8 *ZoneGuildManager::MakeGuildMembers(uint32 guild_id, const char *prefix_na
}
void ZoneGuildManager::ListGuilds(Client *c) const {
c->Message(0, "Listing guilds on the server:");
c->Message(Chat::White, "Listing guilds on the server:");
char leadername[64];
std::map<uint32, GuildInfo *>::const_iterator cur, end;
cur = m_guilds.begin();
@ -199,12 +199,12 @@ void ZoneGuildManager::ListGuilds(Client *c) const {
leadername[0] = '\0';
database.GetCharName(cur->second->leader_char_id, leadername);
if (leadername[0] == '\0')
c->Message(0, " Guild #%i <%s>", cur->first, cur->second->name.c_str());
c->Message(Chat::White, " Guild #%i <%s>", cur->first, cur->second->name.c_str());
else
c->Message(0, " Guild #%i <%s> Leader: %s", cur->first, cur->second->name.c_str(), leadername);
c->Message(Chat::White, " Guild #%i <%s> Leader: %s", cur->first, cur->second->name.c_str(), leadername);
r++;
}
c->Message(0, "%i guilds listed.", r);
c->Message(Chat::White, "%i guilds listed.", r);
}
@ -212,17 +212,17 @@ void ZoneGuildManager::DescribeGuild(Client *c, uint32 guild_id) const {
std::map<uint32, GuildInfo *>::const_iterator res;
res = m_guilds.find(guild_id);
if(res == m_guilds.end()) {
c->Message(0, "Guild %d not found.", guild_id);
c->Message(Chat::White, "Guild %d not found.", guild_id);
return;
}
const GuildInfo *info = res->second;
c->Message(0, "Guild info DB# %i <%s>", guild_id, info->name.c_str());
c->Message(Chat::White, "Guild info DB# %i <%s>", guild_id, info->name.c_str());
char leadername[64];
database.GetCharName(info->leader_char_id, leadername);
c->Message(0, "Guild Leader: %s", leadername);
c->Message(Chat::White, "Guild Leader: %s", leadername);
char permbuffer[256];
uint8 i;
@ -232,8 +232,8 @@ void ZoneGuildManager::DescribeGuild(Client *c, uint32 guild_id) const {
for(r = 0; r < _MaxGuildAction; r++)
permptr += sprintf(permptr, " %s: %c", GuildActionNames[r], info->ranks[i].permissions[r]?'Y':'N');
c->Message(0, "Rank %i: %s", i, info->ranks[i].name.c_str());
c->Message(0, "Permissions: %s", permbuffer);
c->Message(Chat::White, "Rank %i: %s", i, info->ranks[i].name.c_str());
c->Message(Chat::White, "Permissions: %s", permbuffer);
}
}
@ -537,14 +537,14 @@ void ZoneGuildManager::AddMemberApproval(uint32 refid,Client* name)
if(tmp != 0)
{
if(!tmp->AddMemberApproval(name))
name->Message(0,"Unable to add to list.");
name->Message(Chat::White,"Unable to add to list.");
else
{
name->Message(0,"Added to list.");
name->Message(Chat::White,"Added to list.");
}
}
else
name->Message(0,"Unable to find guild reference id.");
name->Message(Chat::White,"Unable to find guild reference id.");
}
ZoneGuildManager::~ZoneGuildManager()
@ -1391,13 +1391,13 @@ bool GuildApproval::ProcessApproval()
{
if(owner && owner->GuildID() != 0)
{
owner->Message(10,"You are already in a guild! Guild request deleted.");
owner->Message(Chat::NPCQuestSay,"You are already in a guild! Guild request deleted.");
return false;
}
if(deletion_timer->Check() || !owner)
{
if(owner)
owner->Message(0,"You took too long! Your guild request has been deleted.");
owner->Message(Chat::White,"You took too long! Your guild request has been deleted.");
return false;
}
@ -1414,7 +1414,7 @@ GuildApproval::GuildApproval(const char* guildname, Client* owner,uint32 id)
this->owner = owner;
this->refid = id;
if(owner)
owner->Message(0,"You can now start getting your guild approved, tell your %i members to #guildapprove %i, you have 30 minutes to create your guild.",tmp,GetID());
owner->Message(Chat::White,"You can now start getting your guild approved, tell your %i members to #guildapprove %i, you have 30 minutes to create your guild.",tmp,GetID());
for(int i=0;i<tmp;i++)
members[i] = 0;
}
@ -1463,7 +1463,7 @@ void GuildApproval::ApprovedMembers(Client* requestee)
for(int i=0;i<tmp;i++)
{
if(members[i])
requestee->Message(0,"%i: %s",i,members[i]->GetName());
requestee->Message(Chat::White,"%i: %s",i,members[i]->GetName());
}
}
@ -1484,8 +1484,8 @@ void GuildApproval::GuildApproved()
{
if(members[i])
{
owner->Message(0, "%s",members[i]->GetName());
owner->Message(0, "%i",members[i]->CharacterID());
owner->Message(Chat::White, "%s",members[i]->GetName());
owner->Message(Chat::White, "%i",members[i]->CharacterID());
guild_mgr.SetGuild(members[i]->CharacterID(),tmpeq,0);
size_t len = MBUFFER - strlen(gmembers)+1;
strncat(gmembers," ",len);
@ -1521,7 +1521,7 @@ void GuildApproval::GuildApproved()
memcpy(pack->pBuffer, &tmpeq, 4);
worldserver.SendPacket(pack);
safe_delete(pack);
owner->Message(0, "Your guild was created.");
owner->Message(Chat::White, "Your guild was created.");
owner = 0;
}

View File

@ -608,7 +608,7 @@ void HateList::PrintHateListToClient(Client *c)
while (iterator != list.end())
{
struct_HateList *e = (*iterator);
c->Message(0, "- name: %s, damage: %d, hate: %d",
c->Message(Chat::White, "- name: %s, damage: %d, hate: %d",
(e->entity_on_hatelist && e->entity_on_hatelist->GetName()) ? e->entity_on_hatelist->GetName() : "(null)",
e->hatelist_damage, e->stored_hate_amount);

View File

@ -118,7 +118,7 @@ const NPCType *Horse::BuildHorseType(uint16 spell_id) {
void Client::SummonHorse(uint16 spell_id) {
if (GetHorseId() != 0) {
Message(13,"You already have a Horse. Get off, Fatbutt!");
Message(Chat::Red,"You already have a Horse. Get off, Fatbutt!");
return;
}
if(!Horse::IsHorseSpell(spell_id)) {

View File

@ -185,7 +185,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
// make sure the item exists
if(item == nullptr) {
Message(13, "Item %u does not exist.", item_id);
Message(Chat::Red, "Item %u does not exist.", item_id);
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to create an item with an invalid id.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
GetName(), account_name, item_id, aug1, aug2, aug3, aug4, aug5, aug6);
@ -194,13 +194,13 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
// check that there is not a lore conflict between base item and existing inventory
else if(CheckLoreConflict(item)) {
// DuplicateLoreMessage(item_id);
Message(13, "You already have a lore %s (%i) in your inventory.", item->Name, item_id);
Message(Chat::Red, "You already have a lore %s (%i) in your inventory.", item->Name, item_id);
return false;
}
// check to make sure we are augmenting an augmentable item
else if (((!item->IsClassCommon()) || (item->AugType > 0)) && (aug1 | aug2 | aug3 | aug4 | aug5 | aug6)) {
Message(13, "You can not augment an augment or a non-common class item.");
Message(Chat::Red, "You can not augment an augment or a non-common class item.");
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to augment an augment or a non-common class item.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug5: %u)\n",
GetName(), account_name, item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
@ -214,7 +214,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
// check to make sure we are a GM if the item is GM-only
/*
else if(item->MinStatus && ((this->Admin() < item->MinStatus) || (this->Admin() < RuleI(GM, MinStatusToSummonItem)))) {
Message(13, "You are not a GM or do not have the status to summon this item.");
Message(Chat::Red, "You are not a GM or do not have the status to summon this item.");
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to create a GM-only item with a status of %i.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u, MinStatus: %u)\n",
GetName(), account_name, this->Admin(), item->ID, aug1, aug2, aug3, aug4, aug5, aug6, item->MinStatus);
@ -237,7 +237,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
if(augtest == nullptr) {
if(augments[iter]) {
Message(13, "Augment %u (Aug%i) does not exist.", augments[iter], iter + 1);
Message(Chat::Red, "Augment %u (Aug%i) does not exist.", augments[iter], iter + 1);
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to create an augment (Aug%i) with an invalid id.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
GetName(), account_name, (iter + 1), item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
@ -248,13 +248,13 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
// check that there is not a lore conflict between augment and existing inventory
if(CheckLoreConflict(augtest)) {
// DuplicateLoreMessage(augtest->ID);
Message(13, "You already have a lore %s (%u) in your inventory.", augtest->Name, augtest->ID);
Message(Chat::Red, "You already have a lore %s (%u) in your inventory.", augtest->Name, augtest->ID);
return false;
}
// check that augment is an actual augment
else if(augtest->AugType == 0) {
Message(13, "%s (%u) (Aug%i) is not an actual augment.", augtest->Name, augtest->ID, iter + 1);
Message(Chat::Red, "%s (%u) (Aug%i) is not an actual augment.", augtest->Name, augtest->ID, iter + 1);
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to use a non-augment item (Aug%i) as an augment.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
GetName(), account_name, item->ID, (iter + 1), aug1, aug2, aug3, aug4, aug5, aug6);
@ -266,7 +266,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
// check to make sure we are a GM if the augment is GM-only
/*
else if(augtest->MinStatus && ((this->Admin() < augtest->MinStatus) || (this->Admin() < RuleI(GM, MinStatusToSummonItem)))) {
Message(13, "You are not a GM or do not have the status to summon this augment.");
Message(Chat::Red, "You are not a GM or do not have the status to summon this augment.");
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to create a GM-only augment (Aug%i) with a status of %i.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, MinStatus: %u)\n",
GetName(), account_name, (iter + 1), this->Admin(), item->ID, aug1, aug2, aug3, aug4, aug5, aug6, item->MinStatus);
@ -277,7 +277,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
// check for augment type allowance
if(enforcewear) {
if ((item->AugSlotType[iter] == EQEmu::item::AugTypeNone) || !(((uint32)1 << (item->AugSlotType[iter] - 1)) & augtest->AugType)) {
Message(13, "Augment %u (Aug%i) is not acceptable wear on Item %u.", augments[iter], iter + 1, item->ID);
Message(Chat::Red, "Augment %u (Aug%i) is not acceptable wear on Item %u.", augments[iter], iter + 1, item->ID);
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to augment an item with an unacceptable augment type (Aug%i).\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
GetName(), account_name, (iter + 1), item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
@ -285,7 +285,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
}
if(item->AugSlotVisible[iter] == 0) {
Message(13, "Item %u has not evolved enough to accept Augment %u (Aug%i).", item->ID, augments[iter], iter + 1);
Message(Chat::Red, "Item %u has not evolved enough to accept Augment %u (Aug%i).", item->ID, augments[iter], iter + 1);
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to augment an unevolved item with augment type (Aug%i).\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
GetName(), account_name, (iter + 1), item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
@ -462,7 +462,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
}
if(restrictfail) {
Message(13, "Augment %u (Aug%i) is restricted from wear on Item %u.", augments[iter], (iter + 1), item->ID);
Message(Chat::Red, "Augment %u (Aug%i) is restricted from wear on Item %u.", augments[iter], (iter + 1), item->ID);
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to augment an item with a restricted augment (Aug%i).\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
GetName(), account_name, (iter + 1), item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
@ -473,7 +473,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
if(enforceusable) {
// check for class usability
if(item->Classes && !(classes &= augtest->Classes)) {
Message(13, "Augment %u (Aug%i) will result in an item not usable by any class.", augments[iter], (iter + 1));
Message(Chat::Red, "Augment %u (Aug%i) will result in an item not usable by any class.", augments[iter], (iter + 1));
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to create an item unusable by any class.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
GetName(), account_name, item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
@ -482,7 +482,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
// check for race usability
if(item->Races && !(races &= augtest->Races)) {
Message(13, "Augment %u (Aug%i) will result in an item not usable by any race.", augments[iter], (iter + 1));
Message(Chat::Red, "Augment %u (Aug%i) will result in an item not usable by any race.", augments[iter], (iter + 1));
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to create an item unusable by any race.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
GetName(), account_name, item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
@ -491,7 +491,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
// check for slot usability
if(item->Slots && !(slots &= augtest->Slots)) {
Message(13, "Augment %u (Aug%i) will result in an item not usable in any slot.", augments[iter], (iter + 1));
Message(Chat::Red, "Augment %u (Aug%i) will result in an item not usable in any slot.", augments[iter], (iter + 1));
Log(Logs::Detail, Logs::Inventory, "Player %s on account %s attempted to create an item unusable in any slot.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
GetName(), account_name, item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
@ -517,7 +517,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
EQEmu::ItemInstance* inst = database.CreateItem(item, charges);
if(inst == nullptr) {
Message(13, "An unknown server error has occurred and your item was not created.");
Message(Chat::Red, "An unknown server error has occurred and your item was not created.");
// this goes to logfile since this is a major error
Log(Logs::General, Logs::Error, "Player %s on account %s encountered an unknown item creation error.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n",
GetName(), account_name, item->ID, aug1, aug2, aug3, aug4, aug5, aug6);
@ -652,7 +652,7 @@ void Client::DropItem(int16 slot_id, bool recurse)
} else {
// Item doesn't exist in inventory!
Log(Logs::General, Logs::Inventory, "DropItem() - No item found in slot %i", slot_id);
Message(13, "Error: Item not found in slot %i", slot_id);
Message(Chat::Red, "Error: Item not found in slot %i", slot_id);
return;
}
@ -752,14 +752,14 @@ void Client::DropInst(const EQEmu::ItemInstance* inst)
{
if (!inst) {
// Item doesn't exist in inventory!
Message(13, "Error: Item not found");
Message(Chat::Red, "Error: Item not found");
return;
}
if (inst->GetItem()->NoDrop == 0)
{
Message(13, "This item is NODROP. Deleting.");
Message(Chat::Red, "This item is NODROP. Deleting.");
return;
}
@ -853,7 +853,7 @@ void Client::SendCursorBuffer()
if (!lore_pass) {
Log(Logs::General, Logs::Inventory, "(%s) Duplicate lore items are not allowed - destroying item %s(id:%u) on cursor",
GetName(), test_item->Name, test_item->ID);
Message_StringID(MT_LootMessages, 290);
MessageString(Chat::Loot, 290);
parse->EventItem(EVENT_DESTROY_ITEM, this, test_inst, nullptr, "", 0);
DeleteItemInInventory(EQEmu::invslot::slotCursor);
SendCursorBuffer();
@ -1520,7 +1520,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
if(!IsValidSlot(src_slot_check)){
// SoF+ sends a Unix timestamp (should be int32) for src and dst slots every 10 minutes for some reason.
if(src_slot_check < 2147483647)
Message(13, "Warning: Invalid slot move from slot %u to slot %u with %u charges!", src_slot_check, dst_slot_check, stack_count_check);
Message(Chat::Red, "Warning: Invalid slot move from slot %u to slot %u with %u charges!", src_slot_check, dst_slot_check, stack_count_check);
Log(Logs::Detail, Logs::Inventory, "Invalid slot move from slot %u to slot %u with %u charges!", src_slot_check, dst_slot_check, stack_count_check);
return false;
}
@ -1528,7 +1528,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
if(!IsValidSlot(dst_slot_check)) {
// SoF+ sends a Unix timestamp (should be int32) for src and dst slots every 10 minutes for some reason.
if(src_slot_check < 2147483647)
Message(13, "Warning: Invalid slot move from slot %u to slot %u with %u charges!", src_slot_check, dst_slot_check, stack_count_check);
Message(Chat::Red, "Warning: Invalid slot move from slot %u to slot %u with %u charges!", src_slot_check, dst_slot_check, stack_count_check);
Log(Logs::Detail, Logs::Inventory, "Invalid slot move from slot %u to slot %u with %u charges!", src_slot_check, dst_slot_check, stack_count_check);
return false;
}
@ -1555,7 +1555,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
if (!lore_pass) {
Log(Logs::General, Logs::Inventory, "(%s) Duplicate lore items are not allowed - destroying item %s(id:%u) on cursor",
GetName(), test_item->Name, test_item->ID);
Message_StringID(MT_LootMessages, 290);
MessageString(Chat::Loot, 290);
parse->EventItem(EVENT_DESTROY_ITEM, this, test_inst, nullptr, "", 0);
DeleteItemInInventory(EQEmu::invslot::slotCursor, 0, true);
}
@ -1624,7 +1624,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
//SetTint(dst_slot_id,src_inst->GetColor());
if (src_inst->GetCharges() > 0 && (src_inst->GetCharges() < (int16)move_in->number_in_stack || move_in->number_in_stack > src_inst->GetItem()->StackSize))
{
Message(13,"Error: Insufficient number in stack.");
Message(Chat::Red,"Error: Insufficient number in stack.");
return false;
}
}
@ -1650,7 +1650,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
}
if (srcitemid==17899 || srcbagid==17899 || dstitemid==17899 || dstbagid==17899){
this->Trader_EndTrader();
this->Message(13,"You cannot move your Trader Satchels, or items inside them, while Trading.");
this->Message(Chat::Red,"You cannot move your Trader Satchels, or items inside them, while Trading.");
}
}
@ -1829,7 +1829,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
Log(Logs::Detail, Logs::Inventory, "Trade item move from slot %d to slot %d (trade with %s)", src_slot_id, dst_slot_id, with->GetName());
// Fill Trade list with items from cursor
if (!m_inv[EQEmu::invslot::slotCursor]) {
Message(13, "Error: Cursor item not located on server!");
Message(Chat::Red, "Error: Cursor item not located on server!");
return false;
}
@ -1939,7 +1939,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
fail_message = "You are not sufficient level to use this item.";
if (fail_message)
Message(CC_Red, "%s", fail_message);
Message(Chat::Red, "%s", fail_message);
return false;
}
@ -2008,7 +2008,7 @@ void Client::SwapItemResync(MoveItem_Struct* move_slots) {
// resync the 'from' and 'to' slots on an as-needed basis
// Not as effective as the full process, but less intrusive to gameplay
Log(Logs::Detail, Logs::Inventory, "Inventory desyncronization. (charname: %s, source: %i, destination: %i)", GetName(), move_slots->from_slot, move_slots->to_slot);
Message(15, "Inventory Desyncronization detected: Resending slot data...");
Message(Chat::Yellow, "Inventory Desyncronization detected: Resending slot data...");
if (move_slots->from_slot >= EQEmu::invslot::EQUIPMENT_BEGIN && move_slots->from_slot <= EQEmu::invbag::CURSOR_BAG_END) {
int16 resync_slot = (EQEmu::InventoryProfile::CalcSlotId(move_slots->from_slot) == INVALID_INDEX) ? move_slots->from_slot : EQEmu::InventoryProfile::CalcSlotId(move_slots->from_slot);
@ -2031,9 +2031,9 @@ void Client::SwapItemResync(MoveItem_Struct* move_slots) {
safe_delete(outapp);
}
safe_delete(token_inst);
Message(14, "Source slot %i resyncronized.", move_slots->from_slot);
Message(Chat::Lime, "Source slot %i resyncronized.", move_slots->from_slot);
}
else { Message(13, "Could not resyncronize source slot %i.", move_slots->from_slot); }
else { Message(Chat::Red, "Could not resyncronize source slot %i.", move_slots->from_slot); }
}
else {
int16 resync_slot = (EQEmu::InventoryProfile::CalcSlotId(move_slots->from_slot) == INVALID_INDEX) ? move_slots->from_slot : EQEmu::InventoryProfile::CalcSlotId(move_slots->from_slot);
@ -2046,11 +2046,11 @@ void Client::SwapItemResync(MoveItem_Struct* move_slots) {
SendItemPacket(resync_slot, m_inv[resync_slot], ItemPacketTrade);
safe_delete(token_inst);
Message(14, "Source slot %i resyncronized.", move_slots->from_slot);
Message(Chat::Lime, "Source slot %i resyncronized.", move_slots->from_slot);
}
else { Message(13, "Could not resyncronize source slot %i.", move_slots->from_slot); }
else { Message(Chat::Red, "Could not resyncronize source slot %i.", move_slots->from_slot); }
}
else { Message(13, "Could not resyncronize source slot %i.", move_slots->from_slot); }
else { Message(Chat::Red, "Could not resyncronize source slot %i.", move_slots->from_slot); }
}
if (move_slots->to_slot >= EQEmu::invslot::EQUIPMENT_BEGIN && move_slots->to_slot <= EQEmu::invbag::CURSOR_BAG_END) {
@ -2073,9 +2073,9 @@ void Client::SwapItemResync(MoveItem_Struct* move_slots) {
safe_delete(outapp);
}
safe_delete(token_inst);
Message(14, "Destination slot %i resyncronized.", move_slots->to_slot);
Message(Chat::Lime, "Destination slot %i resyncronized.", move_slots->to_slot);
}
else { Message(13, "Could not resyncronize destination slot %i.", move_slots->to_slot); }
else { Message(Chat::Red, "Could not resyncronize destination slot %i.", move_slots->to_slot); }
}
else {
int16 resync_slot = (EQEmu::InventoryProfile::CalcSlotId(move_slots->to_slot) == INVALID_INDEX) ? move_slots->to_slot : EQEmu::InventoryProfile::CalcSlotId(move_slots->to_slot);
@ -2088,11 +2088,11 @@ void Client::SwapItemResync(MoveItem_Struct* move_slots) {
SendItemPacket(resync_slot, m_inv[resync_slot], ItemPacketTrade);
safe_delete(token_inst);
Message(14, "Destination slot %i resyncronized.", move_slots->to_slot);
Message(Chat::Lime, "Destination slot %i resyncronized.", move_slots->to_slot);
}
else { Message(13, "Could not resyncronize destination slot %i.", move_slots->to_slot); }
else { Message(Chat::Red, "Could not resyncronize destination slot %i.", move_slots->to_slot); }
}
else { Message(13, "Could not resyncronize destination slot %i.", move_slots->to_slot); }
else { Message(Chat::Red, "Could not resyncronize destination slot %i.", move_slots->to_slot); }
}
}
@ -2219,7 +2219,7 @@ void Client::DyeArmor(EQEmu::TintProfile* dye){
SendWearChange(i);
}
else{
Message(13,"Could not locate A Vial of Prismatic Dye.");
Message(Chat::Red,"Could not locate A Vial of Prismatic Dye.");
return;
}
}
@ -3397,7 +3397,7 @@ bool Client::InterrogateInventory(Client* requester, bool log, bool silent, bool
Log(Logs::General, Logs::Error, "Client::InterrogateInventory() called for %s by %s with an error state of %s", GetName(), requester->GetName(), (error ? "TRUE" : "FALSE"));
}
if (!silent) {
requester->Message(1, "--- Inventory Interrogation Report for %s (requested by: %s, error state: %s) ---", GetName(), requester->GetName(), (error ? "TRUE" : "FALSE"));
requester->Message(Chat::Default, "--- Inventory Interrogation Report for %s (requested by: %s, error state: %s) ---", GetName(), requester->GetName(), (error ? "TRUE" : "FALSE"));
}
// call InterrogateInventory_ for report
@ -3406,9 +3406,9 @@ bool Client::InterrogateInventory(Client* requester, bool log, bool silent, bool
}
if (error) {
Message(13, "An error has been discovered in your inventory!");
Message(13, "Do not log out, zone or re-arrange items until this");
Message(13, "issue has been resolved or item loss may occur!");
Message(Chat::Red, "An error has been discovered in your inventory!");
Message(Chat::Red, "Do not log out, zone or re-arrange items until this");
Message(Chat::Red, "issue has been resolved or item loss may occur!");
if (allowtrip)
TripInterrogateInvState();
@ -3419,8 +3419,8 @@ bool Client::InterrogateInventory(Client* requester, bool log, bool silent, bool
Log(Logs::Detail, Logs::None, "[CLIENT] Client::InterrogateInventory() -- End");
}
if (!silent) {
requester->Message(1, "Target interrogation flag: %s", (GetInterrogateInvState() ? "TRUE" : "FALSE"));
requester->Message(1, "--- End of Interrogation Report ---");
requester->Message(Chat::Default, "Target interrogation flag: %s", (GetInterrogateInvState() ? "TRUE" : "FALSE"));
requester->Message(Chat::Default, "--- End of Interrogation Report ---");
}
instmap.clear();
@ -3466,7 +3466,7 @@ void Client::InterrogateInventory_(bool errorcheck, Client* requester, int16 hea
head, depth, i.c_str(), p.c_str(), e.c_str());
}
if (!silent) {
requester->Message(6, "%i:%i - inst: %s - parent: %s%s",
requester->Message(Chat::Gray, "%i:%i - inst: %s - parent: %s%s",
head, depth, i.c_str(), p.c_str(), e.c_str());
}

View File

@ -2234,92 +2234,92 @@ luabind::scope lua_register_message_types() {
return luabind::class_<MessageTypes>("MT")
.enum_("constants")
[
luabind::value("NPCQuestSay", MT_NPCQuestSay),
luabind::value("Say", MT_Say),
luabind::value("Tell", MT_Tell),
luabind::value("Group", MT_Group),
luabind::value("Guild", MT_Guild),
luabind::value("OOC", MT_OOC),
luabind::value("Auction", MT_Auction),
luabind::value("Shout", MT_Shout),
luabind::value("Emote", MT_Emote),
luabind::value("Spells", MT_Spells),
luabind::value("YouHitOther", MT_YouHitOther),
luabind::value("OtherHitsYou", MT_OtherHitsYou),
luabind::value("YouMissOther", MT_YouMissOther),
luabind::value("OtherMissesYou", MT_OtherMissesYou),
luabind::value("Broadcasts", MT_Broadcasts),
luabind::value("Skills", MT_Skills),
luabind::value("Disciplines", MT_Disciplines),
luabind::value("Unused1", MT_Unused1),
luabind::value("DefaultText", MT_DefaultText),
luabind::value("Unused2", MT_Unused2),
luabind::value("MerchantOffer", MT_MerchantOffer),
luabind::value("MerchantBuySell", MT_MerchantBuySell),
luabind::value("YourDeath", MT_YourDeath),
luabind::value("OtherDeath", MT_OtherDeath),
luabind::value("OtherHits", MT_OtherHits),
luabind::value("OtherMisses", MT_OtherMisses),
luabind::value("Who", MT_Who),
luabind::value("YellForHelp", MT_YellForHelp),
luabind::value("NonMelee", MT_NonMelee),
luabind::value("WornOff", MT_WornOff),
luabind::value("MoneySplit", MT_MoneySplit),
luabind::value("LootMessages", MT_LootMessages),
luabind::value("DiceRoll", MT_DiceRoll),
luabind::value("OtherSpells", MT_OtherSpells),
luabind::value("SpellFailure", MT_SpellFailure),
luabind::value("Chat", MT_Chat),
luabind::value("Channel1", MT_Channel1),
luabind::value("Channel2", MT_Channel2),
luabind::value("Channel3", MT_Channel3),
luabind::value("Channel4", MT_Channel4),
luabind::value("Channel5", MT_Channel5),
luabind::value("Channel6", MT_Channel6),
luabind::value("Channel7", MT_Channel7),
luabind::value("Channel8", MT_Channel8),
luabind::value("Channel9", MT_Channel9),
luabind::value("Channel10", MT_Channel10),
luabind::value("CritMelee", MT_CritMelee),
luabind::value("SpellCrits", MT_SpellCrits),
luabind::value("TooFarAway", MT_TooFarAway),
luabind::value("NPCRampage", MT_NPCRampage),
luabind::value("NPCFlurry", MT_NPCFlurry),
luabind::value("NPCEnrage", MT_NPCEnrage),
luabind::value("SayEcho", MT_SayEcho),
luabind::value("TellEcho", MT_TellEcho),
luabind::value("GroupEcho", MT_GroupEcho),
luabind::value("GuildEcho", MT_GuildEcho),
luabind::value("OOCEcho", MT_OOCEcho),
luabind::value("AuctionEcho", MT_AuctionEcho),
luabind::value("ShoutECho", MT_ShoutECho),
luabind::value("EmoteEcho", MT_EmoteEcho),
luabind::value("Chat1Echo", MT_Chat1Echo),
luabind::value("Chat2Echo", MT_Chat2Echo),
luabind::value("Chat3Echo", MT_Chat3Echo),
luabind::value("Chat4Echo", MT_Chat4Echo),
luabind::value("Chat5Echo", MT_Chat5Echo),
luabind::value("Chat6Echo", MT_Chat6Echo),
luabind::value("Chat7Echo", MT_Chat7Echo),
luabind::value("Chat8Echo", MT_Chat8Echo),
luabind::value("Chat9Echo", MT_Chat9Echo),
luabind::value("Chat10Echo", MT_Chat10Echo),
luabind::value("DoTDamage", MT_DoTDamage),
luabind::value("ItemLink", MT_ItemLink),
luabind::value("RaidSay", MT_RaidSay),
luabind::value("MyPet", MT_MyPet),
luabind::value("DS", MT_DS),
luabind::value("Leadership", MT_Leadership),
luabind::value("PetFlurry", MT_PetFlurry),
luabind::value("PetCrit", MT_PetCrit),
luabind::value("FocusEffect", MT_FocusEffect),
luabind::value("Experience", MT_Experience),
luabind::value("System", MT_System),
luabind::value("PetSpell", MT_PetSpell),
luabind::value("PetResponse", MT_PetResponse),
luabind::value("ItemSpeech", MT_ItemSpeech),
luabind::value("StrikeThrough", MT_StrikeThrough),
luabind::value("Stun", MT_Stun)
luabind::value("NPCQuestSay", Chat::NPCQuestSay),
luabind::value("Say", Chat::Say),
luabind::value("Tell", Chat::Tell),
luabind::value("Group", Chat::Group),
luabind::value("Guild", Chat::Guild),
luabind::value("OOC", Chat::OOC),
luabind::value("Auction", Chat::Auction),
luabind::value("Shout", Chat::Shout),
luabind::value("Emote", Chat::Emote),
luabind::value("Spells", Chat::Spells),
luabind::value("YouHitOther", Chat::YouHitOther),
luabind::value("OtherHitsYou", Chat::OtherHitYou),
luabind::value("YouMissOther", Chat::YouMissOther),
luabind::value("OtherMissesYou", Chat::OtherMissYou),
luabind::value("Broadcasts", Chat::Broadcasts),
luabind::value("Skills", Chat::Skills),
luabind::value("Disciplines", Chat::Disciplines),
luabind::value("Unused1", Chat::Unused1),
luabind::value("DefaultText", Chat::DefaultText),
luabind::value("Unused2", Chat::Unused2),
luabind::value("MerchantOffer", Chat::MerchantOffer),
luabind::value("MerchantBuySell", Chat::MerchantExchange),
luabind::value("YourDeath", Chat::YourDeath),
luabind::value("OtherDeath", Chat::OtherDeath),
luabind::value("OtherHits", Chat::OtherHitOther),
luabind::value("OtherMisses", Chat::OtherMissOther),
luabind::value("Who", Chat::Who),
luabind::value("YellForHelp", Chat::YellForHelp),
luabind::value("NonMelee", Chat::NonMelee),
luabind::value("WornOff", Chat::SpellWornOff),
luabind::value("MoneySplit", Chat::MoneySplit),
luabind::value("LootMessages", Chat::Loot),
luabind::value("DiceRoll", Chat::DiceRoll),
luabind::value("OtherSpells", Chat::OtherSpells),
luabind::value("SpellFailure", Chat::SpellFailure),
luabind::value("Chat", Chat::ChatChannel),
luabind::value("Channel1", Chat::Chat1),
luabind::value("Channel2", Chat::Chat2),
luabind::value("Channel3", Chat::Chat3),
luabind::value("Channel4", Chat::Chat4),
luabind::value("Channel5", Chat::Chat5),
luabind::value("Channel6", Chat::Chat6),
luabind::value("Channel7", Chat::Chat7),
luabind::value("Channel8", Chat::Chat8),
luabind::value("Channel9", Chat::Chat9),
luabind::value("Channel10", Chat::Chat10),
luabind::value("CritMelee", Chat::MeleeCrit),
luabind::value("SpellCrits", Chat::SpellCrit),
luabind::value("TooFarAway", Chat::TooFarAway),
luabind::value("NPCRampage", Chat::NPCRampage),
luabind::value("NPCFlurry", Chat::NPCFlurry),
luabind::value("NPCEnrage", Chat::NPCEnrage),
luabind::value("SayEcho", Chat::EchoSay),
luabind::value("TellEcho", Chat::EchoTell),
luabind::value("GroupEcho", Chat::EchoGroup),
luabind::value("GuildEcho", Chat::EchoGuild),
luabind::value("OOCEcho", Chat::EchoOOC),
luabind::value("AuctionEcho", Chat::EchoAuction),
luabind::value("ShoutECho", Chat::EchoShout),
luabind::value("EmoteEcho", Chat::EchoEmote),
luabind::value("Chat1Echo", Chat::EchoChat1),
luabind::value("Chat2Echo", Chat::EchoChat2),
luabind::value("Chat3Echo", Chat::EchoChat3),
luabind::value("Chat4Echo", Chat::EchoChat4),
luabind::value("Chat5Echo", Chat::EchoChat5),
luabind::value("Chat6Echo", Chat::EchoChat6),
luabind::value("Chat7Echo", Chat::EchoChat7),
luabind::value("Chat8Echo", Chat::EchoChat8),
luabind::value("Chat9Echo", Chat::EchoChat9),
luabind::value("Chat10Echo", Chat::EchoChat10),
luabind::value("DoTDamage", Chat::DotDamage),
luabind::value("ItemLink", Chat::ItemLink),
luabind::value("RaidSay", Chat::RaidSay),
luabind::value("MyPet", Chat::MyPet),
luabind::value("DS", Chat::DamageShield),
luabind::value("Leadership", Chat::LeaderShip),
luabind::value("PetFlurry", Chat::PetFlurry),
luabind::value("PetCrit", Chat::PetCritical),
luabind::value("FocusEffect", Chat::FocusEffect),
luabind::value("Experience", Chat::Experience),
luabind::value("System", Chat::System),
luabind::value("PetSpell", Chat::PetSpell),
luabind::value("PetResponse", Chat::PetResponse),
luabind::value("ItemSpeech", Chat::ItemSpeech),
luabind::value("StrikeThrough", Chat::StrikeThrough),
luabind::value("Stun", Chat::Stun)
];
}

View File

@ -743,9 +743,9 @@ void Lua_Mob::Message(int type, const char *message) {
self->Message(type, message);
}
void Lua_Mob::Message_StringID(int type, int string_id, uint32 distance) {
void Lua_Mob::MessageString(int type, int string_id, uint32 distance) {
Lua_Safe_Call_Void();
self->Message_StringID(type, string_id, distance);
self->MessageString(type, string_id, distance);
}
void Lua_Mob::Say(const char *message) {
@ -764,7 +764,7 @@ void Lua_Mob::QuestSay(Lua_Client client, const char *message) {
journal_opts.speak_mode = Journal::SpeakMode::Say;
journal_opts.journal_mode = RuleB(NPC, EnableNPCQuestJournal) ? Journal::Mode::Log2 : Journal::Mode::None;
journal_opts.language = 0;
journal_opts.message_type = MT_NPCQuestSay;
journal_opts.message_type = Chat::NPCQuestSay;
journal_opts.target_spawn_id = 0;
self->QuestJournalledSay(client, message, journal_opts);
}
@ -777,7 +777,7 @@ void Lua_Mob::QuestSay(Lua_Client client, const char *message, luabind::adl::obj
journal_opts.speak_mode = Journal::SpeakMode::Say;
journal_opts.journal_mode = Journal::Mode::Log2;
journal_opts.language = 0;
journal_opts.message_type = MT_NPCQuestSay;
journal_opts.message_type = Chat::NPCQuestSay;
journal_opts.target_spawn_id = 0;
if (luabind::type(opts) == LUA_TTABLE) {
@ -2386,7 +2386,8 @@ luabind::scope lua_register_mob() {
.def("SetCurrentWP", &Lua_Mob::SetCurrentWP)
.def("GetSize", &Lua_Mob::GetSize)
.def("Message", &Lua_Mob::Message)
.def("Message_StringID", &Lua_Mob::Message_StringID)
.def("MessageString", &Lua_Mob::MessageString)
.def("Message_StringID", &Lua_Mob::MessageString)
.def("Say", (void(Lua_Mob::*)(const char*))& Lua_Mob::Say)
.def("Say", (void(Lua_Mob::*)(const char*, int))& Lua_Mob::Say)
.def("QuestSay", (void(Lua_Mob::*)(Lua_Client,const char *))&Lua_Mob::QuestSay)

View File

@ -166,7 +166,7 @@ public:
void SetCurrentWP(int wp);
double GetSize();
void Message(int type, const char *message);
void Message_StringID(int type, int string_id, uint32 distance);
void MessageString(int type, int string_id, uint32 distance);
void Say(const char *message);
void Say(const char* message, int language);
void QuestSay(Lua_Client client, const char *message);

View File

@ -1618,7 +1618,7 @@ void Merc::AI_Process() {
{
if(zone->random.Roll(flurrychance))
{
Message_StringID(MT_NPCFlurry, YOU_FLURRY);
MessageString(Chat::NPCFlurry, YOU_FLURRY);
Attack(GetTarget(), EQEmu::invslot::slotPrimary, false);
Attack(GetTarget(), EQEmu::invslot::slotPrimary, false);
}
@ -1637,11 +1637,11 @@ void Merc::AI_Process() {
// TODO: Do mercs berserk? Find this out on live...
//if (GetClass() == WARRIOR || GetClass() == BERSERKER) {
// if(GetHP() > 0 && !berserk && this->GetHPRatio() < 30) {
// entity_list.MessageClose_StringID(this, false, 200, 0, BERSERK_START, GetName());
// entity_list.MessageCloseString(this, false, 200, 0, BERSERK_START, GetName());
// this->berserk = true;
// }
// if (berserk && this->GetHPRatio() > 30) {
// entity_list.MessageClose_StringID(this, false, 200, 0, BERSERK_END, GetName());
// entity_list.MessageCloseString(this, false, 200, 0, BERSERK_END, GetName());
// this->berserk = false;
// }
//}
@ -2623,7 +2623,7 @@ int16 Merc::GetFocusEffect(focusType type, uint16 spell_id) {
realTotal = CalcFocusEffect(type, UsedFocusID, spell_id);
if (realTotal != 0 && UsedItem)
Message_StringID(MT_Spells, BEGINS_TO_GLOW, UsedItem->Name);
MessageString(Chat::Spells, BEGINS_TO_GLOW, UsedItem->Name);
}
//Check if spell focus effect exists for the client.
@ -5321,10 +5321,10 @@ void Client::UpdateMercTimer()
Log(Logs::General, Logs::Mercenaries, "UpdateMercTimer Complete for %s.", GetName());
// Normal upkeep charge message
//Message(7, "You have been charged a mercenary upkeep cost of %i plat, and %i gold and your mercenary upkeep cost timer has been reset to 15 minutes.", upkeep_plat, upkeep_gold, (int)(RuleI(Mercs, UpkeepIntervalMS) / 1000 / 60));
//Message(Chat::LightGray, "You have been charged a mercenary upkeep cost of %i plat, and %i gold and your mercenary upkeep cost timer has been reset to 15 minutes.", upkeep_plat, upkeep_gold, (int)(RuleI(Mercs, UpkeepIntervalMS) / 1000 / 60));
// Message below given when too low level to be charged
//Message(7, "Your mercenary waived an upkeep cost of %i plat, and %i gold or %i %s and your mercenary upkeep cost timer has been reset to %i minutes", upkeep_plat, upkeep_gold, 1, "Bayle Marks", (int)(RuleI(Mercs, UpkeepIntervalMS) / 1000 / 60));
//Message(Chat::LightGray, "Your mercenary waived an upkeep cost of %i plat, and %i gold or %i %s and your mercenary upkeep cost timer has been reset to %i minutes", upkeep_plat, upkeep_gold, 1, "Bayle Marks", (int)(RuleI(Mercs, UpkeepIntervalMS) / 1000 / 60));
}
}
}

View File

@ -1551,39 +1551,39 @@ void Mob::ShowStats(Client* client)
}
else if (IsCorpse()) {
if (IsPlayerCorpse()) {
client->Message(0, " CharID: %i PlayerCorpse: %i", CastToCorpse()->GetCharID(), CastToCorpse()->GetCorpseDBID());
client->Message(Chat::White, " CharID: %i PlayerCorpse: %i", CastToCorpse()->GetCharID(), CastToCorpse()->GetCorpseDBID());
}
else {
client->Message(0, " NPCCorpse", GetID());
client->Message(Chat::White, " NPCCorpse", GetID());
}
}
else {
client->Message(0, " Level: %i AC: %i Class: %i Size: %1.1f Haste: %i", GetLevel(), ACSum(), GetClass(), GetSize(), GetHaste());
client->Message(0, " HP: %i Max HP: %i",GetHP(), GetMaxHP());
client->Message(0, " Mana: %i Max Mana: %i", GetMana(), GetMaxMana());
client->Message(0, " Total ATK: %i Worn/Spell ATK (Cap %i): %i", GetATK(), RuleI(Character, ItemATKCap), GetATKBonus());
client->Message(0, " STR: %i STA: %i DEX: %i AGI: %i INT: %i WIS: %i CHA: %i", GetSTR(), GetSTA(), GetDEX(), GetAGI(), GetINT(), GetWIS(), GetCHA());
client->Message(0, " MR: %i PR: %i FR: %i CR: %i DR: %i Corruption: %i PhR: %i", GetMR(), GetPR(), GetFR(), GetCR(), GetDR(), GetCorrup(), GetPhR());
client->Message(0, " Race: %i BaseRace: %i Texture: %i HelmTexture: %i Gender: %i BaseGender: %i", GetRace(), GetBaseRace(), GetTexture(), GetHelmTexture(), GetGender(), GetBaseGender());
client->Message(Chat::White, " Level: %i AC: %i Class: %i Size: %1.1f Haste: %i", GetLevel(), ACSum(), GetClass(), GetSize(), GetHaste());
client->Message(Chat::White, " HP: %i Max HP: %i",GetHP(), GetMaxHP());
client->Message(Chat::White, " Mana: %i Max Mana: %i", GetMana(), GetMaxMana());
client->Message(Chat::White, " Total ATK: %i Worn/Spell ATK (Cap %i): %i", GetATK(), RuleI(Character, ItemATKCap), GetATKBonus());
client->Message(Chat::White, " STR: %i STA: %i DEX: %i AGI: %i INT: %i WIS: %i CHA: %i", GetSTR(), GetSTA(), GetDEX(), GetAGI(), GetINT(), GetWIS(), GetCHA());
client->Message(Chat::White, " MR: %i PR: %i FR: %i CR: %i DR: %i Corruption: %i PhR: %i", GetMR(), GetPR(), GetFR(), GetCR(), GetDR(), GetCorrup(), GetPhR());
client->Message(Chat::White, " Race: %i BaseRace: %i Texture: %i HelmTexture: %i Gender: %i BaseGender: %i", GetRace(), GetBaseRace(), GetTexture(), GetHelmTexture(), GetGender(), GetBaseGender());
if (client->Admin() >= 100)
client->Message(0, " EntityID: %i PetID: %i OwnerID: %i AIControlled: %i Targetted: %i", GetID(), GetPetID(), GetOwnerID(), IsAIControlled(), targeted);
client->Message(Chat::White, " EntityID: %i PetID: %i OwnerID: %i AIControlled: %i Targetted: %i", GetID(), GetPetID(), GetOwnerID(), IsAIControlled(), targeted);
if (IsNPC()) {
NPC *n = CastToNPC();
uint32 spawngroupid = 0;
if(n->respawn2 != 0)
spawngroupid = n->respawn2->SpawnGroupID();
client->Message(0, " NPCID: %u SpawnGroupID: %u Grid: %i LootTable: %u FactionID: %i SpellsID: %u ", GetNPCTypeID(),spawngroupid, n->GetGrid(), n->GetLoottableID(), n->GetNPCFactionID(), n->GetNPCSpellsID());
client->Message(0, " Accuracy: %i MerchantID: %i EmoteID: %i Runspeed: %.3f Walkspeed: %.3f", n->GetAccuracyRating(), n->MerchantType, n->GetEmoteID(), static_cast<float>(0.025f * n->GetRunspeed()), static_cast<float>(0.025f * n->GetWalkspeed()));
client->Message(Chat::White, " NPCID: %u SpawnGroupID: %u Grid: %i LootTable: %u FactionID: %i SpellsID: %u ", GetNPCTypeID(),spawngroupid, n->GetGrid(), n->GetLoottableID(), n->GetNPCFactionID(), n->GetNPCSpellsID());
client->Message(Chat::White, " Accuracy: %i MerchantID: %i EmoteID: %i Runspeed: %.3f Walkspeed: %.3f", n->GetAccuracyRating(), n->MerchantType, n->GetEmoteID(), static_cast<float>(0.025f * n->GetRunspeed()), static_cast<float>(0.025f * n->GetWalkspeed()));
n->QueryLoot(client);
}
if (IsAIControlled()) {
client->Message(0, " AggroRange: %1.0f AssistRange: %1.0f", GetAggroRange(), GetAssistRange());
client->Message(Chat::White, " AggroRange: %1.0f AssistRange: %1.0f", GetAggroRange(), GetAssistRange());
}
client->Message(0, " compute_tohit: %i TotalToHit: %i", compute_tohit(EQEmu::skills::SkillHandtoHand), GetTotalToHit(EQEmu::skills::SkillHandtoHand, 0));
client->Message(0, " compute_defense: %i TotalDefense: %i", compute_defense(), GetTotalDefense());
client->Message(0, " offense: %i mitigation ac: %i", offense(EQEmu::skills::SkillHandtoHand), GetMitigationAC());
client->Message(Chat::White, " compute_tohit: %i TotalToHit: %i", compute_tohit(EQEmu::skills::SkillHandtoHand), GetTotalToHit(EQEmu::skills::SkillHandtoHand, 0));
client->Message(Chat::White, " compute_defense: %i TotalDefense: %i", compute_defense(), GetTotalDefense());
client->Message(Chat::White, " offense: %i mitigation ac: %i", offense(EQEmu::skills::SkillHandtoHand), GetMitigationAC());
}
}
@ -1620,33 +1620,33 @@ void Mob::DoAnim(const int animnum, int type, bool ackreq, eqFilterType filter)
void Mob::ShowBuffs(Client* client) {
if(SPDAT_RECORDS <= 0)
return;
client->Message(0, "Buffs on: %s", this->GetName());
client->Message(Chat::White, "Buffs on: %s", this->GetName());
uint32 i;
uint32 buff_count = GetMaxTotalSlots();
for (i=0; i < buff_count; i++) {
if (buffs[i].spellid != SPELL_UNKNOWN) {
if (spells[buffs[i].spellid].buffdurationformula == DF_Permanent)
client->Message(0, " %i: %s: Permanent", i, spells[buffs[i].spellid].name);
client->Message(Chat::White, " %i: %s: Permanent", i, spells[buffs[i].spellid].name);
else
client->Message(0, " %i: %s: %i tics left", i, spells[buffs[i].spellid].name, buffs[i].ticsremaining);
client->Message(Chat::White, " %i: %s: %i tics left", i, spells[buffs[i].spellid].name, buffs[i].ticsremaining);
}
}
if (IsClient()){
client->Message(0, "itembonuses:");
client->Message(0, "Atk:%i Ac:%i HP(%i):%i Mana:%i", itembonuses.ATK, itembonuses.AC, itembonuses.HPRegen, itembonuses.HP, itembonuses.Mana);
client->Message(0, "Str:%i Sta:%i Dex:%i Agi:%i Int:%i Wis:%i Cha:%i",
client->Message(Chat::White, "itembonuses:");
client->Message(Chat::White, "Atk:%i Ac:%i HP(%i):%i Mana:%i", itembonuses.ATK, itembonuses.AC, itembonuses.HPRegen, itembonuses.HP, itembonuses.Mana);
client->Message(Chat::White, "Str:%i Sta:%i Dex:%i Agi:%i Int:%i Wis:%i Cha:%i",
itembonuses.STR,itembonuses.STA,itembonuses.DEX,itembonuses.AGI,itembonuses.INT,itembonuses.WIS,itembonuses.CHA);
client->Message(0, "SvMagic:%i SvFire:%i SvCold:%i SvPoison:%i SvDisease:%i",
client->Message(Chat::White, "SvMagic:%i SvFire:%i SvCold:%i SvPoison:%i SvDisease:%i",
itembonuses.MR,itembonuses.FR,itembonuses.CR,itembonuses.PR,itembonuses.DR);
client->Message(0, "DmgShield:%i Haste:%i", itembonuses.DamageShield, itembonuses.haste );
client->Message(0, "spellbonuses:");
client->Message(0, "Atk:%i Ac:%i HP(%i):%i Mana:%i", spellbonuses.ATK, spellbonuses.AC, spellbonuses.HPRegen, spellbonuses.HP, spellbonuses.Mana);
client->Message(0, "Str:%i Sta:%i Dex:%i Agi:%i Int:%i Wis:%i Cha:%i",
client->Message(Chat::White, "DmgShield:%i Haste:%i", itembonuses.DamageShield, itembonuses.haste );
client->Message(Chat::White, "spellbonuses:");
client->Message(Chat::White, "Atk:%i Ac:%i HP(%i):%i Mana:%i", spellbonuses.ATK, spellbonuses.AC, spellbonuses.HPRegen, spellbonuses.HP, spellbonuses.Mana);
client->Message(Chat::White, "Str:%i Sta:%i Dex:%i Agi:%i Int:%i Wis:%i Cha:%i",
spellbonuses.STR,spellbonuses.STA,spellbonuses.DEX,spellbonuses.AGI,spellbonuses.INT,spellbonuses.WIS,spellbonuses.CHA);
client->Message(0, "SvMagic:%i SvFire:%i SvCold:%i SvPoison:%i SvDisease:%i",
client->Message(Chat::White, "SvMagic:%i SvFire:%i SvCold:%i SvPoison:%i SvDisease:%i",
spellbonuses.MR,spellbonuses.FR,spellbonuses.CR,spellbonuses.PR,spellbonuses.DR);
client->Message(0, "DmgShield:%i Haste:%i", spellbonuses.DamageShield, spellbonuses.haste );
client->Message(Chat::White, "DmgShield:%i Haste:%i", spellbonuses.DamageShield, spellbonuses.haste );
}
}
@ -1654,15 +1654,15 @@ void Mob::ShowBuffList(Client* client) {
if(SPDAT_RECORDS <= 0)
return;
client->Message(0, "Buffs on: %s", this->GetCleanName());
client->Message(Chat::White, "Buffs on: %s", this->GetCleanName());
uint32 i;
uint32 buff_count = GetMaxTotalSlots();
for (i = 0; i < buff_count; i++) {
if (buffs[i].spellid != SPELL_UNKNOWN) {
if (spells[buffs[i].spellid].buffdurationformula == DF_Permanent)
client->Message(0, " %i: %s: Permanent", i, spells[buffs[i].spellid].name);
client->Message(Chat::White, " %i: %s: Permanent", i, spells[buffs[i].spellid].name);
else
client->Message(0, " %i: %s: %i tics left", i, spells[buffs[i].spellid].name, buffs[i].ticsremaining);
client->Message(Chat::White, " %i: %s: %i tics left", i, spells[buffs[i].spellid].name, buffs[i].ticsremaining);
}
}
}
@ -2709,7 +2709,7 @@ bool Mob::HateSummon() {
if(target)
{
if(summon_level == 1) {
entity_list.MessageClose(this, true, 500, MT_Say, "%s says,'You will not evade me, %s!' ", GetCleanName(), target->GetCleanName() );
entity_list.MessageClose(this, true, 500, Chat::Say, "%s says 'You will not evade me, %s!' ", GetCleanName(), target->GetCleanName() );
if (target->IsClient())
target->CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), m_Position.x, m_Position.y, m_Position.z, target->GetHeading(), 0, SummonPC);
@ -2718,7 +2718,7 @@ bool Mob::HateSummon() {
return true;
} else if(summon_level == 2) {
entity_list.MessageClose(this, true, 500, MT_Say, "%s says,'You will not evade me, %s!'", GetCleanName(), target->GetCleanName());
entity_list.MessageClose(this, true, 500, Chat::Say, "%s says 'You will not evade me, %s!'", GetCleanName(), target->GetCleanName());
GMMove(target->GetX(), target->GetY(), target->GetZ());
}
}
@ -2835,7 +2835,7 @@ void Mob::Say(const char *format, ...)
talker = this;
}
entity_list.MessageClose_StringID(
entity_list.MessageCloseString(
talker, false, 200, 10,
GENERIC_SAY, GetCleanName(), buf
);
@ -2844,48 +2844,50 @@ void Mob::Say(const char *format, ...)
//
// this is like the above, but the first parameter is a string id
//
void Mob::Say_StringID(uint32 string_id, const char *message3, const char *message4, const char *message5, const char *message6, const char *message7, const char *message8, const char *message9)
void Mob::SayString(uint32 string_id, const char *message3, const char *message4, const char *message5, const char *message6, const char *message7, const char *message8, const char *message9)
{
char string_id_str[10];
snprintf(string_id_str, 10, "%d", string_id);
entity_list.MessageClose_StringID(this, false, 200, 10,
entity_list.MessageCloseString(
this, false, 200, 10,
GENERIC_STRINGID_SAY, GetCleanName(), string_id_str, message3, message4, message5,
message6, message7, message8, message9
);
}
void Mob::Say_StringID(uint32 type, uint32 string_id, const char *message3, const char *message4, const char *message5, const char *message6, const char *message7, const char *message8, const char *message9)
void Mob::SayString(uint32 type, uint32 string_id, const char *message3, const char *message4, const char *message5, const char *message6, const char *message7, const char *message8, const char *message9)
{
char string_id_str[10];
snprintf(string_id_str, 10, "%d", string_id);
entity_list.MessageClose_StringID(this, false, 200, type,
entity_list.MessageCloseString(
this, false, 200, type,
GENERIC_STRINGID_SAY, GetCleanName(), string_id_str, message3, message4, message5,
message6, message7, message8, message9
);
}
void Mob::SayTo_StringID(Client *to, uint32 string_id, const char *message3, const char *message4, const char *message5, const char *message6, const char *message7, const char *message8, const char *message9)
void Mob::SayString(Client *to, uint32 string_id, const char *message3, const char *message4, const char *message5, const char *message6, const char *message7, const char *message8, const char *message9)
{
if (!to)
return;
auto string_id_str = std::to_string(string_id);
to->Message_StringID(10, GENERIC_STRINGID_SAY, GetCleanName(), string_id_str.c_str(), message3, message4, message5, message6, message7, message8, message9);
to->MessageString(Chat::NPCQuestSay, GENERIC_STRINGID_SAY, GetCleanName(), string_id_str.c_str(), message3, message4, message5, message6, message7, message8, message9);
}
void Mob::SayTo_StringID(Client *to, uint32 type, uint32 string_id, const char *message3, const char *message4, const char *message5, const char *message6, const char *message7, const char *message8, const char *message9)
void Mob::SayString(Client *to, uint32 type, uint32 string_id, const char *message3, const char *message4, const char *message5, const char *message6, const char *message7, const char *message8, const char *message9)
{
if (!to)
return;
auto string_id_str = std::to_string(string_id);
to->Message_StringID(type, GENERIC_STRINGID_SAY, GetCleanName(), string_id_str.c_str(), message3, message4, message5, message6, message7, message8, message9);
to->MessageString(type, GENERIC_STRINGID_SAY, GetCleanName(), string_id_str.c_str(), message3, message4, message5, message6, message7, message8, message9);
}
void Mob::Shout(const char *format, ...)
@ -2897,7 +2899,7 @@ void Mob::Shout(const char *format, ...)
vsnprintf(buf, 1000, format, ap);
va_end(ap);
entity_list.Message_StringID(this, false, MT_Shout,
entity_list.MessageString(this, false, Chat::Shout,
GENERIC_SHOUT, GetCleanName(), buf);
}
@ -2910,8 +2912,10 @@ void Mob::Emote(const char *format, ...)
vsnprintf(buf, 1000, format, ap);
va_end(ap);
entity_list.MessageClose_StringID(this, false, 200, 10,
GENERIC_EMOTE, GetCleanName(), buf);
entity_list.MessageCloseString(
this, false, 200, 10,
GENERIC_EMOTE, GetCleanName(), buf
);
}
void Mob::QuestJournalledSay(Client *QuestInitiator, const char *str, Journal::Options &opts)
@ -3569,7 +3573,7 @@ void Mob::TryTwincast(Mob *caster, Mob *target, uint32 spell_id)
{
if(zone->random.Roll(focus))
{
Message(MT_Spells,"You twincast %s!",spells[spell_id].name);
Message(Chat::Spells,"You twincast %s!", spells[spell_id].name);
SpellFinished(spell_id, target, EQEmu::spells::CastingSlot::Item, 0, -1, spells[spell_id].ResistDiff);
}
}
@ -4887,16 +4891,16 @@ void Mob::SlowMitigation(Mob* caster)
if (GetSlowMitigation() && caster && caster->IsClient())
{
if ((GetSlowMitigation() > 0) && (GetSlowMitigation() < 26))
caster->Message_StringID(MT_SpellFailure, SLOW_MOSTLY_SUCCESSFUL);
caster->MessageString(Chat::SpellFailure, SLOW_MOSTLY_SUCCESSFUL);
else if ((GetSlowMitigation() >= 26) && (GetSlowMitigation() < 74))
caster->Message_StringID(MT_SpellFailure, SLOW_PARTIALLY_SUCCESSFUL);
caster->MessageString(Chat::SpellFailure, SLOW_PARTIALLY_SUCCESSFUL);
else if ((GetSlowMitigation() >= 74) && (GetSlowMitigation() < 101))
caster->Message_StringID(MT_SpellFailure, SLOW_SLIGHTLY_SUCCESSFUL);
caster->MessageString(Chat::SpellFailure, SLOW_SLIGHTLY_SUCCESSFUL);
else if (GetSlowMitigation() > 100)
caster->Message_StringID(MT_SpellFailure, SPELL_OPPOSITE_EFFECT);
caster->MessageString(Chat::SpellFailure, SPELL_OPPOSITE_EFFECT);
}
}

View File

@ -722,25 +722,25 @@ public:
inline void SetRareSpawn(bool in) { rare_spawn = in; }
virtual void Message(uint32 type, const char* message, ...) { }
virtual void Message_StringID(uint32 type, uint32 string_id, uint32 distance = 0) { }
virtual void Message_StringID(uint32 type, uint32 string_id, const char* message, const char* message2 = 0,
virtual void MessageString(uint32 type, uint32 string_id, uint32 distance = 0) { }
virtual void MessageString(uint32 type, uint32 string_id, const char* message, const char* message2 = 0,
const char* message3 = 0, const char* message4 = 0, const char* message5 = 0, const char* message6 = 0,
const char* message7 = 0, const char* message8 = 0, const char* message9 = 0, uint32 distance = 0) { }
virtual void FilteredMessage_StringID(Mob *sender, uint32 type, eqFilterType filter, uint32 string_id) { }
virtual void FilteredMessage_StringID(Mob *sender, uint32 type, eqFilterType filter,
virtual void FilteredMessageString(Mob *sender, uint32 type, eqFilterType filter, uint32 string_id) { }
virtual void FilteredMessageString(Mob *sender, uint32 type, eqFilterType filter,
uint32 string_id, const char *message1, const char *message2 = nullptr,
const char *message3 = nullptr, const char *message4 = nullptr,
const char *message5 = nullptr, const char *message6 = nullptr,
const char *message7 = nullptr, const char *message8 = nullptr,
const char *message9 = nullptr) { }
void Say(const char *format, ...);
void Say_StringID(uint32 string_id, const char *message3 = 0, const char *message4 = 0, const char *message5 = 0,
void SayString(uint32 string_id, const char *message3 = 0, const char *message4 = 0, const char *message5 = 0,
const char *message6 = 0, const char *message7 = 0, const char *message8 = 0, const char *message9 = 0);
void Say_StringID(uint32 type, uint32 string_id, const char *message3 = 0, const char *message4 = 0, const char *message5 = 0,
void SayString(uint32 type, uint32 string_id, const char *message3 = 0, const char *message4 = 0, const char *message5 = 0,
const char *message6 = 0, const char *message7 = 0, const char *message8 = 0, const char *message9 = 0);
void SayTo_StringID(Client *to, uint32 string_id, const char *message3 = 0, const char *message4 = 0, const char *message5 = 0,
void SayString(Client *to, uint32 string_id, const char *message3 = 0, const char *message4 = 0, const char *message5 = 0,
const char *message6 = 0, const char *message7 = 0, const char *message8 = 0, const char *message9 = 0);
void SayTo_StringID(Client *to, uint32 type, uint32 string_id, const char *message3 = 0, const char *message4 = 0, const char *message5 = 0,
void SayString(Client *to, uint32 type, uint32 string_id, const char *message3 = 0, const char *message4 = 0, const char *message5 = 0,
const char *message6 = 0, const char *message7 = 0, const char *message8 = 0, const char *message9 = 0);
void Shout(const char *format, ...);
void Emote(const char *format, ...);

View File

@ -578,7 +578,7 @@ void NPC::AI_Stop() {
void Client::AI_Stop() {
Mob::AI_Stop();
this->Message_StringID(13,PLAYER_REGAIN);
this->MessageString(Chat::Red,PLAYER_REGAIN);
auto app = new EQApplicationPacket(OP_Charm, sizeof(Charm_Struct));
Charm_Struct *ps = (Charm_Struct*)app->pBuffer;
@ -1667,9 +1667,9 @@ void NPC::AI_DoMovement() {
pause_timer_complete = true;
AI_walking_timer->Disable();
}
int32 gridno = CastToNPC()->GetGrid();
if (gridno > 0 || cur_wp == EQEmu::WaypointStatus::QuestControlNoGrid) {
if (pause_timer_complete == true) { // time to pause at wp is over
AI_SetupNextWaypoint();
@ -1685,7 +1685,7 @@ void NPC::AI_DoMovement() {
GetY(),
GetZ(),
GetGrid());
SetWaypointPause();
SetAppearance(eaStanding, false);
if (cur_wp_pause > 0) {
@ -2029,14 +2029,14 @@ void Mob::StartEnrage()
// start the timer. need to call IsEnraged frequently since we dont have callback timers :-/
bEnraged = true;
entity_list.MessageClose_StringID(this, true, 200, MT_NPCEnrage, NPC_ENRAGE_START, GetCleanName());
entity_list.MessageCloseString(this, true, 200, Chat::NPCEnrage, NPC_ENRAGE_START, GetCleanName());
}
void Mob::ProcessEnrage(){
if(IsEnraged()){
Timer *timer = GetSpecialAbilityTimer(SPECATK_ENRAGE);
if(timer && timer->Check()){
entity_list.MessageClose_StringID(this, true, 200, MT_NPCEnrage, NPC_ENRAGE_END, GetCleanName());
entity_list.MessageCloseString(this, true, 200, Chat::NPCEnrage, NPC_ENRAGE_END, GetCleanName());
int enraged_cooldown = GetSpecialAbilityParam(SPECATK_ENRAGE, 2);
enraged_cooldown = enraged_cooldown > 0 ? enraged_cooldown : EnragedTimer;
@ -2057,9 +2057,23 @@ bool Mob::Flurry(ExtraAttackOptions *opts)
Mob *target = GetTarget();
if (target) {
if (!IsPet()) {
entity_list.MessageClose_StringID(this, true, 200, MT_NPCFlurry, NPC_FLURRY, GetCleanName(), target->GetCleanName());
entity_list.MessageCloseString(
this,
true,
200,
Chat::NPCFlurry,
NPC_FLURRY,
GetCleanName(),
target->GetCleanName());
} else {
entity_list.MessageClose_StringID(this, true, 200, MT_PetFlurry, NPC_FLURRY, GetCleanName(), target->GetCleanName());
entity_list.MessageCloseString(
this,
true,
200,
Chat::PetFlurry,
NPC_FLURRY,
GetCleanName(),
target->GetCleanName());
}
int num_attacks = GetSpecialAbilityParam(SPECATK_FLURRY, 1);
@ -2096,9 +2110,9 @@ bool Mob::Rampage(ExtraAttackOptions *opts)
{
int index_hit = 0;
if (!IsPet())
entity_list.MessageClose_StringID(this, true, 200, MT_NPCRampage, NPC_RAMPAGE, GetCleanName());
entity_list.MessageCloseString(this, true, 200, Chat::NPCRampage, NPC_RAMPAGE, GetCleanName());
else
entity_list.MessageClose_StringID(this, true, 200, MT_PetFlurry, NPC_RAMPAGE, GetCleanName());
entity_list.MessageCloseString(this, true, 200, Chat::PetFlurry, NPC_RAMPAGE, GetCleanName());
int rampage_targets = GetSpecialAbilityParam(SPECATK_RAMPAGE, 1);
if (rampage_targets == 0) // if set to 0 or not set in the DB
@ -2153,9 +2167,9 @@ void Mob::AreaRampage(ExtraAttackOptions *opts)
{
int index_hit = 0;
if (!IsPet()) { // do not know every pet AA so thought it safer to add this
entity_list.MessageClose_StringID(this, true, 200, MT_NPCRampage, AE_RAMPAGE, GetCleanName());
entity_list.MessageCloseString(this, true, 200, Chat::NPCRampage, AE_RAMPAGE, GetCleanName());
} else {
entity_list.MessageClose_StringID(this, true, 200, MT_PetFlurry, AE_RAMPAGE, GetCleanName());
entity_list.MessageCloseString(this, true, 200, Chat::PetFlurry, AE_RAMPAGE, GetCleanName());
}
int rampage_targets = GetSpecialAbilityParam(SPECATK_AREA_RAMPAGE, 1);
@ -2744,7 +2758,7 @@ void NPC::AISpellsList(Client *c)
return;
for (auto it = AIspells.begin(); it != AIspells.end(); ++it)
c->Message(0, "%s (%d): Type %d, Priority %d, Recast Delay %d, Resist Adjust %d, Min HP %d, Max HP %d",
c->Message(Chat::White, "%s (%d): Type %d, Priority %d, Recast Delay %d, Resist Adjust %d, Min HP %d, Max HP %d",
spells[it->spellid].name, it->spellid, it->type, it->priority, it->recast_delay, it->resist_adjust, it->min_hp, it->max_hp);
return;

View File

@ -624,7 +624,7 @@ inline void NPCCommandsMenu(Client* client, NPC* npc)
if (menu_commands.length() > 0) {
std::string dev_menu = "[" + EQEmu::SayLinkEngine::GenerateQuestSaylink("#devtools", false, "DevTools") + "] ";;
client->Message(0, "| %s [Show Commands] %s", dev_menu.c_str(), menu_commands.c_str());
client->Message(Chat::White, "| %s [Show Commands] %s", dev_menu.c_str(), menu_commands.c_str());
}
}

View File

@ -835,27 +835,27 @@ void MobMovementManager::DumpStats(Client *client)
auto current_time = static_cast<double>(Timer::GetCurrentTime()) / 1000.0;
auto total_time = current_time - _impl->Stats.LastResetTime;
client->Message(MT_System, "Dumping Movement Stats:");
client->Message(Chat::System, "Dumping Movement Stats:");
client->Message(
MT_System,
Chat::System,
"Total Sent: %u (%.2f / sec)",
_impl->Stats.TotalSent,
static_cast<double>(_impl->Stats.TotalSent) / total_time
);
client->Message(
MT_System,
Chat::System,
"Total Heading: %u (%.2f / sec)",
_impl->Stats.TotalSentHeading,
static_cast<double>(_impl->Stats.TotalSentHeading) / total_time
);
client->Message(
MT_System,
Chat::System,
"Total Movement: %u (%.2f / sec)",
_impl->Stats.TotalSentMovement,
static_cast<double>(_impl->Stats.TotalSentMovement) / total_time
);
client->Message(
MT_System,
Chat::System,
"Total Position: %u (%.2f / sec)",
_impl->Stats.TotalSentPosition,
static_cast<double>(_impl->Stats.TotalSentPosition) / total_time

View File

@ -611,7 +611,7 @@ void NPC::ClearItemList() {
void NPC::QueryLoot(Client* to)
{
to->Message(0, "| # Current Loot (%s) LootTableID: %i", GetName(), GetLoottableID());
to->Message(Chat::White, "| # Current Loot (%s) LootTableID: %i", GetName(), GetLoottableID());
int item_count = 0;
for (auto cur = itemlist.begin(); cur != itemlist.end(); ++cur, ++item_count) {
@ -639,7 +639,7 @@ void NPC::QueryLoot(Client* to)
);
}
to->Message(0, "| %i Platinum %i Gold %i Silver %i Copper", platinum, gold, silver, copper);
to->Message(Chat::White, "| %i Platinum %i Gold %i Silver %i Copper", platinum, gold, silver, copper);
}
void NPC::AddCash(uint16 in_copper, uint16 in_silver, uint16 in_gold, uint16 in_platinum) {
@ -1190,17 +1190,17 @@ NPC* NPC::SpawnNPC(const char* spawncommand, const glm::vec4& position, Client*
if (client) {
// Notify client of spawn data
client->Message(0, "New spawn:");
client->Message(0, "Name: %s", npc->name);
client->Message(0, "Race: %u", npc->race);
client->Message(0, "Level: %u", npc->level);
client->Message(0, "Material: %u", npc->texture);
client->Message(0, "Current/Max HP: %i", npc->max_hp);
client->Message(0, "Gender: %u", npc->gender);
client->Message(0, "Class: %u", npc->class_);
client->Message(0, "Weapon Item Number: %u/%u", npc->d_melee_texture1, npc->d_melee_texture2);
client->Message(0, "MerchantID: %u", npc->MerchantType);
client->Message(0, "Bodytype: %u", npc->bodytype);
client->Message(Chat::White, "New spawn:");
client->Message(Chat::White, "Name: %s", npc->name);
client->Message(Chat::White, "Race: %u", npc->race);
client->Message(Chat::White, "Level: %u", npc->level);
client->Message(Chat::White, "Material: %u", npc->texture);
client->Message(Chat::White, "Current/Max HP: %i", npc->max_hp);
client->Message(Chat::White, "Gender: %u", npc->gender);
client->Message(Chat::White, "Class: %u", npc->class_);
client->Message(Chat::White, "Weapon Item Number: %u/%u", npc->d_melee_texture1, npc->d_melee_texture2);
client->Message(Chat::White, "MerchantID: %u", npc->MerchantType);
client->Message(Chat::White, "Bodytype: %u", npc->bodytype);
}
return npc;
@ -1471,7 +1471,7 @@ uint32 ZoneDatabase::AddNPCTypes(const char *zone, uint32 zone_version, Client *
npc_type_id = results.LastInsertedID();
if (client)
client->Message(0, "%s npc_type ID %i created successfully!", numberlessName, npc_type_id);
client->Message(Chat::White, "%s npc_type ID %i created successfully!", numberlessName, npc_type_id);
return 1;
}
@ -1577,7 +1577,7 @@ void NPC::PickPocket(Client* thief)
//make sure were allowed to target them:
int over_level = GetLevel();
if(over_level > (thief->GetLevel() + THIEF_PICKPOCKET_OVER)) {
thief->Message(13, "You are too inexperienced to pick pocket this target");
thief->Message(Chat::Red, "You are too inexperienced to pick pocket this target");
thief->SendPickPocketResponse(this, 0, PickPocketFailed);
//should we check aggro
return;
@ -1587,7 +1587,7 @@ void NPC::PickPocket(Client* thief)
if (zone->CanDoCombat())
AddToHateList(thief, 50);
Say("Stop thief!");
thief->Message(13, "You are noticed trying to steal!");
thief->Message(Chat::Red, "You are noticed trying to steal!");
thief->SendPickPocketResponse(this, 0, PickPocketFailed);
return;
}
@ -1694,7 +1694,7 @@ void NPC::PickPocket(Client* thief)
return;
}
thief->Message(0, "This target's pockets are empty");
thief->Message(Chat::White, "This target's pockets are empty");
thief->SendPickPocketResponse(this, 0, PickPocketFailed);
}
@ -1744,17 +1744,17 @@ void NPC::Disarm(Client* client, int chance) {
SendWearChange(matslot);
if ((CastToMob()->GetBodyType() == BT_Humanoid || CastToMob()->GetBodyType() == BT_Summoned) && eslot == EQEmu::invslot::slotPrimary)
Say("Ahh! My weapon!");
client->Message_StringID(MT_Skills, DISARM_SUCCESS, this->GetCleanName());
client->MessageString(Chat::Skills, DISARM_SUCCESS, this->GetCleanName());
if (chance != 1000)
client->CheckIncreaseSkill(EQEmu::skills::SkillDisarm, nullptr, 4);
return;
}
client->Message_StringID(MT_Skills, DISARM_FAILED);
client->MessageString(Chat::Skills, DISARM_FAILED);
if (chance != 1000)
client->CheckIncreaseSkill(EQEmu::skills::SkillDisarm, nullptr, 2);
return;
}
client->Message_StringID(MT_Skills, DISARM_FAILED);
client->MessageString(Chat::Skills, DISARM_FAILED);
}
void Mob::NPCSpecialAttacks(const char* parse, int permtag, bool reset, bool remove) {
@ -2592,7 +2592,7 @@ void NPC::DoNPCEmote(uint8 event_, uint16 emoteid)
else if(nes->type == 2)
this->Shout("%s",nes->text);
else if(nes->type == 3)
entity_list.MessageClose_StringID(this, true, 200, 10, GENERIC_STRING, nes->text);
entity_list.MessageCloseString(this, true, 200, 10, GENERIC_STRING, nes->text);
else
this->Say("%s",nes->text);
}

View File

@ -572,7 +572,7 @@ bool Object::HandleClick(Client* sender, const ClickObject_Struct* click_object)
if (sender->ClientVersion() >= EQEmu::versions::ClientVersion::RoF) {
coa->drop_id = 0xFFFFFFFF;
sender->Message(0, "Someone else is using that. Try again later.");
sender->Message(Chat::White, "Someone else is using that. Try again later.");
}
}

View File

@ -1198,7 +1198,7 @@ Message(0, "Disc packet id=%d, %x,%x,%x", disc_in->disc_id, disc_in->unknown3[0]
char val1[20]={0};
char val2[20]={0};
uint32 remain = p_timers.GetRemainingTime(pTimerDisciplineReuse);
Message_StringID(0,DISCIPLINE_CANUSEIN,ConvertArray((remain)/60,val1),ConvertArray(remain%60,val2));
MessageString(Chat::White,DISCIPLINE_CANUSEIN,ConvertArray((remain)/60,val1),ConvertArray(remain%60,val2));
//Message(0,"You can use a new discipline in %i minutes %i seconds.", (disc_timer.GetRemainingTime()/1000)/60, disc_timer.GetRemainingTime()/1000%60);
return;
}
@ -1233,7 +1233,7 @@ Message(0, "Disc packet id=%d, %x,%x,%x", disc_in->disc_id, disc_in->unknown3[0]
return;
duration = 11;
reuse = 60*60;
entity_list.MessageClose_StringID(this, false, 100, 0, DISCIPLINE_FEARLESS, GetName());
entity_list.MessageCloseString(this, false, 100, 0, DISCIPLINE_FEARLESS, GetName());
//entity_list.MessageClose(this, false, 100, 0, "%s becomes fearless!", GetName());
break;
}

View File

@ -355,7 +355,7 @@ void PathfinderNavmesh::DebugCommand(Client *c, const Seperator *sep)
{
if (sep->arg[1][0] == '\0' || !strcasecmp(sep->arg[1], "help"))
{
c->Message(0, "#path show: Plots a path from the user to their target.");
c->Message(Chat::White, "#path show: Plots a path from the user to their target.");
return;
}

View File

@ -200,9 +200,9 @@ void PathfinderWaypoint::DebugCommand(Client *c, const Seperator *sep)
{
if(sep->arg[1][0] == '\0' || !strcasecmp(sep->arg[1], "help"))
{
c->Message(0, "Syntax: #path shownodes: Spawns a npc to represent every npc node.");
c->Message(0, "#path show: Plots a path from the user to their target.");
c->Message(0, "#path info node_id: Gives information about node info (requires shownode target).");
c->Message(Chat::White, "Syntax: #path shownodes: Spawns a npc to represent every npc node.");
c->Message(Chat::White, "#path show: Plots a path from the user to their target.");
c->Message(Chat::White, "#path info node_id: Gives information about node info (requires shownode target).");
return;
}
@ -425,11 +425,11 @@ void PathfinderWaypoint::NodeInfo(Client *c)
return;
}
c->Message(0, "Pathing node: %i at (%.2f, %.2f, %.2f) with bestz %.2f",
c->Message(Chat::White, "Pathing node: %i at (%.2f, %.2f, %.2f) with bestz %.2f",
node->id, node->v.x, node->v.y, node->v.z, node->bestz);
for (auto &edge : node->edges) {
c->Message(0, "id: %i, distance: %.2f, door id: %i, is teleport: %i",
c->Message(Chat::White, "id: %i, distance: %.2f, door id: %i, is teleport: %i",
edge.first,
edge.second.distance,
edge.second.door_id,

View File

@ -50,7 +50,7 @@ void Client::SendPathPacket(const std::vector<FindPerson_Point> &points) {
auto points = EQEmu::any_cast<std::vector<FindPerson_Point>>(result);
if (points.size() < 2) {
if (Admin() > 10) {
Message(MT_System, "Too few points");
Message(Chat::System, "Too few points");
}
EQApplicationPacket outapp(OP_FindPersonReply, 0);
@ -60,7 +60,7 @@ void Client::SendPathPacket(const std::vector<FindPerson_Point> &points) {
if (points.size() > 36) {
if (Admin() > 10) {
Message(MT_System, "Too many points %u", points.size());
Message(Chat::System, "Too many points %u", points.size());
}
EQApplicationPacket outapp(OP_FindPersonReply, 0);
@ -69,7 +69,7 @@ void Client::SendPathPacket(const std::vector<FindPerson_Point> &points) {
}
if (Admin() > 10) {
Message(MT_System, "Total points %u", points.size());
Message(Chat::System, "Total points %u", points.size());
}
int len = sizeof(FindPersonResult_Struct) + (points.size() + 1) * sizeof(FindPerson_Point);

View File

@ -3702,7 +3702,7 @@ XS(XS_Mob_Message_StringID) {
distance = (uint32) SvUV(ST(3));
}
THIS->Message_StringID(type, string_id, distance);
THIS->MessageString(type, string_id, distance);
}
XSRETURN_EMPTY;
}

View File

@ -212,7 +212,7 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower,
//lookup our pets table record for this type
PetRecord record;
if(!database.GetPoweredPetEntry(pettype, act_power, &record)) {
Message(13, "Unable to find data for pet %s", pettype);
Message(Chat::Red, "Unable to find data for pet %s", pettype);
Log(Logs::General, Logs::Error, "Unable to find data for pet %s, check pets table.", pettype);
return;
}
@ -220,7 +220,7 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower,
//find the NPC data for the specified NPC type
const NPCType *base = database.LoadNPCTypesData(record.npc_type);
if(base == nullptr) {
Message(13, "Unable to load NPC data for pet %s", pettype);
Message(Chat::Red, "Unable to load NPC data for pet %s", pettype);
Log(Logs::General, Logs::Error, "Unable to load NPC data for pet %s (NPC ID %d), check pets and npc_types tables.", pettype, record.npc_type);
return;
}

View File

@ -807,13 +807,13 @@ void QuestManager::changedeity(int diety_id) {
if(initiator->IsClient())
{
initiator->SetDeity(diety_id);
initiator->Message(15,"Your Deity has been changed/set to: %i", diety_id);
initiator->Message(Chat::Yellow,"Your Deity has been changed/set to: %i", diety_id);
initiator->Save(1);
initiator->Kick("Deity change by QuestManager");
}
else
{
initiator->Message(15,"Error changing Deity");
initiator->Message(Chat::Yellow,"Error changing Deity");
}
}
}
@ -929,11 +929,11 @@ void QuestManager::surname(const char *name) {
if(initiator->IsClient())
{
initiator->ChangeLastName(name);
initiator->Message(15,"Your surname has been changed/set to: %s", name);
initiator->Message(Chat::Yellow,"Your surname has been changed/set to: %s", name);
}
else
{
initiator->Message(15,"Error changing/setting surname");
initiator->Message(Chat::Yellow,"Error changing/setting surname");
}
}
}
@ -986,11 +986,11 @@ uint16 QuestManager::scribespells(uint8 max_level, uint8 min_level) {
break;
}
if (spell_id < 0 || spell_id >= SPDAT_RECORDS) {
initiator->Message(13, "FATAL ERROR: Spell id out-of-range (id: %i, min: 0, max: %i)", spell_id, SPDAT_RECORDS);
initiator->Message(Chat::Red, "FATAL ERROR: Spell id out-of-range (id: %i, min: 0, max: %i)", spell_id, SPDAT_RECORDS);
return count;
}
if (book_slot < 0 || book_slot >= EQEmu::spells::SPELLBOOK_SIZE) {
initiator->Message(13, "FATAL ERROR: Book slot out-of-range (slot: %i, min: 0, max: %i)", book_slot, EQEmu::spells::SPELLBOOK_SIZE);
initiator->Message(Chat::Red, "FATAL ERROR: Book slot out-of-range (slot: %i, min: 0, max: %i)", book_slot, EQEmu::spells::SPELLBOOK_SIZE);
return count;
}
@ -1008,7 +1008,7 @@ uint16 QuestManager::scribespells(uint8 max_level, uint8 min_level) {
uint16 spell_id_ = (uint16)spell_id;
if ((spell_id_ != spell_id) || (spell_id != spell_id_)) {
initiator->Message(13, "FATAL ERROR: Type conversion data loss with spell_id (%i != %u)", spell_id, spell_id_);
initiator->Message(Chat::Red, "FATAL ERROR: Type conversion data loss with spell_id (%i != %u)", spell_id, spell_id_);
return count;
}
@ -1059,7 +1059,7 @@ uint16 QuestManager::traindiscs(uint8 max_level, uint8 min_level) {
for( ; spell_id < SPDAT_RECORDS; ++spell_id) {
if (spell_id < 0 || spell_id >= SPDAT_RECORDS) {
initiator->Message(13, "FATAL ERROR: Spell id out-of-range (id: %i, min: 0, max: %i)", spell_id, SPDAT_RECORDS);
initiator->Message(Chat::Red, "FATAL ERROR: Spell id out-of-range (id: %i, min: 0, max: %i)", spell_id, SPDAT_RECORDS);
return count;
}
@ -1077,7 +1077,7 @@ uint16 QuestManager::traindiscs(uint8 max_level, uint8 min_level) {
uint16 spell_id_ = (uint16)spell_id;
if ((spell_id_ != spell_id) || (spell_id != spell_id_)) {
initiator->Message(13, "FATAL ERROR: Type conversion data loss with spell_id (%i != %u)", spell_id, spell_id_);
initiator->Message(Chat::Red, "FATAL ERROR: Type conversion data loss with spell_id (%i != %u)", spell_id, spell_id_);
return count;
}
@ -1086,7 +1086,7 @@ uint16 QuestManager::traindiscs(uint8 max_level, uint8 min_level) {
for (uint32 r = 0; r < MAX_PP_DISCIPLINES; r++) {
if (initiator->GetPP().disciplines.values[r] == spell_id_) {
initiator->Message(13, "You already know this discipline.");
initiator->Message(Chat::Red, "You already know this discipline.");
break; // continue the 1st loop
}
else if (initiator->GetPP().disciplines.values[r] == 0) {
@ -1097,7 +1097,7 @@ uint16 QuestManager::traindiscs(uint8 max_level, uint8 min_level) {
initiator->GetPP().disciplines.values[r] = spell_id_;
database.SaveCharacterDisc(char_id, r, spell_id_);
change = true;
initiator->Message(0, "You have learned a new discipline!");
initiator->Message(Chat::White, "You have learned a new discipline!");
++count; // success counter
}
break; // continue the 1st loop
@ -1109,7 +1109,7 @@ uint16 QuestManager::traindiscs(uint8 max_level, uint8 min_level) {
initiator->GetPP().disciplines.values[r] = spell_id_;
database.SaveCharacterDisc(char_id, r, spell_id_);
change = true;
initiator->Message(0, "You have learned a new discipline!");
initiator->Message(Chat::White, "You have learned a new discipline!");
++count;
}
break;
@ -1118,7 +1118,7 @@ uint16 QuestManager::traindiscs(uint8 max_level, uint8 min_level) {
initiator->GetPP().disciplines.values[r] = spell_id_;
database.SaveCharacterDisc(char_id, r, spell_id_);
change = true;;
initiator->Message(0, "You have learned a new discipline!");
initiator->Message(Chat::White, "You have learned a new discipline!");
++count; // success counter
break; // continue the 1st loop
}
@ -1190,7 +1190,7 @@ void QuestManager::givecash(int copper, int silver, int gold, int platinum) {
}
tmp += " pieces.";
if (initiator)
initiator->Message(MT_OOC, tmp.c_str());
initiator->Message(Chat::OOC, tmp.c_str());
}
}
@ -1411,7 +1411,7 @@ void QuestManager::itemlink(int item_id) {
linker.SetLinkType(EQEmu::saylink::SayLinkItemData);
linker.SetItemData(item);
initiator->Message(0, "%s tells you, %s", owner->GetCleanName(), linker.GenerateLink().c_str());
initiator->Message(Chat::White, "%s tells you, %s", owner->GetCleanName(), linker.GenerateLink().c_str());
}
}
@ -2164,18 +2164,18 @@ bool QuestManager::createBot(const char *name, const char *lastname, uint8 level
{
if(Bot::SpawnedBotCount(initiator->CharacterID()) >= MaxBotCreate)
{
initiator->Message(15,"You have the maximum number of bots allowed.");
initiator->Message(Chat::Yellow,"You have the maximum number of bots allowed.");
return false;
}
std::string test_name = name;
bool available_flag = false;
if(!database.botdb.QueryNameAvailablity(test_name, available_flag)) {
initiator->Message(0, "%s for '%s'", BotDatabase::fail::QueryNameAvailablity(), (char*)name);
initiator->Message(Chat::White, "%s for '%s'", BotDatabase::fail::QueryNameAvailablity(), (char*)name);
return false;
}
if (!available_flag) {
initiator->Message(0, "The name %s is already being used or is invalid. Please choose a different name.", (char*)name);
initiator->Message(Chat::White, "The name %s is already being used or is invalid. Please choose a different name.", (char*)name);
return false;
}
@ -2184,23 +2184,23 @@ bool QuestManager::createBot(const char *name, const char *lastname, uint8 level
if(NewBot)
{
if(!NewBot->IsValidRaceClassCombo()) {
initiator->Message(0, "That Race/Class combination cannot be created.");
initiator->Message(Chat::White, "That Race/Class combination cannot be created.");
return false;
}
if(!NewBot->IsValidName()) {
initiator->Message(0, "%s has invalid characters. You can use only the A-Z, a-z and _ characters in a bot name.", NewBot->GetCleanName());
initiator->Message(Chat::White, "%s has invalid characters. You can use only the A-Z, a-z and _ characters in a bot name.", NewBot->GetCleanName());
return false;
}
// Now that all validation is complete, we can save our newly created bot
if(!NewBot->Save())
{
initiator->Message(0, "Unable to save %s as a bot.", NewBot->GetCleanName());
initiator->Message(Chat::White, "Unable to save %s as a bot.", NewBot->GetCleanName());
}
else
{
initiator->Message(0, "%s saved as bot %u.", NewBot->GetCleanName(), NewBot->GetBotID());
initiator->Message(Chat::White, "%s saved as bot %u.", NewBot->GetCleanName(), NewBot->GetBotID());
return true;
}
}
@ -2657,13 +2657,13 @@ uint16 QuestManager::CreateInstance(const char *zone, int16 version, uint32 dura
uint16 id = 0;
if(!database.GetUnusedInstanceID(id))
{
initiator->Message(13, "Server was unable to find a free instance id.");
initiator->Message(Chat::Red, "Server was unable to find a free instance id.");
return 0;
}
if(!database.CreateInstance(id, zone_id, version, duration))
{
initiator->Message(13, "Server was unable to create a new instance.");
initiator->Message(Chat::Red, "Server was unable to create a new instance.");
return 0;
}
return id;
@ -2776,9 +2776,9 @@ void QuestManager::RemoveFromInstance(uint16 instance_id)
if (initiator)
{
if (database.RemoveClientFromInstance(instance_id, initiator->CharacterID()))
initiator->Message(MT_Say, "Removed client from instance.");
initiator->Message(Chat::Say, "Removed client from instance.");
else
initiator->Message(MT_Say, "Failed to remove client from instance.");
initiator->Message(Chat::Say, "Failed to remove client from instance.");
}
}
@ -2794,11 +2794,11 @@ void QuestManager::RemoveAllFromInstance(uint16 instance_id)
std::list<uint32> charid_list;
if (database.RemoveClientsFromInstance(instance_id))
initiator->Message(MT_Say, "Removed all players from instance.");
initiator->Message(Chat::Say, "Removed all players from instance.");
else
{
database.GetCharactersInInstance(instance_id, charid_list);
initiator->Message(MT_Say, "Failed to remove %i player(s) from instance.", charid_list.size()); // once the expedition system is in, this message it not relevant
initiator->Message(Chat::Say, "Failed to remove %i player(s) from instance.", charid_list.size()); // once the expedition system is in, this message it not relevant
}
}
}

View File

@ -813,7 +813,7 @@ void Raid::SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinum
//I could not get MoneyOnCorpse to work, so we use this
members[i].member->AddMoneyToPP(cpsplit, spsplit, gpsplit, ppsplit, true);
members[i].member->Message(2, msg.c_str());
members[i].member->Message(Chat::Green, msg.c_str());
}
}
}
@ -1712,12 +1712,12 @@ const char *Raid::GetClientNameByIndex(uint8 index)
return members[index].membername;
}
void Raid::RaidMessage_StringID(Mob* sender, uint32 type, uint32 string_id, const char* message,const char* message2,const char* message3,const char* message4,const char* message5,const char* message6,const char* message7,const char* message8,const char* message9, uint32 distance) {
void Raid::RaidMessageString(Mob* sender, uint32 type, uint32 string_id, const char* message,const char* message2,const char* message3,const char* message4,const char* message5,const char* message6,const char* message7,const char* message8,const char* message9, uint32 distance) {
uint32 i;
for (i = 0; i < MAX_RAID_MEMBERS; i++) {
if(members[i].member) {
if(members[i].member != sender)
members[i].member->Message_StringID(type, string_id, message, message2, message3, message4, message5, message6, message7, message8, message9, distance);
members[i].member->MessageString(type, string_id, message, message2, message3, message4, message5, message6, message7, message8, message9, distance);
}
}
}

View File

@ -152,7 +152,7 @@ public:
//Actual Implementation Stuff
void RaidMessage_StringID(Mob* sender, uint32 type, uint32 string_id, const char* message,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0, uint32 distance = 0);
void RaidMessageString(Mob* sender, uint32 type, uint32 string_id, const char* message,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0, uint32 distance = 0);
void CastGroupSpell(Mob* caster,uint16 spellid, uint32 gid);
void SplitExp(uint32 exp, Mob* other);
uint32 GetTotalRaidDamage(Mob* other);

View File

@ -177,7 +177,7 @@ void Mob::DoSpecialAttackDamage(Mob *who, EQEmu::skills::SkillType skill, int32
auto fbash = GetFuriousBash(itm->Focus.Effect);
hate = hate * (100 + fbash) / 100;
if (fbash)
Message_StringID(MT_Spells, GLOWS_RED, itm->Name);
MessageString(Chat::Spells, GLOWS_RED, itm->Name);
}
}
}
@ -283,7 +283,7 @@ void Client::OPCombatAbility(const CombatAbility_Struct *ca_atk)
return;
if (!p_timers.Expired(&database, timer, false)) {
Message(13, "Ability recovery time not yet met.");
Message(Chat::Red, "Ability recovery time not yet met.");
return;
}
@ -530,7 +530,7 @@ void Mob::TryBackstab(Mob *other, int ReuseTime) {
if(IsClient()) {
const EQEmu::ItemInstance *wpn = CastToClient()->GetInv().GetItem(EQEmu::invslot::slotPrimary);
if (!wpn || (wpn->GetItem()->ItemType != EQEmu::item::ItemType1HPiercing)){
Message_StringID(13, BACKSTAB_WEAPON);
MessageString(Chat::Red, BACKSTAB_WEAPON);
return;
}
}
@ -551,7 +551,7 @@ void Mob::TryBackstab(Mob *other, int ReuseTime) {
if (bIsBehind || bCanFrontalBS || (IsNPC() && CanFacestab())) { // Player is behind other OR can do Frontal Backstab
if (bCanFrontalBS && IsClient()) // I don't think there is any message ...
CastToClient()->Message(0,"Your fierce attack is executed with such grace, your target did not see it coming!");
CastToClient()->Message(Chat::White,"Your fierce attack is executed with such grace, your target did not see it coming!");
RogueBackstab(other,false,ReuseTime);
if (level > 54) {
@ -720,11 +720,11 @@ void Client::RangedAttack(Mob* other, bool CanDoubleAttack) {
float dist = DistanceSquared(m_Position, other->GetPosition());
if(dist > range) {
Log(Logs::Detail, Logs::Combat, "Ranged attack out of range... client should catch this. (%f > %f).\n", dist, range);
Message_StringID(13,TARGET_OUT_OF_RANGE);//Client enforces range and sends the message, this is a backup just incase.
MessageString(Chat::Red,TARGET_OUT_OF_RANGE);//Client enforces range and sends the message, this is a backup just incase.
return;
}
else if(dist < (RuleI(Combat, MinRangedAttackDist)*RuleI(Combat, MinRangedAttackDist))){
Message_StringID(15,RANGED_TOO_CLOSE);//Client enforces range and sends the message, this is a backup just incase.
MessageString(Chat::Yellow,RANGED_TOO_CLOSE);//Client enforces range and sends the message, this is a backup just incase.
return;
}
@ -1273,11 +1273,11 @@ void Client::ThrowingAttack(Mob* other, bool CanDoubleAttack) { //old was 51
float dist = DistanceSquared(m_Position, other->GetPosition());
if(dist > range) {
Log(Logs::Detail, Logs::Combat, "Throwing attack out of range... client should catch this. (%f > %f).\n", dist, range);
Message_StringID(13,TARGET_OUT_OF_RANGE);//Client enforces range and sends the message, this is a backup just incase.
MessageString(Chat::Red,TARGET_OUT_OF_RANGE);//Client enforces range and sends the message, this is a backup just incase.
return;
}
else if(dist < (RuleI(Combat, MinRangedAttackDist)*RuleI(Combat, MinRangedAttackDist))){
Message_StringID(15,RANGED_TOO_CLOSE);//Client enforces range and sends the message, this is a backup just incase.
MessageString(Chat::Yellow,RANGED_TOO_CLOSE);//Client enforces range and sends the message, this is a backup just incase.
return;
}
@ -1566,7 +1566,7 @@ void NPC::DoClassAttacks(Mob *target) {
//general stuff, for all classes....
//only gets used when their primary ability get used too
if (taunting && HasOwner() && target->IsNPC() && target->GetBodyType() != BT_Undead && taunt_time) {
this->GetOwner()->Message_StringID(MT_PetResponse, PET_TAUNTING);
this->GetOwner()->MessageString(Chat::PetResponse, PET_TAUNTING);
Taunt(target->CastToNPC(), false);
}
@ -1898,7 +1898,7 @@ void Mob::Taunt(NPC *who, bool always_succeed, int chance_bonus, bool FromSpell,
// Support for how taunt worked pre 2000 on LIVE - Can not taunt NPC over your level.
if ((RuleB(Combat, TauntOverLevel) == false) && (level_difference < 0) ||
who->GetSpecialAbility(IMMUNE_TAUNT)) {
Message_StringID(MT_SpellFailure, FAILED_TAUNT);
MessageString(Chat::SpellFailure, FAILED_TAUNT);
return;
}
@ -1953,12 +1953,12 @@ void Mob::Taunt(NPC *who, bool always_succeed, int chance_bonus, bool FromSpell,
}
if (who->CanTalk())
who->Say_StringID(SUCCESSFUL_TAUNT, GetCleanName());
who->SayString(SUCCESSFUL_TAUNT, GetCleanName());
} else {
Message_StringID(MT_SpellFailure, FAILED_TAUNT);
MessageString(Chat::SpellFailure, FAILED_TAUNT);
}
} else {
Message_StringID(MT_SpellFailure, FAILED_TAUNT);
MessageString(Chat::SpellFailure, FAILED_TAUNT);
}
if (HasSkillProcs())
@ -2003,10 +2003,10 @@ void Mob::InstillDoubt(Mob *who) {
SpellOnTarget(229, who, false, true, -2000);
//is there a success message?
} else {
Message_StringID(4,NOT_SCARING);
MessageString(Chat::LightBlue,NOT_SCARING);
//Idea from WR:
/* if (target->IsNPC() && zone->random.Int(0,99) < 10 ) {
entity_list.MessageClose(target, false, 50, MT_NPCRampage, "%s lashes out in anger!",target->GetName());
entity_list.MessageClose(target, false, 50, Chat::NPCRampage, "%s lashes out in anger!",target->GetName());
//should we actually do this? and the range is completely made up, unconfirmed
entity_list.AEAttack(target, 50);
}*/
@ -2033,8 +2033,9 @@ int Mob::TryHeadShot(Mob *defender, EQEmu::skills::SkillType skillInUse)
chance = chance * norm / 100;
chance += aabonuses.HeadShot[0] + spellbonuses.HeadShot[0] + itembonuses.HeadShot[0];
if (zone->random.Int(1, 1000) <= chance) {
entity_list.MessageClose_StringID(this, false, 200, MT_CritMelee, FATAL_BOW_SHOT,
GetName());
entity_list.MessageCloseString(
this, false, 200, Chat::MeleeCrit, FATAL_BOW_SHOT,
GetName());
return HeadShot_Dmg;
}
}
@ -2078,8 +2079,9 @@ int Mob::TryAssassinate(Mob *defender, EQEmu::skills::SkillType skillInUse)
if (Assassinate_Dmg && Assassinate_Level && (defender->GetLevel() <= Assassinate_Level)) {
if (zone->random.Int(1, 1000) <= chance) {
entity_list.MessageClose_StringID(this, false, 200, MT_CritMelee, ASSASSINATES,
GetName());
entity_list.MessageCloseString(
this, false, 200, Chat::MeleeCrit, ASSASSINATES,
GetName());
return Assassinate_Dmg;
}
}

View File

@ -387,7 +387,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
TryTriggerOnValueAmount(false, true);
#ifdef SPELL_EFFECT_SPAM
if (caster)
caster->Message(0, "You have gained %+i mana!", effect_value);
caster->Message(Chat::White, "You have gained %+i mana!", effect_value);
#endif
}
}
@ -471,7 +471,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
if(zone->random.Roll(RuleI(Spells, SuccorFailChance))) { //2% Fail chance by default
if(IsClient()) {
CastToClient()->Message_StringID(MT_SpellFailure,SUCCOR_FAIL);
CastToClient()->MessageString(Chat::SpellFailure,SUCCOR_FAIL);
}
break;
}
@ -638,11 +638,11 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
CastToClient()->SummonItem(13073, fcharges);
}
else{
Message(13, "You can only transmute flesh to bone.");
Message(Chat::Red, "You can only transmute flesh to bone.");
}
}
else{
Message(13, "You can only transmute flesh to bone.");
Message(Chat::Red, "You can only transmute flesh to bone.");
}
}
break;
@ -703,7 +703,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
(caster->IsNPC() && !RuleB(Spells, NPCIgnoreBaseImmunity))))))
{
if (caster)
caster->Message_StringID(MT_SpellFailure, IMMUNE_STUN);
caster->MessageString(Chat::SpellFailure, IMMUNE_STUN);
} else {
int stun_resist = itembonuses.StunResist+spellbonuses.StunResist;
if (IsClient())
@ -718,7 +718,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
Stun(effect_value);
} else {
if (IsClient())
Message_StringID(MT_Stun, SHAKE_OFF_STUN);
MessageString(Chat::Stun, SHAKE_OFF_STUN);
Log(Logs::Detail, Logs::Combat, "Stun Resisted. We had %d percent resist chance.", stun_resist);
}
@ -745,19 +745,19 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
WipeHateList();
if (IsClient() && caster->IsClient()) {
caster->Message(0, "Unable to cast charm on a fellow player.");
caster->Message(Chat::White, "Unable to cast charm on a fellow player.");
BuffFadeByEffect(SE_Charm);
break;
} else if(IsCorpse()) {
caster->Message(0, "Unable to cast charm on a corpse.");
caster->Message(Chat::White, "Unable to cast charm on a corpse.");
BuffFadeByEffect(SE_Charm);
break;
} else if(caster->GetPet() != nullptr && caster->IsClient()) {
caster->Message(0, "You cannot charm something when you already have a pet.");
caster->Message(Chat::White, "You cannot charm something when you already have a pet.");
BuffFadeByEffect(SE_Charm);
break;
} else if(GetOwner()) {
caster->Message(0, "You cannot charm someone else's pet!");
caster->Message(Chat::White, "You cannot charm someone else's pet!");
BuffFadeByEffect(SE_Charm);
break;
}
@ -847,14 +847,14 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
if(ClosestMob)
{
Message_StringID(MT_Spells, MessageID);
MessageString(Chat::Spells, MessageID);
SetHeading(CalculateHeadingToTarget(ClosestMob->GetX(), ClosestMob->GetY()));
SetTarget(ClosestMob);
CastToClient()->SendTargetCommand(ClosestMob->GetID());
SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0, true);
}
else
Message_StringID(clientMessageError, SENSE_NOTHING);
MessageString(Chat::Red, SENSE_NOTHING);
}
}
break;
@ -939,14 +939,14 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
{
if(!zone->CanBind())
{
Message_StringID(MT_SpellFailure, CANNOT_BIND);
MessageString(Chat::SpellFailure, CANNOT_BIND);
break;
}
if(!zone->IsCity())
{
if(caster != this)
{
Message_StringID(MT_SpellFailure, CANNOT_BIND);
MessageString(Chat::SpellFailure, CANNOT_BIND);
break;
}
else
@ -1039,7 +1039,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
if(zone->random.Roll(effect_value))
Gate(spells[spell_id].base2[i] - 1);
else if (caster)
caster->Message_StringID(MT_SpellFailure,GATE_FAIL);
caster->MessageString(Chat::SpellFailure,GATE_FAIL);
}
break;
}
@ -1051,7 +1051,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
#endif
if(GetSpecialAbility(UNDISPELLABLE)){
if (caster)
caster->Message_StringID(MT_SpellFailure, SPELL_NO_EFFECT, spells[spell_id].name);
caster->MessageString(Chat::SpellFailure, SPELL_NO_EFFECT, spells[spell_id].name);
break;
}
@ -1077,7 +1077,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
#endif
if(GetSpecialAbility(UNDISPELLABLE)){
if (caster)
caster->Message_StringID(MT_SpellFailure, SPELL_NO_EFFECT, spells[spell_id].name);
caster->MessageString(Chat::SpellFailure, SPELL_NO_EFFECT, spells[spell_id].name);
break;
}
@ -1103,7 +1103,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
#endif
if(GetSpecialAbility(UNDISPELLABLE)){
if (caster)
caster->Message_StringID(MT_SpellFailure, SPELL_NO_EFFECT, spells[spell_id].name);
caster->MessageString(Chat::SpellFailure, SPELL_NO_EFFECT, spells[spell_id].name);
break;
}
@ -1155,7 +1155,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
snprintf(effect_desc, _EDLEN, "Summon Item: %s (id %d)", itemname, spell.base[i]);
#endif
if (!item) {
Message(13, "Unable to summon item %d. Item not found.", spell.base[i]);
Message(Chat::Red, "Unable to summon item %d. Item not found.", spell.base[i]);
} else if (IsClient()) {
Client *c = CastToClient();
if (c->CheckLoreConflict(item)) {
@ -1194,10 +1194,10 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
if (!SummonedItem || !SummonedItem->IsClassBag()) {
if (caster)
caster->Message(13, "SE_SummonItemIntoBag but no bag has been summoned!");
caster->Message(Chat::Red, "SE_SummonItemIntoBag but no bag has been summoned!");
} else if ((slot = SummonedItem->FirstOpenSlot()) == 0xff) {
if (caster)
caster->Message(13, "SE_SummonItemIntoBag but no room in summoned bag!");
caster->Message(Chat::Red, "SE_SummonItemIntoBag but no room in summoned bag!");
} else if (IsClient()) {
if (CastToClient()->CheckLoreConflict(item)) {
CastToClient()->DuplicateLoreMessage(spell.base[i]);
@ -1235,7 +1235,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
#endif
if(GetPet())
{
Message_StringID(MT_Shout, ONLY_ONE_PET);
MessageString(Chat::Shout, ONLY_ONE_PET);
}
else
{
@ -1516,7 +1516,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
{
WipeHateList();
}
Message(13, "Your mind fogs. Who are my friends? Who are my enemies?... it was all so clear a moment ago...");
Message(Chat::Red, "Your mind fogs. Who are my friends? Who are my enemies?... it was all so clear a moment ago...");
}
break;
}
@ -1537,7 +1537,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
&& caster && (!caster->IsNPC() || (caster->IsNPC() && !RuleB(Spells, NPCIgnoreBaseImmunity)))))
{
if (caster)
caster->Message_StringID(MT_Shout, IMMUNE_STUN);
caster->MessageString(Chat::Shout, IMMUNE_STUN);
}
else
{
@ -1627,7 +1627,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
if (zone->random.Int(0, 99) > spells[spell_id].base[i]) {
CastToClient()->SetFeigned(false);
entity_list.MessageClose_StringID(this, false, 200, 10, STRING_FEIGNFAILED, GetName());
entity_list.MessageCloseString(this, false, 200, 10, STRING_FEIGNFAILED, GetName());
} else {
CastToClient()->SetFeigned(true);
}
@ -1644,12 +1644,12 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
{
if(caster == this)
{
Message_StringID(MT_Spells,
MessageString(Chat::Spells,
SENTINEL_TRIG_YOU);
}
else
{
caster->Message_StringID(MT_Spells,
caster->MessageString(Chat::Spells,
SENTINEL_TRIG_OTHER, GetCleanName());
}
}
@ -1757,7 +1757,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
Group* group = entity_list.GetGroupByClient(TargetClient);
if(group) {
if(!group->IsGroupMember(TargetClient)) {
Message(13, "Your target must be a group member for this spell.");
Message(Chat::Red, "Your target must be a group member for this spell.");
break;
}
}
@ -1770,13 +1770,13 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
if(gid < 11)
{
if(r->GetGroup(TargetClient->GetName()) != gid) {
Message(13, "Your target must be a group member for this spell.");
Message(Chat::Red, "Your target must be a group member for this spell.");
break;
}
}
} else {
if(TargetClient != this->CastToClient()) {
Message(13, "Your target must be a group member for this spell.");
Message(Chat::Red, "Your target must be a group member for this spell.");
break;
}
}
@ -1790,26 +1790,26 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
Corpse *corpse = entity_list.GetCorpseByOwner(TargetClient);
if(corpse) {
if(TargetClient == this->CastToClient())
Message_StringID(4, SUMMONING_CORPSE, TargetClient->CastToMob()->GetCleanName());
MessageString(Chat::LightBlue, SUMMONING_CORPSE, TargetClient->CastToMob()->GetCleanName());
else
Message_StringID(4, SUMMONING_CORPSE_OTHER, TargetClient->CastToMob()->GetCleanName());
MessageString(Chat::LightBlue, SUMMONING_CORPSE_OTHER, TargetClient->CastToMob()->GetCleanName());
corpse->Summon(CastToClient(), true, true);
}
else {
// No corpse found in the zone
Message_StringID(4, CORPSE_CANT_SENSE);
MessageString(Chat::LightBlue, CORPSE_CANT_SENSE);
}
}
else if (caster) {
char level[4];
ConvertArray(effect_value, level);
caster->Message_StringID(MT_SpellFailure,
caster->MessageString(Chat::SpellFailure,
SPELL_LEVEL_REQ, level);
}
}
else {
Message_StringID(4, TARGET_NOT_FOUND);
MessageString(Chat::LightBlue, TARGET_NOT_FOUND);
Log(Logs::General, Logs::Error, "%s attempted to cast spell id %u with spell effect SE_SummonCorpse, but could not cast target into a Client object.", GetCleanName(), spell_id);
}
}
@ -1937,7 +1937,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
continue;
if (effect_value >= static_cast<int>(buffs[j].counters)) {
if (caster) {
caster->Message(MT_Spells,"You have cured your target of %s!",spells[buffs[j].spellid].name);
caster->Message(Chat::Spells,"You have cured your target of %s!",spells[buffs[j].spellid].name);
caster->CastOnCurer(buffs[j].spellid);
CastOnCure(buffs[j].spellid);
}
@ -1971,7 +1971,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
if (effect_value >= static_cast<int>(buffs[j].counters))
{
if (caster) {
caster->Message(MT_Spells,"You have cured your target of %s!",spells[buffs[j].spellid].name);
caster->Message(Chat::Spells,"You have cured your target of %s!",spells[buffs[j].spellid].name);
caster->CastOnCurer(buffs[j].spellid);
CastOnCure(buffs[j].spellid);
}
@ -2007,7 +2007,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
if (effect_value >= static_cast<int>(buffs[j].counters))
{
if (caster) {
caster->Message(MT_Spells,"You have cured your target of %s!",spells[buffs[j].spellid].name);
caster->Message(Chat::Spells,"You have cured your target of %s!",spells[buffs[j].spellid].name);
caster->CastOnCurer(buffs[j].spellid);
CastOnCure(buffs[j].spellid);
}
@ -2042,7 +2042,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
continue;
if (effect_value >= static_cast<int>(buffs[j].counters)) {
if (caster) {
caster->Message(MT_Spells,"You have cured your target of %s!",spells[buffs[j].spellid].name);
caster->Message(Chat::Spells,"You have cured your target of %s!",spells[buffs[j].spellid].name);
caster->CastOnCurer(buffs[j].spellid);
CastOnCure(buffs[j].spellid);
}
@ -2068,7 +2068,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
if(GetLevel() <= 52)
CastToNPC()->Depop(true);
else
Message(13, "Your target is too high level to be affected by this spell.");
Message(Chat::Red, "Your target is too high level to be affected by this spell.");
}
break;
}
@ -2115,10 +2115,10 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), caster->GetX(),
caster->GetY(), caster->GetZ(), caster->GetHeading(), 2,
SummonPC);
Message(15, "You have been summoned!");
Message(Chat::Yellow, "You have been summoned!");
entity_list.ClearAggro(this);
} else
caster->Message(13, "This spell can only be cast on players.");
caster->Message(Chat::Red, "This spell can only be cast on players.");
break;
}
@ -2725,13 +2725,13 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
case SE_MassGroupBuff:{
SetMGB(true);
Message_StringID(MT_Disciplines, MGB_STRING);
MessageString(Chat::Disciplines, MGB_STRING);
break;
}
case SE_IllusionOther: {
SetProjectIllusion(true);
Message(10, "The power of your next illusion spell will flow to your grouped target in your place.");
Message(Chat::NPCQuestSay, "The power of your next illusion spell will flow to your grouped target in your place.");
break;
}
@ -3572,7 +3572,7 @@ void Mob::DoBuffTic(const Buffs_Struct &buff, int slot, Mob *caster)
if (IsAIControlled()) {
WipeHateList();
}
Message(13, "Your mind fogs. Who are my friends? Who are my enemies?... it was all so "
Message(Chat::Red, "Your mind fogs. Who are my friends? Who are my enemies?... it was all so "
"clear a moment ago...");
}
break;
@ -3643,7 +3643,7 @@ void Mob::DoBuffTic(const Buffs_Struct &buff, int slot, Mob *caster)
case SE_Invisibility2:
case SE_InvisVsUndead2: {
if (buff.ticsremaining <= 3 && buff.ticsremaining > 1) {
Message_StringID(MT_Spells, INVIS_BEGIN_BREAK);
MessageString(Chat::Spells, INVIS_BEGIN_BREAK);
}
break;
}
@ -4047,7 +4047,7 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
if(p->IsPet())
notify = p->GetOwner();
if(p) {
notify->Message_StringID(MT_WornOff, SPELL_WORN_OFF_OF,
notify->MessageString(Chat::SpellWornOff, SPELL_WORN_OFF_OF,
spells[buffs[slot].spellid].name, GetCleanName());
}
}
@ -5406,7 +5406,7 @@ int16 Client::GetFocusEffect(focusType type, uint16 spell_id)
default:
break;
}
Message_StringID(MT_Spells, string_id, UsedItem->Name);
MessageString(Chat::Spells, string_id, UsedItem->Name);
}
}
@ -5814,9 +5814,15 @@ bool Mob::TryDeathSave() {
Message(263, "The gods have healed you for %i points of damage.", HealAmt);
if(spellbonuses.DeathSave[0] == 2)
entity_list.MessageClose_StringID(this, false, 200, MT_CritMelee, DIVINE_INTERVENTION, GetCleanName());
entity_list.MessageCloseString(
this,
false,
200,
Chat::MeleeCrit,
DIVINE_INTERVENTION,
GetCleanName());
else
entity_list.MessageClose_StringID(this, false, 200, MT_CritMelee, DEATH_PACT, GetCleanName());
entity_list.MessageCloseString(this, false, 200, Chat::MeleeCrit, DEATH_PACT, GetCleanName());
SendHPUpdate();
BuffFadeBySlot(buffSlot);
@ -5847,9 +5853,15 @@ bool Mob::TryDeathSave() {
Message(263, "The gods have healed you for %i points of damage.", HealAmt);
if(spellbonuses.DeathSave[0] == 2)
entity_list.MessageClose_StringID(this, false, 200, MT_CritMelee, DIVINE_INTERVENTION, GetCleanName());
entity_list.MessageCloseString(
this,
false,
200,
Chat::MeleeCrit,
DIVINE_INTERVENTION,
GetCleanName());
else
entity_list.MessageClose_StringID(this, false, 200, MT_CritMelee, DEATH_PACT, GetCleanName());
entity_list.MessageCloseString(this, false, 200, Chat::MeleeCrit, DEATH_PACT, GetCleanName());
SendHPUpdate();
BuffFadeBySlot(buffSlot);
@ -6802,11 +6814,11 @@ void Client::BreakFeignDeathWhenCastOn(bool IsResisted)
chance *= 2;
if(chance && (zone->random.Roll(chance))){
Message_StringID(MT_SpellFailure,FD_CAST_ON_NO_BREAK);
MessageString(Chat::SpellFailure,FD_CAST_ON_NO_BREAK);
return;
}
SetFeigned(false);
Message_StringID(MT_SpellFailure,FD_CAST_ON);
MessageString(Chat::SpellFailure,FD_CAST_ON);
}
}

View File

@ -180,9 +180,9 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
Log(Logs::Detail, Logs::Spells, "Spell casting canceled: not able to cast now. Valid? %d, casting %d, waiting? %d, spellend? %d, stunned? %d, feared? %d, mezed? %d, silenced? %d, amnesiad? %d",
IsValidSpell(spell_id), casting_spell_id, delaytimer, spellend_timer.Enabled(), IsStunned(), IsFeared(), IsMezzed(), IsSilenced(), IsAmnesiad() );
if(IsSilenced() && !IsDiscipline(spell_id))
Message_StringID(13, SILENCED_STRING);
MessageString(Chat::Red, SILENCED_STRING);
if(IsAmnesiad() && IsDiscipline(spell_id))
Message_StringID(13, MELEE_SILENCE);
MessageString(Chat::Red, MELEE_SILENCE);
if(IsClient())
CastToClient()->SendSpellBarEnable(spell_id);
if(casting_spell_id && IsNPC())
@ -197,7 +197,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
int chance = CastToClient()->GetFocusEffect(focusFcMute, spell_id);//Client only
if (zone->random.Roll(chance)) {
Message_StringID(13, SILENCED_STRING);
MessageString(Chat::Red, SILENCED_STRING);
if(IsClient())
CastToClient()->SendSpellBarEnable(spell_id);
return(false);
@ -205,7 +205,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
}
if(IsDetrimentalSpell(spell_id) && !zone->CanDoCombat()){
Message_StringID(13, SPELL_WOULDNT_HOLD);
MessageString(Chat::Red, SPELL_WOULDNT_HOLD);
if(IsClient())
CastToClient()->SendSpellBarEnable(spell_id);
if(casting_spell_id && IsNPC())
@ -257,7 +257,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
database.SetHackerFlag(CastToClient()->AccountName(), CastToClient()->GetCleanName(), "Clicking equip-only item with an invalid class");
}
else {
Message_StringID(13, MUST_EQUIP_ITEM);
MessageString(Chat::Red, MUST_EQUIP_ITEM);
}
return(false);
}
@ -272,11 +272,11 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
if (CastToClient()->ClientVersion() >= EQEmu::versions::ClientVersion::RoF)
{
// Line 181 in eqstr_us.txt was changed in RoF+
Message(15, "Your race, class, or deity cannot use this item.");
Message(Chat::Yellow, "Your race, class, or deity cannot use this item.");
}
else
{
Message_StringID(13, CANNOT_USE_ITEM);
MessageString(Chat::Red, CANNOT_USE_ITEM);
}
}
return(false);
@ -289,7 +289,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
database.SetHackerFlag(CastToClient()->AccountName(), CastToClient()->GetCleanName(), "Clicking equip-only item without equiping it");
}
else {
Message_StringID(13, MUST_EQUIP_ITEM);
MessageString(Chat::Red, MUST_EQUIP_ITEM);
}
return(false);
}
@ -370,22 +370,24 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
Mob::SetMana(GetMana() - use_mana); // We send StopCasting which will update mana
StopCasting();
Message_StringID(MT_SpellFailure, fizzle_msg);
MessageString(Chat::SpellFailure, fizzle_msg);
/* Song Failure Messages */
entity_list.FilteredMessageClose_StringID(
this, /* Sender */
true, /* Skip Sender */
RuleI(Range, SpellMessages),
MT_SpellFailure, /* Type: 289 */
(IsClient() ? FilterPCSpells : FilterNPCSpells), /* FilterType: 8 or 9 depending on client/npc */
(fizzle_msg == MISS_NOTE ? MISSED_NOTE_OTHER : SPELL_FIZZLE_OTHER),
/**
* Song Failure message
*/
entity_list.FilteredMessageCloseString(
this,
true,
RuleI(Range, SpellMessages),
Chat::SpellFailure,
(IsClient() ? FilterPCSpells : FilterNPCSpells),
(fizzle_msg == MISS_NOTE ? MISSED_NOTE_OTHER : SPELL_FIZZLE_OTHER),
/*
MessageFormat: You miss a note, bringing your song to a close! (if missed note)
MessageFormat: A missed note brings %1's song to a close!
MessageFormat: %1's spell fizzles!
*/
GetName() /* Message1 */
GetName()
);
TryTriggerOnValueAmount(false, true);
@ -426,7 +428,7 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
Log(Logs::Detail, Logs::Spells, "Spell Error: no target. spell=%d", spell_id);
if(IsClient()) {
//clients produce messages... npcs should not for this case
Message_StringID(13, SPELL_NEED_TAR);
MessageString(Chat::Red, SPELL_NEED_TAR);
InterruptSpell();
} else {
InterruptSpell(0, 0, 0); //the 0 args should cause no messages
@ -459,7 +461,7 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
Log(Logs::Detail, Logs::Spells, "Spell Error not enough mana spell=%d mymana=%d cost=%d\n", spell_id, my_curmana, mana_cost);
if(IsClient()) {
//clients produce messages... npcs should not for this case
Message_StringID(13, INSUFFICIENT_MANA);
MessageString(Chat::Red, INSUFFICIENT_MANA);
InterruptSpell();
} else {
InterruptSpell(0, 0, 0); //the 0 args should cause no messages
@ -516,7 +518,7 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
if (IsClient() && slot == CastingSlot::Item && item_slot != 0xFFFFFFFF) {
auto item = CastToClient()->GetInv().GetItem(item_slot);
if (item && item->GetItem())
Message_StringID(MT_Spells, BEGINS_TO_GLOW, item->GetItem()->Name);
MessageString(Chat::Spells, BEGINS_TO_GLOW, item->GetItem()->Name);
}
if (!DoCastingChecks()) {
@ -573,28 +575,28 @@ bool Mob::DoCastingChecks()
if (spell_target && spells[spell_id].targettype != ST_Self && !spell_target->CheckSpellLevelRestriction(spell_id)) {
Log(Logs::Detail, Logs::Spells, "Spell %d failed: recipient did not meet the level restrictions", spell_id);
if (!IsBardSong(spell_id))
Message_StringID(MT_SpellFailure, SPELL_TOO_POWERFUL);
MessageString(Chat::SpellFailure, SPELL_TOO_POWERFUL);
return false;
}
}
if (spells[spell_id].zonetype == 1 && !zone->CanCastOutdoor()) {
Message_StringID(13, CAST_OUTDOORS);
MessageString(Chat::Red, CAST_OUTDOORS);
return false;
}
if (IsEffectInSpell(spell_id, SE_Levitate) && !zone->CanLevitate()) {
Message(13, "You can't levitate in this zone.");
Message(Chat::Red, "You can't levitate in this zone.");
return false;
}
if(zone->IsSpellBlocked(spell_id, glm::vec3(GetPosition()))) {
const char *msg = zone->GetSpellBlockedMessage(spell_id, glm::vec3(GetPosition()));
if (msg) {
Message(13, msg);
Message(Chat::Red, msg);
return false;
} else {
Message(13, "You can't cast this spell here.");
Message(Chat::Red, "You can't cast this spell here.");
return false;
}
}
@ -678,7 +680,7 @@ void Client::CheckSongSkillIncrease(uint16 spell_id){
if (GetRawSkill(EQEmu::skills::SkillPercussionInstruments) > 0) // no skill increases if not trained in the instrument
CheckIncreaseSkill(EQEmu::skills::SkillPercussionInstruments, nullptr, -15);
else
Message_StringID(13,NO_INSTRUMENT_SKILL); // tell the client that they need instrument training
MessageString(Chat::Red,NO_INSTRUMENT_SKILL); // tell the client that they need instrument training
}
else
CheckIncreaseSkill(EQEmu::skills::SkillSinging, nullptr, -15);
@ -688,7 +690,7 @@ void Client::CheckSongSkillIncrease(uint16 spell_id){
if (GetRawSkill(EQEmu::skills::SkillStringedInstruments) > 0)
CheckIncreaseSkill(EQEmu::skills::SkillStringedInstruments, nullptr, -15);
else
Message_StringID(13,NO_INSTRUMENT_SKILL);
MessageString(Chat::Red,NO_INSTRUMENT_SKILL);
}
else
CheckIncreaseSkill(EQEmu::skills::SkillSinging, nullptr, -15);
@ -698,7 +700,7 @@ void Client::CheckSongSkillIncrease(uint16 spell_id){
if (GetRawSkill(EQEmu::skills::SkillWindInstruments) > 0)
CheckIncreaseSkill(EQEmu::skills::SkillWindInstruments, nullptr, -15);
else
Message_StringID(13,NO_INSTRUMENT_SKILL);
MessageString(Chat::Red,NO_INSTRUMENT_SKILL);
}
else
CheckIncreaseSkill(EQEmu::skills::SkillSinging, nullptr, -15);
@ -708,7 +710,7 @@ void Client::CheckSongSkillIncrease(uint16 spell_id){
if (GetRawSkill(EQEmu::skills::SkillBrassInstruments) > 0)
CheckIncreaseSkill(EQEmu::skills::SkillBrassInstruments, nullptr, -15);
else
Message_StringID(13,NO_INSTRUMENT_SKILL);
MessageString(Chat::Red,NO_INSTRUMENT_SKILL);
}
else
CheckIncreaseSkill(EQEmu::skills::SkillSinging, nullptr, -15);
@ -859,7 +861,7 @@ void Mob::InterruptSpell(uint16 message, uint16 color, uint16 spellid)
}
if(casting_spell_aa_id && IsClient()) { //Rest AA Timer on failed cast
CastToClient()->Message_StringID(MT_SpellFailure, ABILITY_FAILED);
CastToClient()->MessageString(Chat::SpellFailure, ABILITY_FAILED);
CastToClient()->ResetAlternateAdvancementTimer(casting_spell_aa_id);
}
@ -938,7 +940,7 @@ void Mob::StopCasting()
if (IsClient()) {
auto c = CastToClient();
if (casting_spell_aa_id) { //Rest AA Timer on failed cast
c->Message_StringID(MT_SpellFailure, ABILITY_FAILED);
c->MessageString(Chat::SpellFailure, ABILITY_FAILED);
c->ResetAlternateAdvancementTimer(casting_spell_aa_id);
}
@ -967,7 +969,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
if(IsClient() && slot != CastingSlot::Item && slot != CastingSlot::PotionBelt && spells[spell_id].recast_time > 1000) { // 10 is item
if(!CastToClient()->GetPTimers().Expired(&database, pTimerSpellStart + spell_id, false)) {
//should we issue a message or send them a spell gem packet?
Message_StringID(13, SPELL_RECAST);
MessageString(Chat::Red, SPELL_RECAST);
Log(Logs::Detail, Logs::Spells, "Casting of %d canceled: spell reuse timer not expired", spell_id);
StopCasting();
return;
@ -981,7 +983,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
if(itm && itm->GetItem()->RecastDelay > 0)
{
if(!CastToClient()->GetPTimers().Expired(&database, (pTimerItemStart + itm->GetItem()->RecastType), false)) {
Message_StringID(13, SPELL_RECAST);
MessageString(Chat::Red, SPELL_RECAST);
Log(Logs::Detail, Logs::Spells, "Casting of %d canceled: item spell reuse timer not expired", spell_id);
StopCasting();
return;
@ -1003,7 +1005,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
if(delaytimer)
{
Log(Logs::Detail, Logs::Spells, "Casting of %d canceled: recast too quickly", spell_id);
Message(13, "You are unable to focus.");
Message(Chat::Red, "You are unable to focus.");
InterruptSpell();
return;
}
@ -1013,7 +1015,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
if (casting_spell_id != spell_id)
{
Log(Logs::Detail, Logs::Spells, "Casting of %d canceled: already casting", spell_id);
Message_StringID(13,ALREADY_CASTING);
MessageString(Chat::Red,ALREADY_CASTING);
InterruptSpell();
return;
}
@ -1131,8 +1133,14 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
}
// if we got here, we regained concentration
regain_conc = true;
Message_StringID(MT_Spells,REGAIN_AND_CONTINUE);
entity_list.MessageClose_StringID(this, true, RuleI(Range, SpellMessages), MT_Spells, OTHER_REGAIN_CAST, this->GetCleanName());
MessageString(Chat::Spells, REGAIN_AND_CONTINUE);
entity_list.MessageCloseString(
this,
true,
RuleI(Range, SpellMessages),
Chat::Spells,
OTHER_REGAIN_CAST,
this->GetCleanName());
}
}
@ -1168,7 +1176,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
case 13000:
if(itembonuses.percussionMod == 0) { // check for the appropriate instrument type
HasInstrument = false;
c->Message_StringID(13, SONG_NEEDS_DRUM); // send an error message if missing
c->MessageString(Chat::Red, SONG_NEEDS_DRUM); // send an error message if missing
}
break;
@ -1176,7 +1184,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
case 13001:
if(itembonuses.windMod == 0) {
HasInstrument = false;
c->Message_StringID(13, SONG_NEEDS_WIND);
c->MessageString(Chat::Red, SONG_NEEDS_WIND);
}
break;
@ -1184,7 +1192,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
case 13011:
if(itembonuses.stringedMod == 0) {
HasInstrument = false;
c->Message_StringID(13, SONG_NEEDS_STRINGS);
c->MessageString(Chat::Red, SONG_NEEDS_STRINGS);
}
break;
@ -1192,7 +1200,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
case 13012:
if(itembonuses.brassMod == 0) {
HasInstrument = false;
c->Message_StringID(13, SONG_NEEDS_BRASS);
c->MessageString(Chat::Red, SONG_NEEDS_BRASS);
}
break;
@ -1203,7 +1211,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
if(!HasInstrument) { // if the instrument is missing, log it and interrupt the song
Log(Logs::Detail, Logs::Spells, "Song %d: Canceled. Missing required instrument %d", spell_id, component);
if(c->GetGM())
c->Message(0, "Your GM status allows you to finish casting even though you're missing a required instrument.");
c->Message(Chat::White, "Your GM status allows you to finish casting even though you're missing a required instrument.");
else {
InterruptSpell();
return;
@ -1220,13 +1228,13 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
{
if (!missingreags)
{
c->Message_StringID(13, MISSING_SPELL_COMP);
c->MessageString(Chat::Red, MISSING_SPELL_COMP);
missingreags=true;
}
const EQEmu::ItemData *item = database.GetItem(component);
if(item) {
c->Message_StringID(13, MISSING_SPELL_COMP_ITEM, item->Name);
c->MessageString(Chat::Red, MISSING_SPELL_COMP_ITEM, item->Name);
Log(Logs::Detail, Logs::Spells, "Spell %d: Canceled. Missing required reagent %s (%d)", spell_id, item->Name, component);
}
else {
@ -1240,7 +1248,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
if (missingreags) {
if(c->GetGM())
c->Message(0, "Your GM status allows you to finish casting even though you're missing required components.");
c->Message(Chat::White, "Your GM status allows you to finish casting even though you're missing required components.");
else {
InterruptSpell();
return;
@ -1270,7 +1278,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
}
else
{ // some kind of error in the code if this happens
c->Message(13, "ERROR: reagent item disappeared while processing?");
c->Message(Chat::Red, "ERROR: reagent item disappeared while processing?");
}
}
}
@ -1322,7 +1330,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
if(IsClient() && fromaug && recastdelay > 0)
{
if(!CastToClient()->GetPTimers().Expired(&database, (pTimerItemStart + recasttype), false)) {
Message_StringID(13, SPELL_RECAST);
MessageString(Chat::Red, SPELL_RECAST);
Log(Logs::Detail, Logs::Spells, "Casting of %d canceled: item spell reuse timer not expired", spell_id);
StopCasting();
return;
@ -1353,7 +1361,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
else
{
Log(Logs::Detail, Logs::Spells, "Item used to cast spell %d was missing from inventory slot %d after casting!", spell_id, inventory_slot);
Message(13, "Casting Error: Active casting item not found in inventory slot %i", inventory_slot);
Message(Chat::Red, "Casting Error: Active casting item not found in inventory slot %i", inventory_slot);
InterruptSpell();
return;
}
@ -1500,7 +1508,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
targetType = ST_Target;
if (spell_target && !spell_target->PassCastRestriction(true, spells[spell_id].CastRestriction)){
Message_StringID(13,SPELL_NEED_TAR);
MessageString(Chat::Red,SPELL_NEED_TAR);
return false;
}
@ -1510,7 +1518,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
if (spell_target &&
((spell_target->IsNPC() && spell_target->IsEngaged()) ||
(spell_target->IsClient() && spell_target->CastToClient()->GetAggroCount()))) {
Message_StringID(13, SPELL_NO_EFFECT); // Unsure correct string
MessageString(Chat::Red, SPELL_NO_EFFECT); // Unsure correct string
return false;
}
}
@ -1518,9 +1526,9 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
else if (IsBeneficialSpell(spell_id)) {
if ((IsNPC() && IsEngaged()) || (IsClient() && CastToClient()->GetAggroCount())) {
if (IsDiscipline(spell_id))
Message_StringID(13, NO_ABILITY_IN_COMBAT);
MessageString(Chat::Red, NO_ABILITY_IN_COMBAT);
else
Message_StringID(13, NO_CAST_IN_COMBAT);
MessageString(Chat::Red, NO_CAST_IN_COMBAT);
return false;
}
@ -1533,7 +1541,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
if (spell_target &&
((spell_target->IsNPC() && !spell_target->IsEngaged()) ||
(spell_target->IsClient() && !spell_target->CastToClient()->GetAggroCount()))) {
Message_StringID(13, SPELL_NO_EFFECT); // Unsure correct string
MessageString(Chat::Red, SPELL_NO_EFFECT); // Unsure correct string
return false;
}
}
@ -1541,9 +1549,9 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
else if (IsBeneficialSpell(spell_id)) {
if ((IsNPC() && !IsEngaged()) || (IsClient() && !CastToClient()->GetAggroCount())) {
if (IsDiscipline(spell_id))
Message_StringID(13, NO_ABILITY_OUT_OF_COMBAT);
MessageString(Chat::Red, NO_ABILITY_OUT_OF_COMBAT);
else
Message_StringID(13, NO_CAST_OUT_OF_COMBAT);
MessageString(Chat::Red, NO_CAST_OUT_OF_COMBAT);
return false;
}
@ -1580,9 +1588,9 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
//invalid target
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: invalid target of body type %d (undead)", spell_id, mob_body);
if(!spell_target)
Message_StringID(13,SPELL_NEED_TAR);
MessageString(Chat::Red,SPELL_NEED_TAR);
else
Message_StringID(13,CANNOT_AFFECT_NPC);
MessageString(Chat::Red,CANNOT_AFFECT_NPC);
return false;
}
CastAction = SingleTarget;
@ -1594,7 +1602,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
{
//invalid target
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: invalid target of body type %d (summoned)", spell_id, mob_body);
Message_StringID(13,SPELL_NEED_TAR);
MessageString(Chat::Red,SPELL_NEED_TAR);
return false;
}
CastAction = SingleTarget;
@ -1609,7 +1617,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: invalid target of body type %d (summoned pet)",
spell_id, mob_body);
Message_StringID(13, SPELL_NEED_TAR);
MessageString(Chat::Red, SPELL_NEED_TAR);
return false;
}
@ -1633,9 +1641,9 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
//invalid target
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: invalid target of body type %d (want body Type %d)", spell_id, mob_body, target_bt);
if(!spell_target)
Message_StringID(13,SPELL_NEED_TAR);
MessageString(Chat::Red,SPELL_NEED_TAR);
else
Message_StringID(13,CANNOT_AFFECT_NPC);
MessageString(Chat::Red,CANNOT_AFFECT_NPC);
return false;
}
CastAction = SingleTarget;
@ -1650,7 +1658,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
if(!spell_target)
{
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: invalid target (ldon object)", spell_id);
Message_StringID(13,SPELL_NEED_TAR);
MessageString(Chat::Red,SPELL_NEED_TAR);
return false;
}
else
@ -1658,14 +1666,14 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
if(!spell_target->IsNPC())
{
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: invalid target (normal)", spell_id);
Message_StringID(13,SPELL_NEED_TAR);
MessageString(Chat::Red,SPELL_NEED_TAR);
return false;
}
if(spell_target->GetClass() != LDON_TREASURE)
{
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: invalid target (normal)", spell_id);
Message_StringID(13,SPELL_NEED_TAR);
MessageString(Chat::Red,SPELL_NEED_TAR);
return false;
}
}
@ -1674,7 +1682,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
if(!spell_target)
{
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: invalid target (normal)", spell_id);
Message_StringID(13,SPELL_NEED_TAR);
MessageString(Chat::Red,SPELL_NEED_TAR);
return false; // can't cast these unless we have a target
}
CastAction = SingleTarget;
@ -1690,7 +1698,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
if(!spell_target) message = SPELL_NEED_TAR;
else if(!spell_target->IsCorpse()) message = ONLY_ON_CORPSES;
else if(!spell_target->IsPlayerCorpse()) message = CORPSE_NOT_VALID;
Message_StringID(13, message);
MessageString(Chat::Red, message);
return false;
}
CastAction = SingleTarget;
@ -1702,7 +1710,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
if(!spell_target)
{
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: invalid target (no pet)", spell_id);
Message_StringID(13,NO_PET);
MessageString(Chat::Red,NO_PET);
return false; // can't cast these unless we have a target
}
CastAction = SingleTarget;
@ -1773,7 +1781,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
if(!spell_target)
{
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: invalid target (AOE)", spell_id);
Message_StringID(13,SPELL_NEED_TAR);
MessageString(Chat::Red,SPELL_NEED_TAR);
return false;
}
ae_center = spell_target;
@ -1798,7 +1806,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
}
if (spell_target && spell_target->IsPet() && spells[spell_id].targettype == ST_GroupNoPets){
Message_StringID(13,NO_CAST_ON_PET);
MessageString(Chat::Red,NO_CAST_ON_PET);
return false;
}
@ -1810,7 +1818,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
if(!spell_target)
{
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: invalid target (Group Required: Single Target)", spell_id);
Message_StringID(13,SPELL_NEED_TAR);
MessageString(Chat::Red,SPELL_NEED_TAR);
return false;
}
@ -1927,14 +1935,14 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
if(group_id_caster == 0 || group_id_target == 0)
{
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: Attempted to cast a Single Target Group spell on a ungrouped member.", spell_id);
Message_StringID(13, TARGET_GROUP_MEMBER);
MessageString(Chat::Red, TARGET_GROUP_MEMBER);
return false;
}
if(group_id_caster != group_id_target)
{
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: Attempted to cast a Single Target Group spell on a ungrouped member.", spell_id);
Message_StringID(13, TARGET_GROUP_MEMBER);
MessageString(Chat::Red, TARGET_GROUP_MEMBER);
return false;
}
@ -2028,7 +2036,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui
if( spells[spell_id].zonetype == 1 && !zone->CanCastOutdoor()){
if(IsClient()){
if(!CastToClient()->GetGM()){
Message_StringID(13, CAST_OUTDOORS);
MessageString(Chat::Red, CAST_OUTDOORS);
return false;
}
}
@ -2037,7 +2045,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui
if(IsEffectInSpell(spell_id, SE_Levitate) && !zone->CanLevitate()){
if(IsClient()){
if(!CastToClient()->GetGM()){
Message(13, "You can't levitate in this zone.");
Message(Chat::Red, "You can't levitate in this zone.");
return false;
}
}
@ -2048,11 +2056,11 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui
if(zone->IsSpellBlocked(spell_id, glm::vec3(GetPosition()))){
const char *msg = zone->GetSpellBlockedMessage(spell_id, glm::vec3(GetPosition()));
if(msg){
Message(13, msg);
Message(Chat::Red, msg);
return false;
}
else{
Message(13, "You can't cast this spell here.");
Message(Chat::Red, "You can't cast this spell here.");
return false;
}
@ -2110,14 +2118,14 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui
if(!spells[spell_id].npc_no_los && spell_target && IsDetrimentalSpell(spell_id) && !CheckLosFN(spell_target) && !IsHarmonySpell(spell_id) && spells[spell_id].targettype != ST_TargetOptional)
{
Log(Logs::Detail, Logs::Spells, "Spell %d: cannot see target %s", spell_id, spell_target->GetName());
Message_StringID(13,CANT_SEE_TARGET);
MessageString(Chat::Red,CANT_SEE_TARGET);
return false;
}
// check to see if target is a caster mob before performing a mana tap
if(spell_target && IsManaTapSpell(spell_id)) {
if(spell_target->GetCasterClass() == 'N') {
Message_StringID(13, TARGET_NO_MANA);
MessageString(Chat::Red, TARGET_NO_MANA);
return false;
}
}
@ -2141,13 +2149,13 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui
if(dist2 > range2) {
//target is out of range.
Log(Logs::Detail, Logs::Spells, "Spell %d: Spell target is out of range (squared: %f > %f)", spell_id, dist2, range2);
Message_StringID(13, TARGET_OUT_OF_RANGE);
MessageString(Chat::Red, TARGET_OUT_OF_RANGE);
return(false);
}
else if (dist2 < min_range2){
//target is too close range.
Log(Logs::Detail, Logs::Spells, "Spell %d: Spell target is too close (squared: %f < %f)", spell_id, dist2, min_range2);
Message_StringID(13, TARGET_TOO_CLOSE);
MessageString(Chat::Red, TARGET_TOO_CLOSE);
return(false);
}
@ -2162,13 +2170,13 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui
if(dist2 > range2) {
//target is out of range.
Log(Logs::Detail, Logs::Spells, "Spell %d: Spell target is out of range (squared: %f > %f)", spell_id, dist2, range2);
Message_StringID(13, TARGET_OUT_OF_RANGE);
MessageString(Chat::Red, TARGET_OUT_OF_RANGE);
return(false);
}
else if (dist2 < min_range2){
//target is too close range.
Log(Logs::Detail, Logs::Spells, "Spell %d: Spell target is too close (squared: %f < %f)", spell_id, dist2, min_range2);
Message_StringID(13, TARGET_TOO_CLOSE);
MessageString(Chat::Red, TARGET_TOO_CLOSE);
return(false);
}
@ -2518,7 +2526,7 @@ bool Mob::ApplyNextBardPulse(uint16 spell_id, Mob *spell_target, CastingSlot slo
if(spell_target && IsDetrimentalSpell(spell_id) && !CheckLosFN(spell_target))
{
Log(Logs::Detail, Logs::Spells, "Bard Song Pulse %d: cannot see target %s", spell_target->GetName());
Message_StringID(13, CANT_SEE_TARGET);
MessageString(Chat::Red, CANT_SEE_TARGET);
return(false);
}
@ -2533,7 +2541,7 @@ bool Mob::ApplyNextBardPulse(uint16 spell_id, Mob *spell_target, CastingSlot slo
if(dist2 > range2) {
//target is out of range.
Log(Logs::Detail, Logs::Spells, "Bard Song Pulse %d: Spell target is out of range (squared: %f > %f)", spell_id, dist2, range2);
Message_StringID(13, TARGET_OUT_OF_RANGE);
MessageString(Chat::Red, TARGET_OUT_OF_RANGE);
return(false);
}
}
@ -2892,7 +2900,7 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2,
if (spellbonuses.Screech == 1) {
if (effect2 == SE_Screech && sp2.base[i] == -1) {
Message_StringID(MT_SpellFailure, SCREECH_BUFF_BLOCK, sp2.name);
MessageString(Chat::SpellFailure, SCREECH_BUFF_BLOCK, sp2.name);
return -1;
}
}
@ -3213,7 +3221,7 @@ int Mob::AddBuff(Mob *caster, uint16 spell_id, int duration, int32 level_overrid
Log(Logs::Detail, Logs::Spells, "Adding buff %d failed: stacking prevented by spell %d in slot %d with caster level %d",
spell_id, curbuf.spellid, buffslot, curbuf.casterlevel);
if (caster && caster->IsClient() && RuleB(Client, UseLiveBlockedMessage)) {
caster->Message(13, "Your %s did not take hold on %s. (Blocked by %s.)", spells[spell_id].name, this->GetName(), spells[curbuf.spellid].name);
caster->Message(Chat::Red, "Your %s did not take hold on %s. (Blocked by %s.)", spells[spell_id].name, this->GetName(), spells[curbuf.spellid].name);
}
return -1;
}
@ -3414,7 +3422,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
if(!spelltar)
{
Log(Logs::Detail, Logs::Spells, "Unable to apply spell %d without a target", spell_id);
Message(13, "SOT: You must have a target for this spell.");
Message(Chat::Red, "SOT: You must have a target for this spell.");
return false;
}
@ -3423,7 +3431,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
if(IsDetrimentalSpell(spell_id) && !IsAttackAllowed(spelltar, true) && !IsResurrectionEffects(spell_id)) {
if(!IsClient() || !CastToClient()->GetGM()) {
Message_StringID(MT_SpellFailure, SPELL_NO_HOLD);
MessageString(Chat::SpellFailure, SPELL_NO_HOLD);
return false;
}
}
@ -3588,7 +3596,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
{
if(spelltar->invisible)
{
spelltar->Message_StringID(MT_SpellFailure, ALREADY_INVIS, GetCleanName());
spelltar->MessageString(Chat::SpellFailure, ALREADY_INVIS, GetCleanName());
safe_delete(action_packet);
return false;
}
@ -3598,7 +3606,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
{
if(spelltar->invisible_undead)
{
spelltar->Message_StringID(MT_SpellFailure, ALREADY_INVIS, GetCleanName());
spelltar->MessageString(Chat::SpellFailure, ALREADY_INVIS, GetCleanName());
safe_delete(action_packet);
return false;
}
@ -3608,7 +3616,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
{
if(spelltar->invisible_animals)
{
spelltar->Message_StringID(MT_SpellFailure, ALREADY_INVIS, GetCleanName());
spelltar->MessageString(Chat::SpellFailure, ALREADY_INVIS, GetCleanName());
safe_delete(action_packet);
return false;
}
@ -3688,7 +3696,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
Log(Logs::Detail, Logs::Spells, "Beneficial ae bard song %d can't take hold %s -> %s, IBA? %d", spell_id, GetName(), spelltar->GetName(), IsBeneficialAllowed(spelltar));
} else {
Log(Logs::Detail, Logs::Spells, "Beneficial spell %d can't take hold %s -> %s, IBA? %d", spell_id, GetName(), spelltar->GetName(), IsBeneficialAllowed(spelltar));
Message_StringID(MT_SpellFailure, SPELL_NO_HOLD);
MessageString(Chat::SpellFailure, SPELL_NO_HOLD);
}
safe_delete(action_packet);
return false;
@ -3698,7 +3706,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
else if ( !IsAttackAllowed(spelltar, true) && !IsResurrectionEffects(spell_id)) // Detrimental spells - PVP check
{
Log(Logs::Detail, Logs::Spells, "Detrimental spell %d can't take hold %s -> %s", spell_id, GetName(), spelltar->GetName());
spelltar->Message_StringID(MT_SpellFailure, YOU_ARE_PROTECTED, GetCleanName());
spelltar->MessageString(Chat::SpellFailure, YOU_ARE_PROTECTED, GetCleanName());
safe_delete(action_packet);
return false;
}
@ -3735,7 +3743,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
focus = CalcFocusEffect(focusBlockNextSpell, buffs[b].spellid, spell_id);
if(focus) {
CheckNumHitsRemaining(NumHit::MatchingSpells, b);
Message_StringID(MT_SpellFailure, SPELL_WOULDNT_HOLD);
MessageString(Chat::SpellFailure, SPELL_WOULDNT_HOLD);
safe_delete(action_packet);
return false;
}
@ -3784,18 +3792,18 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
if (reflect_chance) {
if (RuleB(Spells, ReflectMessagesClose)) {
entity_list.MessageClose_StringID(
entity_list.MessageCloseString(
this, /* Sender */
false, /* Skip Sender */
RuleI(Range, SpellMessages), /* Range */
MT_Spells, /* Type */
Chat::Spells, /* Type */
SPELL_REFLECT, /* String ID */
GetCleanName(), /* Message 1 */
spelltar->GetCleanName() /* Message 2 */
);
}
else {
Message_StringID(MT_Spells, SPELL_REFLECT, GetCleanName(), spelltar->GetCleanName());
MessageString(Chat::Spells, SPELL_REFLECT, GetCleanName(), spelltar->GetCleanName());
}
CheckNumHitsRemaining(NumHit::ReflectSpell);
@ -3827,12 +3835,12 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
Log(Logs::Detail, Logs::Spells, "Spell %d was completely resisted by %s", spell_id, spelltar->GetName());
if (spells[spell_id].resisttype == RESIST_PHYSICAL){
Message_StringID(MT_SpellFailure, PHYSICAL_RESIST_FAIL,spells[spell_id].name);
spelltar->Message_StringID(MT_SpellFailure, YOU_RESIST, spells[spell_id].name);
MessageString(Chat::SpellFailure, PHYSICAL_RESIST_FAIL,spells[spell_id].name);
spelltar->MessageString(Chat::SpellFailure, YOU_RESIST, spells[spell_id].name);
}
else {
Message_StringID(MT_SpellFailure, TARGET_RESISTED, spells[spell_id].name);
spelltar->Message_StringID(MT_SpellFailure, YOU_RESIST, spells[spell_id].name);
MessageString(Chat::SpellFailure, TARGET_RESISTED, spells[spell_id].name);
spelltar->MessageString(Chat::SpellFailure, YOU_RESIST, spells[spell_id].name);
}
if (spelltar->IsAIControlled()) {
@ -3897,7 +3905,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
{
Log(Logs::Detail, Logs::Spells, "Spell %d failed: recipient did not meet the level restrictions", spell_id);
if(!IsBardSong(spell_id))
Message_StringID(MT_SpellFailure, SPELL_TOO_POWERFUL);
MessageString(Chat::SpellFailure, SPELL_TOO_POWERFUL);
safe_delete(action_packet);
return false;
}
@ -3909,7 +3917,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
// spell. It's most likely a buff that can't stack.
Log(Logs::Detail, Logs::Spells, "Spell %d could not apply its effects %s -> %s\n", spell_id, GetName(), spelltar->GetName());
if(casting_spell_aa_id)
Message_StringID(MT_SpellFailure, SPELL_NO_HOLD);
MessageString(Chat::SpellFailure, SPELL_NO_HOLD);
safe_delete(action_packet);
return false;
}
@ -3989,14 +3997,14 @@ void Corpse::CastRezz(uint16 spellid, Mob* Caster)
if(IsRezzed()){
if(Caster && Caster->IsClient())
Caster->Message(13,"This character has already been resurrected.");
Caster->Message(Chat::Red,"This character has already been resurrected.");
return;
}
/*
if(!can_rez) {
if(Caster && Caster->IsClient())
Caster->Message_StringID(0, CORPSE_TOO_OLD);
Caster->MessageString(Chat::White, CORPSE_TOO_OLD);
return;
}
*/
@ -4224,7 +4232,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
{
if(GetSpecialAbility(UNMEZABLE)) {
Log(Logs::Detail, Logs::Spells, "We are immune to Mez spells.");
caster->Message_StringID(MT_SpellFailure, CANNOT_MEZ);
caster->MessageString(Chat::SpellFailure, CANNOT_MEZ);
int32 aggro = caster->CheckAggroAmount(spell_id, this);
if(aggro > 0) {
AddToHateList(caster, aggro);
@ -4242,7 +4250,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
(!caster->IsNPC() || (caster->IsNPC() && !RuleB(Spells, NPCIgnoreBaseImmunity))))
{
Log(Logs::Detail, Logs::Spells, "Our level (%d) is higher than the limit of this Mez spell (%d)", GetLevel(), spells[spell_id].max[effect_index]);
caster->Message_StringID(MT_SpellFailure, CANNOT_MEZ_WITH_SPELL);
caster->MessageString(Chat::SpellFailure, CANNOT_MEZ_WITH_SPELL);
AddToHateList(caster, 1,0,true,false,false,spell_id);
return true;
}
@ -4252,7 +4260,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
if(GetSpecialAbility(UNSLOWABLE) && IsEffectInSpell(spell_id, SE_AttackSpeed))
{
Log(Logs::Detail, Logs::Spells, "We are immune to Slow spells.");
caster->Message_StringID(CC_Red, IMMUNE_ATKSPEED);
caster->MessageString(Chat::Red, IMMUNE_ATKSPEED);
int32 aggro = caster->CheckAggroAmount(spell_id, this);
if(aggro > 0) {
AddToHateList(caster, aggro);
@ -4268,7 +4276,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
effect_index = GetSpellEffectIndex(spell_id, SE_Fear);
if(GetSpecialAbility(UNFEARABLE)) {
Log(Logs::Detail, Logs::Spells, "We are immune to Fear spells.");
caster->Message_StringID(CC_Red, IMMUNE_FEAR); // need to verify message type, not in MQ2Cast for easy look up
caster->MessageString(Chat::Red, IMMUNE_FEAR); // need to verify message type, not in MQ2Cast for easy look up
int32 aggro = caster->CheckAggroAmount(spell_id, this);
if(aggro > 0) {
AddToHateList(caster, aggro);
@ -4279,13 +4287,13 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
} else if(IsClient() && caster->IsClient() && (caster->CastToClient()->GetGM() == false))
{
Log(Logs::Detail, Logs::Spells, "Clients cannot fear eachother!");
caster->Message_StringID(CC_Red, IMMUNE_FEAR); // need to verify message type, not in MQ2Cast for easy look up
caster->MessageString(Chat::Red, IMMUNE_FEAR); // need to verify message type, not in MQ2Cast for easy look up
return true;
}
else if(GetLevel() > spells[spell_id].max[effect_index] && spells[spell_id].max[effect_index] != 0)
{
Log(Logs::Detail, Logs::Spells, "Level is %d, cannot be feared by this spell.", GetLevel());
caster->Message_StringID(MT_Shout, FEAR_TOO_HIGH);
caster->MessageString(Chat::Shout, FEAR_TOO_HIGH);
int32 aggro = caster->CheckAggroAmount(spell_id, this);
if (aggro > 0) {
AddToHateList(caster, aggro);
@ -4296,9 +4304,9 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
}
else if (CheckAATimer(aaTimerWarcry))
{
Message(13, "Your are immune to fear.");
Message(Chat::Red, "Your are immune to fear.");
Log(Logs::Detail, Logs::Spells, "Clients has WarCry effect, immune to fear!");
caster->Message_StringID(CC_Red, IMMUNE_FEAR); // need to verify message type, not in MQ2Cast for easy look up
caster->MessageString(Chat::Red, IMMUNE_FEAR); // need to verify message type, not in MQ2Cast for easy look up
return true;
}
}
@ -4308,7 +4316,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
if(GetSpecialAbility(UNCHARMABLE))
{
Log(Logs::Detail, Logs::Spells, "We are immune to Charm spells.");
caster->Message_StringID(CC_Red, CANNOT_CHARM); // need to verify message type, not in MQ2Cast for easy look up
caster->MessageString(Chat::Red, CANNOT_CHARM); // need to verify message type, not in MQ2Cast for easy look up
int32 aggro = caster->CheckAggroAmount(spell_id, this);
if(aggro > 0) {
AddToHateList(caster, aggro);
@ -4321,7 +4329,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
if(this == caster)
{
Log(Logs::Detail, Logs::Spells, "You are immune to your own charms.");
caster->Message(CC_Red, "You cannot charm yourself."); // need to look up message?
caster->Message(Chat::Red, "You cannot charm yourself."); // need to look up message?
return true;
}
@ -4334,7 +4342,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
if(GetLevel() > spells[spell_id].max[effect_index] && spells[spell_id].max[effect_index] != 0)
{
Log(Logs::Detail, Logs::Spells, "Our level (%d) is higher than the limit of this Charm spell (%d)", GetLevel(), spells[spell_id].max[effect_index]);
caster->Message_StringID(CC_Red, CANNOT_CHARM_YET); // need to verify message type, not in MQ2Cast for easy look up<Paste>
caster->MessageString(Chat::Red, CANNOT_CHARM_YET); // need to verify message type, not in MQ2Cast for easy look up<Paste>
AddToHateList(caster, 1,0,true,false,false,spell_id);
return true;
}
@ -4349,7 +4357,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
{
if(GetSpecialAbility(UNSNAREABLE)) {
Log(Logs::Detail, Logs::Spells, "We are immune to Snare spells.");
caster->Message_StringID(CC_Red, IMMUNE_MOVEMENT);
caster->MessageString(Chat::Red, IMMUNE_MOVEMENT);
int32 aggro = caster->CheckAggroAmount(spell_id, this);
if(aggro > 0) {
AddToHateList(caster, aggro);
@ -4365,7 +4373,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
if(this == caster)
{
Log(Logs::Detail, Logs::Spells, "You cannot lifetap yourself.");
caster->Message_StringID(MT_SpellFailure, CANT_DRAIN_SELF);
caster->MessageString(Chat::SpellFailure, CANT_DRAIN_SELF);
return true;
}
}
@ -4375,7 +4383,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
if(this == caster)
{
Log(Logs::Detail, Logs::Spells, "You cannot sacrifice yourself.");
caster->Message_StringID(MT_SpellFailure, CANNOT_SAC_SELF);
caster->MessageString(Chat::SpellFailure, CANNOT_SAC_SELF);
return true;
}
}
@ -4993,7 +5001,7 @@ void Client::MakeBuffFadePacket(uint16 spell_id, int slot_id, bool send_message)
const char *fadetext = spells[spell_id].spell_fades;
outapp = new EQApplicationPacket(OP_ColoredText, sizeof(ColoredText_Struct) + strlen(fadetext));
ColoredText_Struct *bfm = (ColoredText_Struct *) outapp->pBuffer;
bfm->color = MT_Spells;
bfm->color = Chat::Spells;
memcpy(bfm->msg, fadetext, strlen(fadetext));
QueuePacket(outapp);
safe_delete(outapp);

View File

@ -678,7 +678,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state)
if (taskID == TASKSLOTEMPTY)
continue;
if (!Tasks[taskID]) {
c->Message(13,
c->Message(Chat::Red,
"Active Task Slot %i, references a task (%i), that does not exist. "
"Removing from memory. Contact a GM to resolve this.",
i, taskID);
@ -691,7 +691,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state)
for (int j = 0; j < Tasks[taskID]->ActivityCount; j++) {
if (state->ActiveTasks[i].Activity[j].ActivityID != j) {
c->Message(13,
c->Message(Chat::Red,
"Active Task %i, %s. Activity count does not match expected value."
"Removing from memory. Contact a GM to resolve this.",
taskID, Tasks[taskID]->Title.c_str());
@ -1001,7 +1001,7 @@ void TaskManager::TaskSetSelector(Client *c, ClientTaskState *state, Mob *mob, i
return;
if (TaskSets[TaskSetID].empty()) {
mob->SayTo_StringID(c, CC_Yellow, MAX_ACTIVE_TASKS, c->GetName()); // I think this is suppose to be yellow
mob->SayString(c, Chat::Yellow, MAX_ACTIVE_TASKS, c->GetName()); // I think this is suppose to be yellow
return;
}
@ -1033,7 +1033,7 @@ void TaskManager::TaskSetSelector(Client *c, ClientTaskState *state, Mob *mob, i
if (TaskListIndex > 0) {
SendTaskSelector(c, mob, TaskListIndex, TaskList);
} else {
mob->SayTo_StringID(c, CC_Yellow, MAX_ACTIVE_TASKS, c->GetName()); // check color, I think this might be only for (Shared) Tasks, w/e -- think should be yellow
mob->SayString(c, Chat::Yellow, MAX_ACTIVE_TASKS, c->GetName()); // check color, I think this might be only for (Shared) Tasks, w/e -- think should be yellow
}
return;
@ -1065,7 +1065,7 @@ void TaskManager::TaskQuestSetSelector(Client *c, ClientTaskState *state, Mob *m
if (TaskListIndex > 0) {
SendTaskSelector(c, mob, TaskListIndex, TaskList);
} else {
mob->SayTo_StringID(c, CC_Yellow, MAX_ACTIVE_TASKS, c->GetName()); // check color, I think this might be only for (Shared) Tasks, w/e -- think should be yellow
mob->SayString(c, Chat::Yellow, MAX_ACTIVE_TASKS, c->GetName()); // check color, I think this might be only for (Shared) Tasks, w/e -- think should be yellow
}
return;
@ -1266,18 +1266,18 @@ void TaskManager::ExplainTask(Client*c, int TaskID) {
if(!c) return;
if((TaskID<=0) || (TaskID>=MAXTASKS)) {
c->Message(0, "TaskID out-of-range.");
c->Message(Chat::White, "TaskID out-of-range.");
return;
}
if(Tasks[TaskID] == nullptr) {
c->Message(0, "Task does not exist.");
c->Message(Chat::White, "Task does not exist.");
return;
}
char Explanation[1000], *ptr;
c->Message(0, "Task %4i: Title: %s", TaskID, Tasks[TaskID]->Description.c_str());
c->Message(0, "%3i Activities", Tasks[TaskID]->ActivityCount);
c->Message(Chat::White, "Task %4i: Title: %s", TaskID, Tasks[TaskID]->Description.c_str());
c->Message(Chat::White, "%3i Activities", Tasks[TaskID]->ActivityCount);
ptr = Explanation;
for(int i=0; i<Tasks[TaskID]->ActivityCount; i++) {
@ -1936,7 +1936,7 @@ void ClientTaskState::IncrementDoneCount(Client *c, TaskInformation *Task, int T
// Send the updated task/activity list to the client
taskmanager->SendSingleActiveTaskToClient(c, *info, TaskComplete, false);
// Inform the client the task has been updated, both by a chat message
c->Message(0, "Your task '%s' has been updated.", Task->Title.c_str());
c->Message(Chat::White, "Your task '%s' has been updated.", Task->Title.c_str());
if(Task->Activity[ActivityID].GoalMethod != METHODQUEST) {
if (!ignore_quest_update){
@ -2001,7 +2001,7 @@ void ClientTaskState::RewardTask(Client *c, TaskInformation *Task) {
c->SummonItem(Task->RewardID);
Item = database.GetItem(Task->RewardID);
if(Item)
c->Message(15, "You receive %s as a reward.", Item->Name);
c->Message(Chat::Yellow, "You receive %s as a reward.", Item->Name);
}
break;
}
@ -2012,7 +2012,7 @@ void ClientTaskState::RewardTask(Client *c, TaskInformation *Task) {
c->SummonItem(RewardList[i]);
Item = database.GetItem(RewardList[i]);
if(Item)
c->Message(15, "You receive %s as a reward.", Item->Name);
c->Message(Chat::Yellow, "You receive %s as a reward.", Item->Name);
}
break;
}
@ -2024,7 +2024,7 @@ void ClientTaskState::RewardTask(Client *c, TaskInformation *Task) {
}
if (!Task->completion_emote.empty())
c->SendColoredText(CC_Yellow, Task->completion_emote); // unsure if they use this packet or color, should work
c->SendColoredText(Chat::Yellow, Task->completion_emote); // unsure if they use this packet or color, should work
// just use normal NPC faction ID stuff
if (Task->faction_reward)
@ -2081,7 +2081,7 @@ void ClientTaskState::RewardTask(Client *c, TaskInformation *Task) {
CashMessage += " copper";
}
CashMessage += " pieces.";
c->Message(15,CashMessage.c_str());
c->Message(Chat::Yellow,CashMessage.c_str());
}
int32 EXPReward = Task->XPReward;
if(EXPReward > 0) {
@ -2306,12 +2306,12 @@ void ClientTaskState::ResetTaskActivity(Client *c, int TaskID, int ActivityID)
void ClientTaskState::ShowClientTasks(Client *c)
{
c->Message(0, "Task Information:");
c->Message(Chat::White, "Task Information:");
if (ActiveTask.TaskID != TASKSLOTEMPTY) {
c->Message(0, "Task: %i %s", ActiveTask.TaskID, taskmanager->Tasks[ActiveTask.TaskID]->Title.c_str());
c->Message(0, " Description: [%s]\n", taskmanager->Tasks[ActiveTask.TaskID]->Description.c_str());
c->Message(Chat::White, "Task: %i %s", ActiveTask.TaskID, taskmanager->Tasks[ActiveTask.TaskID]->Title.c_str());
c->Message(Chat::White, " Description: [%s]\n", taskmanager->Tasks[ActiveTask.TaskID]->Description.c_str());
for (int j = 0; j < taskmanager->GetActivityCount(ActiveTask.TaskID); j++) {
c->Message(0, " Activity: %2d, DoneCount: %2d, Status: %d (0=Hidden, 1=Active, 2=Complete)",
c->Message(Chat::White, " Activity: %2d, DoneCount: %2d, Status: %d (0=Hidden, 1=Active, 2=Complete)",
ActiveTask.Activity[j].ActivityID, ActiveTask.Activity[j].DoneCount,
ActiveTask.Activity[j].State);
}
@ -2321,11 +2321,11 @@ void ClientTaskState::ShowClientTasks(Client *c)
if (ActiveQuests[i].TaskID == TASKSLOTEMPTY)
continue;
c->Message(0, "Quest: %i %s", ActiveQuests[i].TaskID,
c->Message(Chat::White, "Quest: %i %s", ActiveQuests[i].TaskID,
taskmanager->Tasks[ActiveQuests[i].TaskID]->Title.c_str());
c->Message(0, " Description: [%s]\n", taskmanager->Tasks[ActiveQuests[i].TaskID]->Description.c_str());
c->Message(Chat::White, " Description: [%s]\n", taskmanager->Tasks[ActiveQuests[i].TaskID]->Description.c_str());
for (int j = 0; j < taskmanager->GetActivityCount(ActiveQuests[i].TaskID); j++) {
c->Message(0, " Activity: %2d, DoneCount: %2d, Status: %d (0=Hidden, 1=Active, 2=Complete)",
c->Message(Chat::White, " Activity: %2d, DoneCount: %2d, Status: %d (0=Hidden, 1=Active, 2=Complete)",
ActiveQuests[i].Activity[j].ActivityID, ActiveQuests[i].Activity[j].DoneCount,
ActiveQuests[i].Activity[j].State);
}
@ -3204,14 +3204,14 @@ void ClientTaskState::RemoveTask(Client *c, int sequenceNumber, TaskType type)
void ClientTaskState::AcceptNewTask(Client *c, int TaskID, int NPCID, bool enforce_level_requirement)
{
if (!taskmanager || TaskID < 0 || TaskID >= MAXTASKS) {
c->Message(13, "Task system not functioning, or TaskID %i out of range.", TaskID);
c->Message(Chat::Red, "Task system not functioning, or TaskID %i out of range.", TaskID);
return;
}
auto task = taskmanager->Tasks[TaskID];
if (task == nullptr) {
c->Message(13, "Invalid TaskID %i", TaskID);
c->Message(Chat::Red, "Invalid TaskID %i", TaskID);
return;
}
@ -3235,7 +3235,7 @@ void ClientTaskState::AcceptNewTask(Client *c, int TaskID, int NPCID, bool enfor
}
if (max_tasks) {
c->Message(13, "You already have the maximum allowable number of active tasks (%i)", MAXACTIVEQUESTS);
c->Message(Chat::Red, "You already have the maximum allowable number of active tasks (%i)", MAXACTIVEQUESTS);
return;
}
@ -3243,14 +3243,14 @@ void ClientTaskState::AcceptNewTask(Client *c, int TaskID, int NPCID, bool enfor
if (task->type == TaskType::Quest) {
for (int i = 0; i < MAXACTIVEQUESTS; i++) {
if (ActiveQuests[i].TaskID == TaskID) {
c->Message(13, "You have already been assigned this task.");
c->Message(Chat::Red, "You have already been assigned this task.");
return;
}
}
}
if (enforce_level_requirement && !taskmanager->AppropriateLevel(TaskID, c->GetLevel())) {
c->Message(13, "You are outside the level range of this task.");
c->Message(Chat::Red, "You are outside the level range of this task.");
return;
}
@ -3287,7 +3287,7 @@ void ClientTaskState::AcceptNewTask(Client *c, int TaskID, int NPCID, bool enfor
// This shouldn't happen unless there is a bug in the handling of ActiveTaskCount somewhere
if (active_slot == nullptr) {
c->Message(13, "You already have the maximum allowable number of active tasks (%i)", MAXACTIVEQUESTS);
c->Message(Chat::Red, "You already have the maximum allowable number of active tasks (%i)", MAXACTIVEQUESTS);
return;
}
@ -3309,14 +3309,14 @@ void ClientTaskState::AcceptNewTask(Client *c, int TaskID, int NPCID, bool enfor
ActiveTaskCount++;
taskmanager->SendSingleActiveTaskToClient(c, *active_slot, false, true);
c->Message(0, "You have been assigned the task '%s'.", taskmanager->Tasks[TaskID]->Title.c_str());
c->Message(Chat::White, "You have been assigned the task '%s'.", taskmanager->Tasks[TaskID]->Title.c_str());
std::string buf = std::to_string(TaskID);
NPC *npc = entity_list.GetID(NPCID)->CastToNPC();
if(!npc) {
c->Message(clientMessageYellow, "Task Giver ID is %i", NPCID);
c->Message(clientMessageError, "Unable to find NPC to send EVENT_TASKACCEPTED to. Report this bug.");
c->Message(Chat::Yellow, "Task Giver ID is %i", NPCID);
c->Message(Chat::Red, "Unable to find NPC to send EVENT_TASKACCEPTED to. Report this bug.");
return;
}

View File

@ -80,7 +80,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
if (itemsFound != 2)
{
user->Message(13, "Error: Too many/few items in augmentation container.");
user->Message(Chat::Red, "Error: Too many/few items in augmentation container.");
return;
}
}
@ -90,7 +90,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
if(!container)
{
Log(Logs::General, Logs::Error, "Player tried to augment an item without a container set.");
user->Message(13, "Error: This item is not a container!");
user->Message(Chat::Red, "Error: This item is not a container!");
return;
}
@ -115,7 +115,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
{
// Either 2 augmentable items found or none found
// This should never occur due to client restrictions, but prevent in case of a hack
user->Message(13, "Error: Must be 1 augmentable item in the sealer");
user->Message(Chat::Red, "Error: Must be 1 augmentable item in the sealer");
return;
}
}
@ -124,11 +124,11 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
// This happens if the augment button is clicked more than once quickly while augmenting
if (!container->GetItem(0))
{
user->Message(13, "Error: No item in slot 0 of sealer");
user->Message(Chat::Red, "Error: No item in slot 0 of sealer");
}
if (!container->GetItem(1))
{
user->Message(13, "Error: No item in slot 1 of sealer");
user->Message(Chat::Red, "Error: No item in slot 1 of sealer");
}
return;
}
@ -160,7 +160,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
}
else
{
user->Message(13, "Error: No available slot for augment");
user->Message(Chat::Red, "Error: No available slot for augment");
}
}
else
@ -170,7 +170,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
if (!isSolvent && auged_with->GetItem()->ItemType != EQEmu::item::ItemTypeAugmentationDistiller)
{
Log(Logs::General, Logs::Error, "Player tried to remove an augment without a solvent or distiller.");
user->Message(13, "Error: Missing an augmentation solvent or distiller for removing this augment.");
user->Message(Chat::Red, "Error: Missing an augmentation solvent or distiller for removing this augment.");
return;
}
@ -180,7 +180,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
if (!isSolvent && auged_with->GetItem()->ID != aug->GetItem()->AugDistiller)
{
Log(Logs::General, Logs::Error, "Player tried to safely remove an augment with the wrong distiller (item %u vs expected %u).", auged_with->GetItem()->ID, aug->GetItem()->AugDistiller);
user->Message(13, "Error: Wrong augmentation distiller for safely removing this augment.");
user->Message(Chat::Red, "Error: Wrong augmentation distiller for safely removing this augment.");
return;
}
std::vector<EQEmu::Any> args;
@ -266,7 +266,7 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
if (in_combine->container_slot == EQEmu::invslot::SLOT_TRADESKILL_EXPERIMENT_COMBINE) {
if(!worldo) {
user->Message(13, "Error: Server is not aware of the tradeskill container you are attempting to use");
user->Message(Chat::Red, "Error: Server is not aware of the tradeskill container you are attempting to use");
return;
}
c_type = worldo->m_type;
@ -291,7 +291,7 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
}
if (!inst || !inst->IsType(EQEmu::item::ItemClassBag)) {
user->Message(13, "Error: Server does not recognize specified tradeskill container");
user->Message(Chat::Red, "Error: Server does not recognize specified tradeskill container");
return;
}
@ -304,12 +304,12 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
user->DeleteItemInInventory(EQEmu::InventoryProfile::CalcSlotId(in_combine->container_slot, 0), 0, true);
container->Clear();
user->SummonItem(new_weapon->ID, inst->GetCharges(), inst->GetAugmentItemID(0), inst->GetAugmentItemID(1), inst->GetAugmentItemID(2), inst->GetAugmentItemID(3), inst->GetAugmentItemID(4), inst->GetAugmentItemID(5), inst->IsAttuned(), EQEmu::invslot::slotCursor, container->GetItem()->Icon, atoi(container->GetItem()->IDFile + 2));
user->Message_StringID(4, TRANSFORM_COMPLETE, inst->GetItem()->Name);
user->MessageString(Chat::LightBlue, TRANSFORM_COMPLETE, inst->GetItem()->Name);
if (RuleB(Inventory, DeleteTransformationMold))
user->DeleteItemInInventory(in_combine->container_slot, 0, true);
}
else if (inst) {
user->Message_StringID(4, TRANSFORM_FAILED, inst->GetItem()->Name);
user->MessageString(Chat::LightBlue, TRANSFORM_FAILED, inst->GetItem()->Name);
}
auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
user->QueuePacket(outapp);
@ -324,10 +324,10 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
user->DeleteItemInInventory(EQEmu::InventoryProfile::CalcSlotId(in_combine->container_slot, 0), 0, true);
container->Clear();
user->SummonItem(new_weapon->ID, inst->GetCharges(), inst->GetAugmentItemID(0), inst->GetAugmentItemID(1), inst->GetAugmentItemID(2), inst->GetAugmentItemID(3), inst->GetAugmentItemID(4), inst->GetAugmentItemID(5), inst->IsAttuned(), EQEmu::invslot::slotCursor, 0, 0);
user->Message_StringID(4, TRANSFORM_COMPLETE, inst->GetItem()->Name);
user->MessageString(Chat::LightBlue, TRANSFORM_COMPLETE, inst->GetItem()->Name);
}
else if (inst) {
user->Message_StringID(4, DETRANSFORM_FAILED, inst->GetItem()->Name);
user->MessageString(Chat::LightBlue, DETRANSFORM_FAILED, inst->GetItem()->Name);
}
auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
user->QueuePacket(outapp);
@ -337,7 +337,7 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
DBTradeskillRecipe_Struct spec;
if (!database.GetTradeRecipe(container, c_type, some_id, user->CharacterID(), &spec)) {
user->Message_StringID(MT_Emote,TRADESKILL_NOCOMBINE);
user->MessageString(Chat::Emote,TRADESKILL_NOCOMBINE);
auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
user->QueuePacket(outapp);
safe_delete(outapp);
@ -352,7 +352,7 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
// bit 6 (0x20): unlisted recipe flag
if ((spec.must_learn&0xF) == 1 && !spec.has_learnt) {
// Made up message for the client. Just giving a DNC is the other option.
user->Message(4, "You need to learn how to combine these first.");
user->Message(Chat::LightBlue, "You need to learn how to combine these first.");
auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
user->QueuePacket(outapp);
safe_delete(outapp);
@ -361,7 +361,7 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
// Character does not have the required skill.
if(spec.skill_needed > 0 && user->GetSkill(spec.tradeskill) < spec.skill_needed ) {
// Notify client.
user->Message(4, "You are not skilled enough.");
user->Message(Chat::LightBlue, "You are not skilled enough.");
auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
user->QueuePacket(outapp);
safe_delete(outapp);
@ -371,23 +371,23 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
//changing from a switch to string of if's since we don't need to iterate through all of the skills in the SkillType enum
if (spec.tradeskill == EQEmu::skills::SkillAlchemy) {
if (user_pp.class_ != SHAMAN) {
user->Message(13, "This tradeskill can only be performed by a shaman.");
user->Message(Chat::Red, "This tradeskill can only be performed by a shaman.");
return;
}
else if (user_pp.level < MIN_LEVEL_ALCHEMY) {
user->Message(13, "You cannot perform alchemy until you reach level %i.", MIN_LEVEL_ALCHEMY);
user->Message(Chat::Red, "You cannot perform alchemy until you reach level %i.", MIN_LEVEL_ALCHEMY);
return;
}
}
else if (spec.tradeskill == EQEmu::skills::SkillTinkering) {
if (user_pp.race != GNOME) {
user->Message(13, "Only gnomes can tinker.");
user->Message(Chat::Red, "Only gnomes can tinker.");
return;
}
}
else if (spec.tradeskill == EQEmu::skills::SkillMakePoison) {
if (user_pp.class_ != ROGUE) {
user->Message(13, "Only rogues can mix poisons.");
user->Message(Chat::Red, "Only rogues can mix poisons.");
return;
}
}
@ -422,7 +422,7 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
// Update Made count
if (success) {
if (!spec.has_learnt && ((spec.must_learn&0x10) != 0x10)) {
user->Message_StringID(4, TRADESKILL_LEARN_RECIPE, spec.name.c_str());
user->MessageString(Chat::LightBlue, TRADESKILL_LEARN_RECIPE, spec.name.c_str());
}
database.UpdateRecipeMadecount(spec.recipe_id, user->CharacterID(), spec.madecount+1);
}
@ -469,7 +469,7 @@ void Object::HandleAutoCombine(Client* user, const RecipeAutoCombine_Struct* rac
// This shouldn't happen.
if ((spec.must_learn&0xf) && !spec.has_learnt) {
// Made up message for the client. Just giving a DNC is the other option.
user->Message(4, "You need to learn how to combine these first.");
user->Message(Chat::LightBlue, "You need to learn how to combine these first.");
user->QueuePacket(outapp);
safe_delete(outapp);
return;
@ -540,13 +540,13 @@ void Object::HandleAutoCombine(Client* user, const RecipeAutoCombine_Struct* rac
safe_delete(outapp);
user->Message_StringID(MT_Skills, TRADESKILL_MISSING_COMPONENTS);
user->MessageString(Chat::Skills, TRADESKILL_MISSING_COMPONENTS);
for (auto it = MissingItems.begin(); it != MissingItems.end(); ++it) {
const EQEmu::ItemData* item = database.GetItem(*it);
if(item)
user->Message_StringID(MT_Skills, TRADESKILL_MISSING_ITEM, item->Name);
user->MessageString(Chat::Skills, TRADESKILL_MISSING_ITEM, item->Name);
}
return;
@ -593,7 +593,7 @@ void Object::HandleAutoCombine(Client* user, const RecipeAutoCombine_Struct* rac
if (success) {
if (!spec.has_learnt && ((spec.must_learn & 0x10) != 0x10)) {
user->Message_StringID(4, TRADESKILL_LEARN_RECIPE, spec.name.c_str());
user->MessageString(Chat::LightBlue, TRADESKILL_LEARN_RECIPE, spec.name.c_str());
}
database.UpdateRecipeMadecount(spec.recipe_id, user->CharacterID(), spec.madecount+1);
}
@ -951,7 +951,7 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
// above critical still stands.
// Mastery modifier is: 10%/25%/50% for rank one/two/three
chance = 95.0f + (float(user_skill - spec->trivial) / 40.0f);
Message_StringID(MT_Emote, TRADESKILL_TRIVIAL);
MessageString(Chat::Emote, TRADESKILL_TRIVIAL);
} else if(chance < 5) {
// Minimum chance is always 5
chance = 5;
@ -978,7 +978,7 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
if(over_trivial < 0)
CheckIncreaseTradeskill(bonusstat, stat_modifier, skillup_modifier, success_modifier, spec->tradeskill);
Message_StringID(4, TRADESKILL_SUCCEED, spec->name.c_str());
MessageString(Chat::LightBlue, TRADESKILL_SUCCEED, spec->name.c_str());
Log(Logs::Detail, Logs::Tradeskills, "Tradeskill success");
@ -988,7 +988,7 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
SummonItem(itr->first, itr->second);
item = database.GetItem(itr->first);
if (this->GetGroup()) {
entity_list.MessageGroup(this, true, MT_Skills, "%s has successfully fashioned %s!", GetName(), item->Name);
entity_list.MessageGroup(this, true, Chat::Skills, "%s has successfully fashioned %s!", GetName(), item->Name);
}
/* QS: Player_Log_Trade_Skill_Events */
@ -1010,12 +1010,12 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
if(over_trivial < 0)
CheckIncreaseTradeskill(bonusstat, stat_modifier, skillup_modifier, success_modifier, spec->tradeskill);
Message_StringID(MT_Emote,TRADESKILL_FAILED);
MessageString(Chat::Emote,TRADESKILL_FAILED);
Log(Logs::Detail, Logs::Tradeskills, "Tradeskill failed");
if (this->GetGroup())
{
entity_list.MessageGroup(this,true,MT_Skills,"%s was unsuccessful in %s tradeskill attempt.",GetName(),this->GetGender() == 0 ? "his" : this->GetGender() == 1 ? "her" : "its");
entity_list.MessageGroup(this, true, Chat::Skills,"%s was unsuccessful in %s tradeskill attempt.",GetName(),this->GetGender() == 0 ? "his" : this->GetGender() == 1 ? "her" : "its");
}
@ -1404,7 +1404,7 @@ void Client::LearnRecipe(uint32 recipeID)
if (row[1] != nullptr)
return;
Message_StringID(4, TRADESKILL_LEARN_RECIPE, row[0]);
MessageString(Chat::LightBlue, TRADESKILL_LEARN_RECIPE, row[0]);
// Actually learn the recipe now
query = StringFormat("INSERT INTO char_recipe_list "
"SET recipe_id = %u, char_id = %u, madecount = 0 "

View File

@ -102,7 +102,7 @@ void Trade::AddEntity(uint16 trade_slot_id, uint32 stack_size) {
EQEmu::ItemInstance* inst = client->GetInv().GetItem(EQEmu::invslot::slotCursor);
if (!inst) {
client->Message(13, "Error: Could not find item on your cursor!");
client->Message(Chat::Red, "Error: Could not find item on your cursor!");
return;
}
@ -1110,7 +1110,7 @@ void Client::Trader_EndTrader() {
tdis->Unknown000 = 0;
tdis->TraderID = Customer->GetID();
tdis->Unknown012 = 0;
Customer->Message(13, "The Trader is no longer open for business");
Customer->Message(Chat::Red, "The Trader is no longer open for business");
for(int i = 0; i < 80; i++) {
if(gis->Items[i] != 0) {
@ -1628,8 +1628,8 @@ void Client::BuyTraderItem(TraderBuy_Struct* tbs, Client* Trader, const EQApplic
Log(Logs::Detail, Logs::Trading, "Actual quantity that will be traded is %i", outtbs->Quantity);
if((tbs->Price * outtbs->Quantity) <= 0) {
Message(13, "Internal error. Aborting trade. Please report this to the ServerOP. Error code is 1");
Trader->Message(13, "Internal error. Aborting trade. Please report this to the ServerOP. Error code is 1");
Message(Chat::Red, "Internal error. Aborting trade. Please report this to the ServerOP. Error code is 1");
Trader->Message(Chat::Red, "Internal error. Aborting trade. Please report this to the ServerOP. Error code is 1");
Log(Logs::General, Logs::Error, "Bazaar: Zero price transaction between %s and %s aborted."
"Item: %s, Charges: %i, TBS: Qty %i, Price: %i",
GetName(), Trader->GetName(),
@ -1642,7 +1642,7 @@ void Client::BuyTraderItem(TraderBuy_Struct* tbs, Client* Trader, const EQApplic
uint64 TotalTransactionValue = static_cast<uint64>(tbs->Price) * static_cast<uint64>(outtbs->Quantity);
if(TotalTransactionValue > MAX_TRANSACTION_VALUE) {
Message(13, "That would exceed the single transaction limit of %u platinum.", MAX_TRANSACTION_VALUE / 1000);
Message(Chat::Red, "That would exceed the single transaction limit of %u platinum.", MAX_TRANSACTION_VALUE / 1000);
TradeRequestFailed(app);
safe_delete(outapp);
return;
@ -1754,7 +1754,7 @@ void Client::SendBazaarWelcome()
return;
auto row = results.begin();
Message(10, "There are %i Buyers waiting to purchase your loot. Type /barter to search for them, "
Message(Chat::NPCQuestSay, "There are %i Buyers waiting to purchase your loot. Type /barter to search for them, "
"or use /buyer to set up your own Buy Lines.", atoi(row[0]));
}
@ -1945,7 +1945,7 @@ void Client::SendBazaarResults(uint32 TraderID, uint32 Class_, uint32 Race, uint
uint32 ID = 0;
if (results.RowCount() == static_cast<unsigned long>(RuleI(Bazaar, MaxSearchResults)))
Message(15, "Your search reached the limit of %i results. Please narrow your search down by selecting more options.",
Message(Chat::Yellow, "Your search reached the limit of %i results. Please narrow your search down by selecting more options.",
RuleI(Bazaar, MaxSearchResults));
if(results.RowCount() == 0) {
@ -2057,7 +2057,7 @@ static void UpdateTraderCustomerItemsAdded(uint32 CustomerID, TraderCharges_Stru
if(!inst) return;
Customer->Message(13, "The Trader has put up %s for sale.", item->Name);
Customer->Message(Chat::Red, "The Trader has put up %s for sale.", item->Name);
for(int i = 0; i < 80; i++) {
@ -2105,7 +2105,7 @@ static void UpdateTraderCustomerPriceChanged(uint32 CustomerID, TraderCharges_St
tdis->Unknown000 = 0;
tdis->TraderID = Customer->GetID();
tdis->Unknown012 = 0;
Customer->Message(13, "The Trader has withdrawn the %s from sale.", item->Name);
Customer->Message(Chat::Red, "The Trader has withdrawn the %s from sale.", item->Name);
for(int i = 0; i < 80; i++) {
@ -2147,7 +2147,7 @@ static void UpdateTraderCustomerPriceChanged(uint32 CustomerID, TraderCharges_St
inst->SetMerchantCount(Charges);
// Let the customer know the price in the window has suddenly just changed on them.
Customer->Message(13, "The Trader has changed the price of %s.", item->Name);
Customer->Message(Chat::Red, "The Trader has changed the price of %s.", item->Name);
for(int i = 0; i < 80; i++) {
if((gis->ItemID[i] != ItemID) ||
@ -2286,7 +2286,7 @@ void Client::HandleTraderPriceUpdate(const EQApplicationPacket *app) {
}
if(SameItemWithDifferingCharges)
Message(13, "Warning: You have more than one %s with different charges. They have all been added for sale "
Message(Chat::Red, "Warning: You have more than one %s with different charges. They have all been added for sale "
"at the same price.", item->Name);
}
@ -2333,8 +2333,8 @@ void Client::HandleTraderPriceUpdate(const EQApplicationPacket *app) {
tpus->SubAction = BazaarPriceChange_Fail;
QueuePacket(app);
Trader_EndTrader();
Message(13, "You must remove the item from sale before you can increase the price while a customer is browsing.");
Message(13, "Click 'Begin Trader' to restart Trader mode with the increased price for this item.");
Message(Chat::Red, "You must remove the item from sale before you can increase the price while a customer is browsing.");
Message(Chat::Red, "Click 'Begin Trader' to restart Trader mode with the increased price for this item.");
safe_delete(gis);
return;
}
@ -2387,11 +2387,11 @@ void Client::SendBuyerResults(char* searchString, uint32 searchID) {
int numberOfRows = results.RowCount();
if(numberOfRows == RuleI(Bazaar, MaxBarterSearchResults))
Message(15, "Your search found too many results; some are not displayed.");
Message(Chat::Yellow, "Your search found too many results; some are not displayed.");
else if(strlen(searchString) == 0)
Message(10, "There are %i Buy Lines.", numberOfRows);
Message(Chat::NPCQuestSay, "There are %i Buy Lines.", numberOfRows);
else
Message(10, "There are %i Buy Lines that match the search string '%s'.", numberOfRows, searchString);
Message(Chat::NPCQuestSay, "There are %i Buy Lines that match the search string '%s'.", numberOfRows, searchString);
if(numberOfRows == 0)
return;
@ -2466,7 +2466,7 @@ void Client::ShowBuyLines(const EQApplicationPacket *app) {
if(!Buyer) {
bir->Approval = 0; // Tell the client that the Buyer is unavailable
QueuePacket(app);
Message(13, "The Buyer has gone away.");
Message(Chat::Red, "The Buyer has gone away.");
return;
}
@ -2475,14 +2475,14 @@ void Client::ShowBuyLines(const EQApplicationPacket *app) {
QueuePacket(app);
if(bir->Approval == 0) {
Message_StringID(clientMessageYellow, TRADER_BUSY);
MessageString(Chat::Yellow, TRADER_BUSY);
return;
}
const char *WelcomeMessagePointer = Buyer->GetBuyerWelcomeMessage();
if(strlen(WelcomeMessagePointer) > 0)
Message(10, "%s greets you, '%s'.", Buyer->GetName(), WelcomeMessagePointer);
Message(Chat::NPCQuestSay, "%s greets you, '%s'.", Buyer->GetName(), WelcomeMessagePointer);
auto outapp = new EQApplicationPacket(OP_Barter, sizeof(BuyerBrowsing_Struct));
@ -2563,7 +2563,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) {
if(!item || !Quantity || !Price || !QtyBuyerWants) return;
if (m_inv.HasItem(ItemID, Quantity, invWhereWorn | invWherePersonal | invWhereCursor) == INVALID_INDEX) {
Message(13, "You do not have %i %s on you.", Quantity, item->Name);
Message(Chat::Red, "You do not have %i %s on you.", Quantity, item->Name);
return;
}
@ -2571,37 +2571,37 @@ void Client::SellToBuyer(const EQApplicationPacket *app) {
Client *Buyer = entity_list.GetClientByID(BuyerID);
if(!Buyer || !Buyer->IsBuyer()) {
Message(13, "The Buyer has gone away.");
Message(Chat::Red, "The Buyer has gone away.");
return;
}
// For Stackable items, HasSpaceForItem will try check if there is space to stack with existing stacks in
// the buyer inventory.
if(!(Buyer->GetInv().HasSpaceForItem(item, Quantity))) {
Message(13, "The Buyer does not have space for %i %s", Quantity, item->Name);
Message(Chat::Red, "The Buyer does not have space for %i %s", Quantity, item->Name);
return;
}
if((static_cast<uint64>(Quantity) * static_cast<uint64>(Price)) > MAX_TRANSACTION_VALUE) {
Message(13, "That would exceed the single transaction limit of %u platinum.", MAX_TRANSACTION_VALUE / 1000);
Message(Chat::Red, "That would exceed the single transaction limit of %u platinum.", MAX_TRANSACTION_VALUE / 1000);
return;
}
if(!Buyer->HasMoney(Quantity * Price)) {
Message(13, "The Buyer does not have sufficient money to purchase that quantity of %s.", item->Name);
Buyer->Message(13, "%s tried to sell you %i %s, but you have insufficient funds.", GetName(), Quantity, item->Name);
Message(Chat::Red, "The Buyer does not have sufficient money to purchase that quantity of %s.", item->Name);
Buyer->Message(Chat::Red, "%s tried to sell you %i %s, but you have insufficient funds.", GetName(), Quantity, item->Name);
return;
}
if(Buyer->CheckLoreConflict(item)) {
Message(13, "That item is LORE and the Buyer already has one.");
Buyer->Message(13, "%s tried to sell you %s but this item is LORE and you already have one.",
Message(Chat::Red, "That item is LORE and the Buyer already has one.");
Buyer->Message(Chat::Red, "%s tried to sell you %s but this item is LORE and you already have one.",
GetName(), item->Name);
return;
}
if(item->NoDrop == 0) {
Message(13, "That item is NODROP.");
Message(Chat::Red, "That item is NODROP.");
return;
}
@ -2620,7 +2620,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) {
break;
}
Log(Logs::General, Logs::Error, "Unexpected error while moving item from seller to buyer.");
Message(13, "Internal error while processing transaction.");
Message(Chat::Red, "Internal error while processing transaction.");
return;
}
@ -2628,7 +2628,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) {
if(!ItemToTransfer || !Buyer->MoveItemToInventory(ItemToTransfer, true)) {
Log(Logs::General, Logs::Error, "Unexpected error while moving item from seller to buyer.");
Message(13, "Internal error while processing transaction.");
Message(Chat::Red, "Internal error while processing transaction.");
if(ItemToTransfer)
safe_delete(ItemToTransfer);
@ -2666,7 +2666,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) {
if (SellerSlot == INVALID_INDEX) {
Log(Logs::General, Logs::Error, "Unexpected error while moving item from seller to buyer.");
Message(13, "Internal error while processing transaction.");
Message(Chat::Red, "Internal error while processing transaction.");
return;
}
@ -2674,7 +2674,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) {
if(!ItemToTransfer) {
Log(Logs::General, Logs::Error, "Unexpected error while moving item from seller to buyer.");
Message(13, "Internal error while processing transaction.");
Message(Chat::Red, "Internal error while processing transaction.");
return;
}
@ -2686,7 +2686,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) {
if(!Buyer->MoveItemToInventory(ItemToTransfer, true)) {
Log(Logs::General, Logs::Error, "Unexpected error while moving item from seller to buyer.");
Message(13, "Internal error while processing transaction.");
Message(Chat::Red, "Internal error while processing transaction.");
safe_delete(ItemToTransfer);
return;
}
@ -2721,7 +2721,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) {
if(!Buyer->MoveItemToInventory(ItemToTransfer, true)) {
Log(Logs::General, Logs::Error, "Unexpected error while moving item from seller to buyer.");
Message(13, "Internal error while processing transaction.");
Message(Chat::Red, "Internal error while processing transaction.");
safe_delete(ItemToTransfer);
return;
}
@ -2965,19 +2965,19 @@ void Client::UpdateBuyLine(const EQApplicationPacket *app) {
}
else {
if(ItemCount > 0)
Message(13, "Buy line %s disabled as Item Compensation is not currently supported.", ItemName);
Message(Chat::Red, "Buy line %s disabled as Item Compensation is not currently supported.", ItemName);
else if(Quantity <= 0)
Message(13, "Buy line %s disabled as the quantity is invalid.", ItemName);
Message(Chat::Red, "Buy line %s disabled as the quantity is invalid.", ItemName);
else if(LoreConflict)
Message(13, "Buy line %s disabled as the item is LORE and you have one already.", ItemName);
Message(Chat::Red, "Buy line %s disabled as the item is LORE and you have one already.", ItemName);
else if(item->NoDrop == 0)
Message(13, "Buy line %s disabled as the item is NODROP.", ItemName);
Message(Chat::Red, "Buy line %s disabled as the item is NODROP.", ItemName);
else if(ToggleOnOff)
Message(13, "Buy line %s disabled due to insufficient funds.", ItemName);
Message(Chat::Red, "Buy line %s disabled due to insufficient funds.", ItemName);
else
database.RemoveBuyLine(CharacterID(), BuySlot);
@ -3047,7 +3047,7 @@ void Client::BuyerItemSearch(const EQApplicationPacket *app) {
break;
}
if (Count == MAX_BUYER_ITEMSEARCH_RESULTS)
Message(15, "Your search returned more than %i results. Only the first %i are displayed.",
Message(Chat::Yellow, "Your search returned more than %i results. Only the first %i are displayed.",
MAX_BUYER_ITEMSEARCH_RESULTS, MAX_BUYER_ITEMSEARCH_RESULTS);
bisr->Action = Barter_BuyerSearch;

View File

@ -373,13 +373,13 @@ void EntityList::GetTrapInfo(Client* client)
if (cur->IsTrap())
{
bool isset = (cur->chkarea_timer.Enabled() && !cur->reset_timer.Enabled());
client->Message(CC_Default, " Trap: (%d) found at %0.2f,%0.2f,%0.2f. Times Triggered: %d Is Active: %d Group: %d Message: %s", cur->trap_id, cur->m_Position.x, cur->m_Position.y, cur->m_Position.z, cur->times_triggered, isset, cur->group, cur->message.c_str());
client->Message(Chat::Default, " Trap: (%d) found at %0.2f,%0.2f,%0.2f. Times Triggered: %d Is Active: %d Group: %d Message: %s", cur->trap_id, cur->m_Position.x, cur->m_Position.y, cur->m_Position.z, cur->times_triggered, isset, cur->group, cur->message.c_str());
++count;
}
++it;
}
client->Message(CC_Default, "%d traps found.", count);
client->Message(Chat::Default, "%d traps found.", count);
}
void EntityList::ClearTrapPointers()

View File

@ -93,7 +93,7 @@ void Client::ToggleTribute(bool enabled) {
}
if(cost > m_pp.tribute_points) {
Message(13, "You do not have enough tribute points to activate your tribute!");
Message(Chat::Red, "You do not have enough tribute points to activate your tribute!");
ToggleTribute(false);
return;
}
@ -250,7 +250,7 @@ int32 Client::TributeItem(uint32 slot, uint32 quantity) {
pts = mod_tribute_item_value(pts, m_inv[slot]);
if(pts < 1) {
Message(13, "This item is worthless for favor.");
Message(Chat::Red, "This item is worthless for favor.");
return(0);
}
@ -277,7 +277,7 @@ int32 Client::TributeItem(uint32 slot, uint32 quantity) {
//returns the number of points received from the tribute
int32 Client::TributeMoney(uint32 platinum) {
if(!TakeMoneyFromPP(platinum * 1000)) {
Message(13, "You do not have that much money!");
Message(Chat::Red, "You do not have that much money!");
return(0);
}

View File

@ -203,11 +203,11 @@ void Mob::Tune_FindACByPctMitigation(Mob* defender, Mob *attacker, float pct_mit
Message(0, "#Tune - [WARNING] Mitigation can not be further decreased due to minium hit value (%i).",minhit);
if (defender->IsNPC()){
Message(7, "#Tune - Recommended NPC AC ADJUSTMENT ( %i ) on ' %s ' for an average mitigation of (+ %.0f) pct from attacker ' %s '.",add_ac,defender->GetCleanName(), pct_mitigation, attacker->GetCleanName());
Message(Chat::LightGray, "#Tune - Recommended NPC AC ADJUSTMENT ( %i ) on ' %s ' for an average mitigation of (+ %.0f) pct from attacker ' %s '.",add_ac,defender->GetCleanName(), pct_mitigation, attacker->GetCleanName());
Message(0, "#SET: [NPC Attack STAT] = [%i]",add_ac + defender->CastToNPC()->GetRawAC());
}
if (defender->IsClient()){
Message(7, "#Tune - Recommended CLIENT AC ADJUSTMENT ( %i ) on ' %s ' for an average mitigation of (+ %.0f) pct from attacker ' %s '.",add_ac,defender->GetCleanName(), pct_mitigation, attacker->GetCleanName());
Message(Chat::LightGray, "#Tune - Recommended CLIENT AC ADJUSTMENT ( %i ) on ' %s ' for an average mitigation of (+ %.0f) pct from attacker ' %s '.",add_ac,defender->GetCleanName(), pct_mitigation, attacker->GetCleanName());
Message(0, "#Modify (+/-): [Client AC STAT/SE_AC(1)] [%i]",add_ac);
}
@ -249,9 +249,9 @@ int32 Mob::Tune_MeleeMitigation(Mob* GM, Mob *attacker, int32 damage, int32 minh
if (Msg){
GM->Message(0, "######### Melee Mitigation Report: Start [Detail Level %i]#########", Msg);
GM->Message(0, "#ATTACKER: %s", attacker->GetCleanName());
GM->Message(0, "#DEFENDER: %s", defender->GetCleanName());
GM->Message(Chat::White, "######### Melee Mitigation Report: Start [Detail Level %i]#########", Msg);
GM->Message(Chat::White, "#ATTACKER: %s", attacker->GetCleanName());
GM->Message(Chat::White, "#DEFENDER: %s", defender->GetCleanName());
}
if (RuleB(Combat, UseIntervalAC)) {
@ -264,16 +264,16 @@ int32 Mob::Tune_MeleeMitigation(Mob* GM, Mob *attacker, int32 damage, int32 minh
float weight = 0.0;
if (Msg >= 2){
GM->Message(0, " ");
GM->Message(0, "### Calculate Mitigation Rating ###");
GM->Message(Chat::White, " ");
GM->Message(Chat::White, "### Calculate Mitigation Rating ###");
if (aabonuses.CombatStability)
GM->Message(0, "# %i #### DEFENDER SE_CombatStability(259) AA Bonus", aabonuses.CombatStability);
GM->Message(Chat::White, "# %i #### DEFENDER SE_CombatStability(259) AA Bonus", aabonuses.CombatStability);
if (spellbonuses.CombatStability)
GM->Message(0, "# %i #### DEFENDER SE_CombatStability(259) Spell Bonus", spellbonuses.CombatStability);
GM->Message(Chat::White, "# %i #### DEFENDER SE_CombatStability(259) Spell Bonus", spellbonuses.CombatStability);
if (itembonuses.CombatStability)
GM->Message(0, "# %i #### DEFENDER SE_CombatStability(259) Worn Bonus", itembonuses.CombatStability);
GM->Message(Chat::White, "# %i #### DEFENDER SE_CombatStability(259) Worn Bonus", itembonuses.CombatStability);
GM->Message(0, "# %.2f #### DEFENDER Base Soft Cap", softcap);
GM->Message(Chat::White, "# %.2f #### DEFENDER Base Soft Cap", softcap);
}
float monkweight = RuleI(Combat, MonkACBonusWeight);
@ -287,11 +287,11 @@ int32 Mob::Tune_MeleeMitigation(Mob* GM, Mob *attacker, int32 damage, int32 minh
armor = ac_override;
if (Msg >=2 ){
GM->Message(0, "# %i #### DEFENDER AC Equiped/Worn Bonus", itembonuses.AC);
GM->Message(0, "# %i #### DEFENDER SE_ArmorClass(1) AA Bonus", aabonuses.AC);
GM->Message(0, "# %i #### DEFENDER SE_ArmorClass(1) Spell Bonus", spellbonuses.AC);
GM->Message(0, "# %i #### DEFENDER Shield AC", shield_ac);
GM->Message(0, "# %i #### DEFENDER Total Client Armor - NO shield", armor);
GM->Message(Chat::White, "# %i #### DEFENDER AC Equiped/Worn Bonus", itembonuses.AC);
GM->Message(Chat::White, "# %i #### DEFENDER SE_ArmorClass(1) AA Bonus", aabonuses.AC);
GM->Message(Chat::White, "# %i #### DEFENDER SE_ArmorClass(1) Spell Bonus", spellbonuses.AC);
GM->Message(Chat::White, "# %i #### DEFENDER Shield AC", shield_ac);
GM->Message(Chat::White, "# %i #### DEFENDER Total Client Armor - NO shield", armor);
}
} else if (IsNPC()) {
@ -301,9 +301,9 @@ int32 Mob::Tune_MeleeMitigation(Mob* GM, Mob *attacker, int32 damage, int32 minh
armor = ac_override;
if (Msg >=2 ){
GM->Message(0, "# %i #### DEFENDER AC Equiped/Worn Bonus", itembonuses.AC);
GM->Message(0, "# %i #### DEFENDER SE_ArmorClass(1) Spell Bonus", spellbonuses.AC);
GM->Message(0, "# %i #### DEFENDER NPC AC Stat", CastToNPC()->GetRawAC());
GM->Message(Chat::White, "# %i #### DEFENDER AC Equiped/Worn Bonus", itembonuses.AC);
GM->Message(Chat::White, "# %i #### DEFENDER SE_ArmorClass(1) Spell Bonus", spellbonuses.AC);
GM->Message(Chat::White, "# %i #### DEFENDER NPC AC Stat", CastToNPC()->GetRawAC());
}
int PetACBonus = 0;
@ -311,7 +311,7 @@ int32 Mob::Tune_MeleeMitigation(Mob* GM, Mob *attacker, int32 damage, int32 minh
if (!IsPet()){
armor = (armor / RuleR(Combat, NPCACFactor));
if (Msg >=2 )
GM->Message(0, "# %i #### DEFENDER NPC Armor after RuleR(Combat, NPCACFactor) %.2f", armor, RuleR(Combat, NPCACFactor));
GM->Message(Chat::White, "# %i #### DEFENDER NPC Armor after RuleR(Combat, NPCACFactor) %.2f", armor, RuleR(Combat, NPCACFactor));
}
Mob *owner = nullptr;
@ -325,18 +325,18 @@ int32 Mob::Tune_MeleeMitigation(Mob* GM, Mob *attacker, int32 damage, int32 minh
if (Msg >=2 ){
if (owner->aabonuses.PetMeleeMitigation)
GM->Message(0, "# %i #### DEFENDER Pet Owner SE_PetMeleeMitigation(379) AA Bonus", owner->aabonuses.PetMeleeMitigation);
GM->Message(Chat::White, "# %i #### DEFENDER Pet Owner SE_PetMeleeMitigation(379) AA Bonus", owner->aabonuses.PetMeleeMitigation);
if (owner->spellbonuses.PetMeleeMitigation)
GM->Message(0, "# %i #### DEFENDER Pet Owner SE_PetMeleeMitigation(379) Spell Bonus",owner->spellbonuses.PetMeleeMitigation);
GM->Message(Chat::White, "# %i #### DEFENDER Pet Owner SE_PetMeleeMitigation(379) Spell Bonus",owner->spellbonuses.PetMeleeMitigation);
if (owner->itembonuses.PetMeleeMitigation)
GM->Message(0, "# %i #### DEFENDER Pet Owner SE_PetMeleeMitigation(379) Worn Bonus", owner->itembonuses.PetMeleeMitigation);
GM->Message(Chat::White, "# %i #### DEFENDER Pet Owner SE_PetMeleeMitigation(379) Worn Bonus", owner->itembonuses.PetMeleeMitigation);
}
}
armor += spellbonuses.AC + itembonuses.AC + PetACBonus + 1;
if (Msg >= 2)
GM->Message(0, "# %i #### DEFENDER NPC Total Base Armor",armor);
GM->Message(Chat::White, "# %i #### DEFENDER NPC Total Base Armor",armor);
}
if (opts) {
@ -405,38 +405,38 @@ int32 Mob::Tune_MeleeMitigation(Mob* GM, Mob *attacker, int32 damage, int32 minh
armor = softcap + softcap_armor;
if (Msg >= 2)
GM->Message(0, "# %i #### DEFENDER Final Armor [Soft Cap %i Soft Cap Armor %i]",armor, softcap,softcap_armor);
GM->Message(Chat::White, "# %i #### DEFENDER Final Armor [Soft Cap %i Soft Cap Armor %i]",armor, softcap,softcap_armor);
}
int tmp_armor = armor;
if (GetClass() == WIZARD || GetClass() == MAGICIAN ||
GetClass() == NECROMANCER || GetClass() == ENCHANTER){
mitigation_rating = ((GetSkill(EQEmu::skills::SkillDefense) + itembonuses.HeroicAGI / 10) / 4.0) + armor + 1;
if (Msg >= 2)
GM->Message(0, "# + %.2f #### DEFENDER Armor Bonus [Defense Skill %i Heroic Agi %i]", mitigation_rating - tmp_armor, GetSkill(EQEmu::skills::SkillDefense), itembonuses.HeroicAGI);
GM->Message(Chat::White, "# + %.2f #### DEFENDER Armor Bonus [Defense Skill %i Heroic Agi %i]", mitigation_rating - tmp_armor, GetSkill(EQEmu::skills::SkillDefense), itembonuses.HeroicAGI);
}
else{
mitigation_rating = ((GetSkill(EQEmu::skills::SkillDefense) + itembonuses.HeroicAGI / 10) / 3.0) + (armor * 1.333333) + 1;
if (Msg >= 2)
GM->Message(0, "# + %.2f #### DEFENDER Armor Bonus [Defense Skill %i Heroic Agi %i]", mitigation_rating - tmp_armor, GetSkill(EQEmu::skills::SkillDefense), itembonuses.HeroicAGI);
GM->Message(Chat::White, "# + %.2f #### DEFENDER Armor Bonus [Defense Skill %i Heroic Agi %i]", mitigation_rating - tmp_armor, GetSkill(EQEmu::skills::SkillDefense), itembonuses.HeroicAGI);
}
mitigation_rating *= 0.847;
if (Msg >= 1)
GM->Message(0, "# %.2f #### DEFENDER Final Mitigation Rating", mitigation_rating);
GM->Message(Chat::White, "# %.2f #### DEFENDER Final Mitigation Rating", mitigation_rating);
if (Msg >= 2){
GM->Message(0, " ");
GM->Message(0, "### Mitigation Bonus Effects ###");
GM->Message(Chat::White, " ");
GM->Message(Chat::White, "### Mitigation Bonus Effects ###");
if (itembonuses.MeleeMitigation)
GM->Message(0, "# %i #### DEFENDER Item Mod2 Shielding", itembonuses.MeleeMitigation);
GM->Message(Chat::White, "# %i #### DEFENDER Item Mod2 Shielding", itembonuses.MeleeMitigation);
if (aabonuses.MeleeMitigationEffect)
GM->Message(0, "# %i #### DEFENDER SE_MeleeMitigation(168) AA Bonus", aabonuses.MeleeMitigationEffect);
GM->Message(Chat::White, "# %i #### DEFENDER SE_MeleeMitigation(168) AA Bonus", aabonuses.MeleeMitigationEffect);
if (spellbonuses.MeleeMitigationEffect)
GM->Message(0, "# %i #### DEFENDER SE_MeleeMitigation(168) Spell Bonus", spellbonuses.MeleeMitigationEffect);
GM->Message(Chat::White, "# %i #### DEFENDER SE_MeleeMitigation(168) Spell Bonus", spellbonuses.MeleeMitigationEffect);
if (itembonuses.MeleeMitigationEffect)
GM->Message(0, "# %i #### DEFENDER SE_MeleeMitigation(168) Worn Bonus", itembonuses.MeleeMitigationEffect);
GM->Message(Chat::White, "# %i #### DEFENDER SE_MeleeMitigation(168) Worn Bonus", itembonuses.MeleeMitigationEffect);
}
mitigation_rating = mod_mitigation_rating(mitigation_rating, attacker);
@ -458,31 +458,31 @@ int32 Mob::Tune_MeleeMitigation(Mob* GM, Mob *attacker, int32 damage, int32 minh
attack_rating = attacker->mod_attack_rating(attack_rating, this);
if (Msg >= 2){
GM->Message(0, " ");
GM->Message(0, "### Calculate Attack Rating ###");
GM->Message(Chat::White, " ");
GM->Message(Chat::White, "### Calculate Attack Rating ###");
if (attacker->IsClient()){
GM->Message(0, "# %i #### ATTACKER Worn/Equip ATK Bonus", attacker->itembonuses.ATK);
GM->Message(0, "# %i #### ATTACKER SE_ATK(2) AA Bonus", attacker->aabonuses.ATK);
GM->Message(0, "# %i #### ATTACKER SE_ATK(2) spell Bonus", attacker->spellbonuses.ATK);
GM->Message(0, "# %i #### ATTACKER Leadership Bonus", attacker->CastToClient()->GroupLeadershipAAOffenseEnhancement());
GM->Message(0, "# %i #### ATTACKER Worn/Equip ATK Bonus", attacker->itembonuses.ATK);
GM->Message(0, "# %i #### ATTACKER Worn/Equip ATK Bonus", attacker->itembonuses.ATK);
GM->Message(0, "# %.2f #### ATTACKER Strength Stat ATK Bonus [Stat Amt: %i]", ((attacker->GetSTR()-66) * 0.9),attacker->GetSTR());
GM->Message(0, "# %.2f #### ATTACKER Offensive Skill ATK Bonus [Stat Amt: %i]", (attacker->GetSkill(EQEmu::skills::SkillOffense)*1.345), attacker->GetSkill(EQEmu::skills::SkillOffense));
GM->Message(Chat::White, "# %i #### ATTACKER Worn/Equip ATK Bonus", attacker->itembonuses.ATK);
GM->Message(Chat::White, "# %i #### ATTACKER SE_ATK(2) AA Bonus", attacker->aabonuses.ATK);
GM->Message(Chat::White, "# %i #### ATTACKER SE_ATK(2) spell Bonus", attacker->spellbonuses.ATK);
GM->Message(Chat::White, "# %i #### ATTACKER Leadership Bonus", attacker->CastToClient()->GroupLeadershipAAOffenseEnhancement());
GM->Message(Chat::White, "# %i #### ATTACKER Worn/Equip ATK Bonus", attacker->itembonuses.ATK);
GM->Message(Chat::White, "# %i #### ATTACKER Worn/Equip ATK Bonus", attacker->itembonuses.ATK);
GM->Message(Chat::White, "# %.2f #### ATTACKER Strength Stat ATK Bonus [Stat Amt: %i]", ((attacker->GetSTR()-66) * 0.9),attacker->GetSTR());
GM->Message(Chat::White, "# %.2f #### ATTACKER Offensive Skill ATK Bonus [Stat Amt: %i]", (attacker->GetSkill(EQEmu::skills::SkillOffense)*1.345), attacker->GetSkill(EQEmu::skills::SkillOffense));
}
else{
GM->Message(0, "# %i #### ATTACKER Worn/Equip ATK Bonus", attacker->itembonuses.ATK);
GM->Message(0, "# %i #### ATTACKER SE_ATK(2) spell Bonus", attacker->spellbonuses.ATK);
GM->Message(0, "# %i #### ATTACKER NPC ATK Stat", attacker->CastToNPC()->ATK);
GM->Message(0, "# %.2f #### ATTACKER Strength Stat ATK Bonus [Stat Amt: %i]", ((attacker->GetSTR()-66) * 0.9),attacker->GetSTR());
GM->Message(0, "# %.2f #### ATTACKER Offensive Skill ATK Bonus [Stat Amt: %i]", (attacker->GetSkill(EQEmu::skills::SkillOffense)*1.345), attacker->GetSkill(EQEmu::skills::SkillOffense));
GM->Message(Chat::White, "# %i #### ATTACKER Worn/Equip ATK Bonus", attacker->itembonuses.ATK);
GM->Message(Chat::White, "# %i #### ATTACKER SE_ATK(2) spell Bonus", attacker->spellbonuses.ATK);
GM->Message(Chat::White, "# %i #### ATTACKER NPC ATK Stat", attacker->CastToNPC()->ATK);
GM->Message(Chat::White, "# %.2f #### ATTACKER Strength Stat ATK Bonus [Stat Amt: %i]", ((attacker->GetSTR()-66) * 0.9),attacker->GetSTR());
GM->Message(Chat::White, "# %.2f #### ATTACKER Offensive Skill ATK Bonus [Stat Amt: %i]", (attacker->GetSkill(EQEmu::skills::SkillOffense)*1.345), attacker->GetSkill(EQEmu::skills::SkillOffense));
}
}
if (Msg >= 1){
GM->Message(0, "# %.2f #### ATTACKER Final Attack Rating", attack_rating);
GM->Message(0, "######### Melee Mitigation Report: Complete #########", Msg);
GM->Message(Chat::White, "# %.2f #### ATTACKER Final Attack Rating", attack_rating);
GM->Message(Chat::White, "######### Melee Mitigation Report: Complete #########", Msg);
}
@ -693,7 +693,7 @@ void Mob::Tune_FindAccuaryByHitChance(Mob* defender, Mob *attacker, float hit_ch
tmp_hit_chance = Tune_CheckHitChance(defender, attacker, skillinuse, EQEmu::invslot::slotPrimary, 0, false, 0, avoid_override, add_acc);
if (Msg >= 3)
Message(15, "#Tune - Processing... [%i] [ACCURACY %i] Hit Chance %.2f ",j,add_acc,tmp_hit_chance);
Message(Chat::Yellow, "#Tune - Processing... [%i] [ACCURACY %i] Hit Chance %.2f ",j,add_acc,tmp_hit_chance);
if (interval > 0 && tmp_hit_chance >= hit_chance){
end = true;
@ -727,8 +727,8 @@ void Mob::Tune_FindAccuaryByHitChance(Mob* defender, Mob *attacker, float hit_ch
add_acc = add_acc + interval;
}
Message(7, "#Tune - Error: Unable to find desired result for (%.0f) pct - Increase interval (%i) AND/OR max loop value (%i) and run again.", hit_chance, interval, max_loop);
Message(7, "#Tune - Parse ended at ACCURACY ADJUSTMENTT ( %i ) at hit chance of (%.0f) / (%.0f) pct.",add_acc,tmp_hit_chance / hit_chance);
Message(Chat::LightGray, "#Tune - Error: Unable to find desired result for (%.0f) pct - Increase interval (%i) AND/OR max loop value (%i) and run again.", hit_chance, interval, max_loop);
Message(Chat::LightGray, "#Tune - Parse ended at ACCURACY ADJUSTMENTT ( %i ) at hit chance of (%.0f) / (%.0f) pct.",add_acc,tmp_hit_chance / hit_chance);
}
void Mob::Tune_FindAvoidanceByHitChance(Mob* defender, Mob *attacker, float hit_chance, int interval, int max_loop, int acc_override, int Msg)

View File

@ -70,7 +70,7 @@ void NPC::AI_SetRoambox(float distance, float max_x, float min_x, float max_y, f
void NPC::DisplayWaypointInfo(Client *c) {
c->Message(0, "Mob is on grid %d, in spawn group %d, on waypoint %d/%d",
c->Message(Chat::White, "Mob is on grid %d, in spawn group %d, on waypoint %d/%d",
GetGrid(),
GetSp2(),
GetCurWp(),
@ -81,7 +81,7 @@ void NPC::DisplayWaypointInfo(Client *c) {
cur = Waypoints.begin();
end = Waypoints.end();
for (; cur != end; ++cur) {
c->Message(0, "Waypoint %d: (%.2f,%.2f,%.2f,%.2f) pause %d",
c->Message(Chat::White, "Waypoint %d: (%.2f,%.2f,%.2f,%.2f) pause %d",
cur->index,
cur->x,
cur->y,
@ -895,7 +895,7 @@ void ZoneDatabase::AssignGrid(Client *client, int grid, int spawn2id) {
return;
}
client->Message(0, "Grid assign: spawn2 id = %d updated", spawn2id);
client->Message(Chat::White, "Grid assign: spawn2 id = %d updated", spawn2id);
}

View File

@ -211,7 +211,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
else if (scm->queued == 2) // tell queue was full
client->Tell_StringID(QUEUE_TELL_FULL, scm->to, scm->message);
else if (scm->queued == 3) // person was offline
client->Message_StringID(MT_TellEcho, TOLD_NOT_ONLINE, scm->to);
client->MessageString(Chat::EchoTell, TOLD_NOT_ONLINE, scm->to);
else // normal tell echo "You told Soanso, 'something'"
// tell echo doesn't use language, so it looks normal to you even if nobody can understand your tells
client->ChannelMessageSend(scm->from, scm->to, scm->chan_num, 0, 100, scm->message);
@ -374,15 +374,15 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
switch (ztz->response)
{
case -2: {
entity->CastToClient()->Message(13, "You do not own the required locations to enter this zone.");
entity->CastToClient()->Message(Chat::Red, "You do not own the required locations to enter this zone.");
break;
}
case -1: {
entity->CastToClient()->Message(13, "The zone is currently full, please try again later.");
entity->CastToClient()->Message(Chat::Red, "The zone is currently full, please try again later.");
break;
}
case 0: {
entity->CastToClient()->Message(13, "All zone servers are taken at this time, please try again later.");
entity->CastToClient()->Message(Chat::Red, "All zone servers are taken at this time, please try again later.");
break;
}
}
@ -414,7 +414,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
Client* client = entity_list.GetClientByID(wars->id);
if (client) {
if (pack->size == 64)//no results
client->Message_StringID(0, WHOALL_NO_RESULTS);
client->MessageString(Chat::White, WHOALL_NO_RESULTS);
else {
auto outapp = new EQApplicationPacket(OP_WhoAllResponse, pack->size);
memcpy(outapp->pBuffer, pack->pBuffer, pack->size);
@ -578,7 +578,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
printf("Zoning %s to %s(%u) - %u\n", client != nullptr ? client->GetCleanName() : "Unknown", szp->zone, database.GetZoneID(szp->zone), szp->instance_id);
if (client != 0) {
if (strcasecmp(szp->adminname, szp->name) == 0)
client->Message(0, "Zoning to: %s", szp->zone);
client->Message(Chat::White, "Zoning to: %s", szp->zone);
else if (client->GetAnon() == 1 && client->Admin() > szp->adminrank)
break;
else {
@ -783,7 +783,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
Client* c = entity_list.GetClientByName(Rezzer);
if (c)
c->Message_StringID(MT_WornOff, REZZ_ALREADY_PENDING);
c->MessageString(Chat::SpellWornOff, REZZ_ALREADY_PENDING);
break;
}
@ -910,7 +910,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
entity_list.AddGroup(group);
if (group->GetID() == 0) {
Inviter->Message(13, "Unable to get new group id. Cannot create group.");
Inviter->Message(Chat::Red, "Unable to get new group id. Cannot create group.");
break;
}
@ -1485,7 +1485,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
ServerOP_Consent_Struct* s = (ServerOP_Consent_Struct*)pack->pBuffer;
Client* client = entity_list.GetClientByName(s->ownername);
if (client) {
client->Message_StringID(0, s->message_string_id);
client->MessageString(Chat::White, s->message_string_id);
}
break;
}
@ -1729,7 +1729,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
if (c)
{
c->ClearPendingAdventureDoorClick();
c->Message_StringID(13, 5141);
c->MessageString(Chat::Red, 5141);
}
break;
}
@ -1751,7 +1751,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
if (c)
{
c->ClearPendingAdventureLeave();
c->Message(13, "You cannot leave this adventure at this time.");
c->Message(Chat::Red, "You cannot leave this adventure at this time.");
}
break;
}

View File

@ -1770,14 +1770,14 @@ void Zone::SpawnStatus(Mob* client) {
while(iterator.MoreElements())
{
if (iterator.GetData()->timer.GetRemainingTime() == 0xFFFFFFFF)
client->Message(0, " %d: %1.1f, %1.1f, %1.1f: disabled", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ());
client->Message(Chat::White, " %d: %1.1f, %1.1f, %1.1f: disabled", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ());
else
client->Message(0, " %d: %1.1f, %1.1f, %1.1f: %1.2f", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ(), (float)iterator.GetData()->timer.GetRemainingTime() / 1000);
client->Message(Chat::White, " %d: %1.1f, %1.1f, %1.1f: %1.2f", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ(), (float)iterator.GetData()->timer.GetRemainingTime() / 1000);
x++;
iterator.Advance();
}
client->Message(0, "%i spawns listed.", x);
client->Message(Chat::White, "%i spawns listed.", x);
}
void Zone::ShowEnabledSpawnStatus(Mob* client)
@ -1792,7 +1792,7 @@ void Zone::ShowEnabledSpawnStatus(Mob* client)
{
if (iterator.GetData()->timer.GetRemainingTime() != 0xFFFFFFFF)
{
client->Message(0, " %d: %1.1f, %1.1f, %1.1f: %1.2f", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ(), (float)iterator.GetData()->timer.GetRemainingTime() / 1000);
client->Message(Chat::White, " %d: %1.1f, %1.1f, %1.1f: %1.2f", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ(), (float)iterator.GetData()->timer.GetRemainingTime() / 1000);
iEnabledCount++;
}
@ -1800,7 +1800,7 @@ void Zone::ShowEnabledSpawnStatus(Mob* client)
iterator.Advance();
}
client->Message(0, "%i of %i spawns listed.", iEnabledCount, x);
client->Message(Chat::White, "%i of %i spawns listed.", iEnabledCount, x);
}
void Zone::ShowDisabledSpawnStatus(Mob* client)
@ -1815,7 +1815,7 @@ void Zone::ShowDisabledSpawnStatus(Mob* client)
{
if (iterator.GetData()->timer.GetRemainingTime() == 0xFFFFFFFF)
{
client->Message(0, " %d: %1.1f, %1.1f, %1.1f: disabled", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ());
client->Message(Chat::White, " %d: %1.1f, %1.1f, %1.1f: disabled", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ());
iDisabledCount++;
}
@ -1823,7 +1823,7 @@ void Zone::ShowDisabledSpawnStatus(Mob* client)
iterator.Advance();
}
client->Message(0, "%i of %i spawns listed.", iDisabledCount, x);
client->Message(Chat::White, "%i of %i spawns listed.", iDisabledCount, x);
}
void Zone::ShowSpawnStatusByID(Mob* client, uint32 spawnid)
@ -1839,9 +1839,9 @@ void Zone::ShowSpawnStatusByID(Mob* client, uint32 spawnid)
if (iterator.GetData()->GetID() == spawnid)
{
if (iterator.GetData()->timer.GetRemainingTime() == 0xFFFFFFFF)
client->Message(0, " %d: %1.1f, %1.1f, %1.1f: disabled", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ());
client->Message(Chat::White, " %d: %1.1f, %1.1f, %1.1f: disabled", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ());
else
client->Message(0, " %d: %1.1f, %1.1f, %1.1f: %1.2f", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ(), (float)iterator.GetData()->timer.GetRemainingTime() / 1000);
client->Message(Chat::White, " %d: %1.1f, %1.1f, %1.1f: %1.2f", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ(), (float)iterator.GetData()->timer.GetRemainingTime() / 1000);
iSpawnIDCount++;
@ -1853,9 +1853,9 @@ void Zone::ShowSpawnStatusByID(Mob* client, uint32 spawnid)
}
if(iSpawnIDCount > 0)
client->Message(0, "%i of %i spawns listed.", iSpawnIDCount, x);
client->Message(Chat::White, "%i of %i spawns listed.", iSpawnIDCount, x);
else
client->Message(0, "No matching spawn id was found in this zone.");
client->Message(Chat::White, "No matching spawn id was found in this zone.");
}
bool ZoneDatabase::GetDecayTimes(npcDecayTimes_Struct *npcCorpseDecayTimes)

View File

@ -3061,10 +3061,10 @@ bool ZoneDatabase::SaveMerc(Merc *merc) {
auto results = database.QueryDatabase(query);
if(!results.Success()) {
owner->Message(13, results.ErrorMessage().c_str());
owner->Message(Chat::Red, results.ErrorMessage().c_str());
return false;
} else if (results.RowsAffected() != 1) {
owner->Message(13, "Unable to save merc to the database.");
owner->Message(Chat::Red, "Unable to save merc to the database.");
return false;
}
@ -3095,10 +3095,10 @@ bool ZoneDatabase::SaveMerc(Merc *merc) {
auto results = database.QueryDatabase(query);
if (!results.Success()) {
owner->Message(13, results.ErrorMessage().c_str());
owner->Message(Chat::Red, results.ErrorMessage().c_str());
return false;
} else if (results.RowsAffected() != 1) {
owner->Message(13, "Unable to save merc to the database.");
owner->Message(Chat::Red, "Unable to save merc to the database.");
return false;
}
@ -3544,10 +3544,10 @@ void ZoneDatabase::ListAllInstances(Client* client, uint32 charid)
char name[64];
database.GetCharName(charid, name);
client->Message(0, "%s is part of the following instances:", name);
client->Message(Chat::White, "%s is part of the following instances:", name);
for (auto row = results.begin(); row != results.end(); ++row) {
client->Message(0, "%s - id: %lu, version: %lu", database.GetZoneName(atoi(row[1])),
client->Message(Chat::White, "%s - id: %lu, version: %lu", database.GetZoneName(atoi(row[1])),
(unsigned long)atoi(row[0]), (unsigned long)atoi(row[2]));
}
}

View File

@ -96,7 +96,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
//that can be a valid un-zolicited zone request?
//Todo cheat detection
Message(13, "Invalid unsolicited zone request.");
Message(Chat::Red, "Invalid unsolicited zone request.");
Log(Logs::General, Logs::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%d'.", GetName(), target_zone_id);
SendZoneCancel(zc);
return;
@ -142,14 +142,14 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
//make sure we are in it and it's unexpired.
if(!database.VerifyInstanceAlive(target_instance_id, CharacterID()))
{
Message(13, "Instance ID was expired or you were not in it.");
Message(Chat::Red, "Instance ID was expired or you were not in it.");
SendZoneCancel(zc);
return;
}
if(!database.VerifyZoneInstance(target_zone_id, target_instance_id))
{
Message(13, "Instance ID was %u does not go with zone id %u", target_instance_id, target_zone_id);
Message(Chat::Red, "Instance ID was %u does not go with zone id %u", target_instance_id, target_zone_id);
SendZoneCancel(zc);
return;
}
@ -159,7 +159,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
const char *target_zone_name = database.GetZoneName(target_zone_id);
if(target_zone_name == nullptr) {
//invalid zone...
Message(13, "Invalid target zone ID.");
Message(Chat::Red, "Invalid target zone ID.");
Log(Logs::General, Logs::Error, "Zoning %s: Unable to get zone name for zone id '%d'.", GetName(), target_zone_id);
SendZoneCancel(zc);
return;
@ -172,7 +172,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
char flag_needed[128];
if(!database.GetSafePoints(target_zone_name, database.GetInstanceVersion(target_instance_id), &safe_x, &safe_y, &safe_z, &minstatus, &minlevel, flag_needed)) {
//invalid zone...
Message(13, "Invalid target zone while getting safe points.");
Message(Chat::Red, "Invalid target zone while getting safe points.");
Log(Logs::General, Logs::Error, "Zoning %s: Unable to get safe coordinates for zone '%s'.", GetName(), target_zone_name);
SendZoneCancel(zc);
return;
@ -277,7 +277,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) {
//the flag needed string is not empty, meaning a flag is required.
if(Admin() < minStatusToIgnoreZoneFlags && !HasZoneFlag(target_zone_id))
{
Message(13, "You do not have the flag to enter %s.", target_zone_name);
Message(Chat::Red, "You do not have the flag to enter %s.", target_zone_name);
myerror = ZONE_ERROR_NOEXPERIENCE;
}
}
@ -453,7 +453,7 @@ void Client::ProcessMovePC(uint32 zoneID, uint32 instance_id, float x, float y,
ZonePC(zoneID, instance_id, x, y, z, heading, ignorerestrictions, zm);
break;
case GMSummon:
Message(15, "You have been summoned by a GM!");
Message(Chat::Yellow, "You have been summoned by a GM!");
ZonePC(zoneID, instance_id, x, y, z, heading, ignorerestrictions, zm);
break;
case ZoneToBindPoint:
@ -463,11 +463,11 @@ void Client::ProcessMovePC(uint32 zoneID, uint32 instance_id, float x, float y,
ZonePC(zoneID, instance_id, x, y, z, heading, ignorerestrictions, zm);
break;
case SummonPC:
Message(15, "You have been summoned!");
Message(Chat::Yellow, "You have been summoned!");
ZonePC(zoneID, instance_id, x, y, z, heading, ignorerestrictions, zm);
break;
case Rewind:
Message(15, "Rewinding to previous location.");
Message(Chat::Yellow, "Rewinding to previous location.");
ZonePC(zoneID, instance_id, x, y, z, heading, ignorerestrictions, zm);
break;
default:
@ -486,7 +486,7 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z
database.GetZoneLongName(pShortZoneName, &pZoneName);
if(!pZoneName) {
Message(13, "Invalid zone number specified");
Message(Chat::Red, "Invalid zone number specified");
safe_delete_array(pZoneName);
return;
}
@ -560,7 +560,7 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z
Entity* entity = entity_list.GetID(entity_id_being_looted);
if (entity == 0)
{
Message(13, "Error: OP_EndLootRequest: Corpse not found (ent = 0)");
Message(Chat::Red, "Error: OP_EndLootRequest: Corpse not found (ent = 0)");
if (ClientVersion() >= EQEmu::versions::ClientVersion::SoD)
Corpse::SendEndLootErrorPacket(this);
else
@ -568,7 +568,7 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z
}
else if (!entity->IsCorpse())
{
Message(13, "Error: OP_EndLootRequest: Corpse not found (!entity->IsCorpse())");
Message(Chat::Red, "Error: OP_EndLootRequest: Corpse not found (!entity->IsCorpse())");
Corpse::SendLootReqErrorPacket(this);
}
else
@ -723,7 +723,7 @@ void Client::Gate(uint8 bindnum) {
}
void NPC::Gate(uint8 bindnum) {
entity_list.MessageClose_StringID(this, true, RuleI(Range, SpellMessages), MT_Spells, GATES, GetCleanName());
entity_list.MessageCloseString(this, true, RuleI(Range, SpellMessages), Chat::Spells, GATES, GetCleanName());
Mob::Gate(bindnum);
}
@ -814,7 +814,7 @@ bool Client::HasZoneFlag(uint32 zone_id) const {
void Client::SendZoneFlagInfo(Client *to) const {
if(zone_flags.empty()) {
to->Message(0, "%s has no zone flags.", GetName());
to->Message(Chat::White, "%s has no zone flags.", GetName());
return;
}
@ -823,7 +823,7 @@ void Client::SendZoneFlagInfo(Client *to) const {
end = zone_flags.end();
char empty[1] = { '\0' };
to->Message(0, "Flags for %s:", GetName());
to->Message(Chat::White, "Flags for %s:", GetName());
for(; cur != end; ++cur) {
uint32 zoneid = *cur;
@ -843,7 +843,7 @@ void Client::SendZoneFlagInfo(Client *to) const {
strcpy(flag_name, "(ERROR GETTING NAME)");
}
to->Message(0, "Has Flag %s for zone %s (%d,%s)", flag_name, long_name, zoneid, short_name);
to->Message(Chat::White, "Has Flag %s for zone %s (%d,%s)", flag_name, long_name, zoneid, short_name);
if(long_name != empty)
delete[] long_name;
}