refactor(Core/Unit): clean MonsterText methods (#6957)

This commit is contained in:
Kitzunu
2021-10-15 10:25:29 +02:00
committed by GitHub
parent 3c42a7d72d
commit bc82f36f1f
75 changed files with 750 additions and 672 deletions

View File

@@ -3313,7 +3313,7 @@ public:
}
WorldPacket data(SMSG_PLAY_SOUND, 4);
data << uint32(soundId) << handler->GetSession()->GetPlayer()->GetGUID();
data << uint32(soundId);
sWorld->SendGlobalMessage(&data);
handler->PSendSysMessage(LANG_COMMAND_PLAYED_TO_ALL, soundId);

View File

@@ -1249,7 +1249,7 @@ public:
return false;
}
creature->MonsterSay(args, LANG_UNIVERSAL, nullptr);
creature->Say(args, LANG_UNIVERSAL);
// make some emotes
char lastchar = args[strlen(args) - 1];
@@ -1284,7 +1284,7 @@ public:
return false;
}
creature->MonsterTextEmote(args, 0);
creature->TextEmote(args);
return true;
}
@@ -1346,7 +1346,7 @@ public:
if (handler->HasLowerSecurity(receiver, ObjectGuid::Empty))
return false;
creature->MonsterWhisper(text, receiver);
creature->Whisper(text, LANG_UNIVERSAL, receiver);
return true;
}
@@ -1363,7 +1363,7 @@ public:
return false;
}
creature->MonsterYell(args, LANG_UNIVERSAL, nullptr);
creature->Yell(args, LANG_UNIVERSAL, nullptr);
// make an emote
creature->HandleEmoteCommand(EMOTE_ONESHOT_SHOUT);

View File

@@ -212,7 +212,7 @@ public:
target->LoadPath(pathid);
target->SetDefaultMovementType(WAYPOINT_MOTION_TYPE);
target->GetMotionMaster()->Initialize();
target->MonsterSay("Path loaded.", LANG_UNIVERSAL, nullptr);
target->Say("Path loaded.", LANG_UNIVERSAL);
return true;
}
@@ -265,7 +265,7 @@ public:
target->SetDefaultMovementType(IDLE_MOTION_TYPE);
target->GetMotionMaster()->MoveTargetedHome();
target->GetMotionMaster()->Initialize();
target->MonsterSay("Path unloaded.", LANG_UNIVERSAL, nullptr);
target->Say("Path unloaded.", LANG_UNIVERSAL);
return true;
}
handler->PSendSysMessage("%s%s|r", "|cffff33ff", "Target have no loaded path.");