mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
Unify chat constants usage
This commit is contained in:
+17
-17
@@ -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->SayTo_StringID(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->SayTo_StringID(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->SayTo_StringID(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;
|
||||
@@ -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) {
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -3315,8 +3315,8 @@ void ClientTaskState::AcceptNewTask(Client *c, int TaskID, int NPCID, bool enfor
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user