Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2024-07-24 20:57:52 +08:00
80 changed files with 867 additions and 922 deletions
-7
View File
@@ -1,7 +0,0 @@
# Used by "mix format"
[
inputs: [
".formatter.exs",
"account.exs"
]
]
-10
View File
@@ -1,10 +0,0 @@
FROM elixir:1.14-slim
RUN mix local.hex --force && \
mix local.rebar --force
COPY account.exs /account.exs
COPY srp.exs /srp.exs
RUN chmod +x /account.exs
CMD /account.exs
-102
View File
@@ -1,102 +0,0 @@
# Account.exs
Simple script to create an account for AzerothCore
This script allows a server admin to create a user automatically when after the `dbimport` tool runs, without needed to open up the `worldserver` console.
## How To Use
### Pre-requisites
- MySQL is running
- The authserver database (`acore_auth`, typically) has a table named `account`
### Running
```bash
$ elixir account.exs
```
### Configuration
This script reads from environment variables in order to control which account it creates and the MySQL server it's communicating with
- `ACORE_USERNAME` Username for account, default "admin"
- `ACORE_PASSWORD` Password for account, default "admin"
- `ACORE_GM_LEVEL` GM Level for account, default 3
- `MYSQL_DATABASE` Database name, default "acore_auth"
- `MYSQL_USERNAME` MySQL username, default "root"
- `MYSQL_PASSWORD` MySQL password, default "password"
- `MYSQL_PORT` MySQL Port, default 3306
- `MYSQL_HOST` MySQL Host, default "localhost"
To use these environment variables, execute the script like so:
```bash
$ MYSQL_HOST=mysql \
MYSQL_PASSWORD="fourthehoard" \
ACORE_USERNAME=drekthar \
ACORE_PASSWORD=securepass22 \
elixir account.exs
```
This can also be used in a loop. Consider this csv file:
```csv
user,pass,gm_level
admin,adminpass,2
soapuser,soappass,3
mainuser,userpass,0
```
You can then loop over this csv file, and manage users like so:
```bash
$ while IFS=, read -r user pass gm; do
ACORE_USERNAME=$user \
ACORE_PASSWORD=$pass \
GM_LEVEL=$gm \
elixir account.exs
done <<< $(tail -n '+2' users.csv)
```
### Docker
Running and building with docker is simple:
```bash
$ docker build -t acore/account-create .
$ docker run \
-e MYSQL_HOST=mysql \
-v mix_cache:/root/.cache/mix/installs \
acore/account-create
```
Note that the `MYSQL_HOST` is required to be set with the docker container, as the default setting targets `localhost`.
### docker-compose
A simple way to integrate this into a docker-compose file.
This is why I wrote this script - an automatic way to have an admin account idempotently created on startup of the server.
```yaml
services:
account-create:
image: acore/account-create:${DOCKER_IMAGE_TAG:-master}
build:
context: apps/account-create/
dockerfile: apps/account-create/Dockerfile
environment:
MYSQL_HOST: ac-database
MYSQL_PASSWORD: ${DOCKER_DB_ROOT_PASSWORD:-password}
ACORE_USERNAME: ${ACORE_ROOT_ADMIN_ACCOUNT:-admin}
ACORE_PASSWORD: ${ACORE_ROOT_ADMIN_PASSWORD:-password}
volumes:
- mix_cache:/root/.cache/mix/installs
profiles: [local, app, db-import-local]
depends_on:
ac-db-import:
condition: service_completed_successfully
```
-134
View File
@@ -1,134 +0,0 @@
#!/usr/bin/env elixir
# Execute this Elixir script with the below command
#
# $ ACORE_USERNAME=foo ACORE_PASSWORD=barbaz123 elixir account.exs
#
# Set environment variables for basic configuration
#
# ACORE_USERNAME - Username for account, default "admin"
# ACORE_PASSWORD - Password for account, default "admin"
# ACORE_GM_LEVEL - GM level for account
# MYSQL_DATABASE - Database name, default "acore_auth"
# MYSQL_USERNAME - MySQL username, default "root"
# MYSQL_PASSWORD - MySQL password, default "password"
# MYSQL_PORT - MySQL Port, default 3306
# MYSQL_HOST - MySQL Host, default "localhost"
# Install remote dependencies
[
{:myxql, "~> 0.6.0"}
]
|> Mix.install()
# Start the logger
Application.start(:logger)
require Logger
# Constants
default_credential = "admin"
default_gm_level = "3"
account_access_comment = "Managed via account-create script"
# Import srp functions
Code.require_file("srp.exs", Path.absname(__DIR__))
# Assume operator provided a "human-readable" name.
# The database stores usernames in all caps
username_lower =
System.get_env("ACORE_USERNAME", default_credential)
|> tap(&Logger.info("Account to create: #{&1}"))
username = String.upcase(username_lower)
password = System.get_env("ACORE_PASSWORD", default_credential)
gm_level = System.get_env("ACORE_GM_LEVEL", default_gm_level) |> String.to_integer()
if Range.new(0, 3) |> Enum.member?(gm_level) |> Kernel.not do
Logger.info("Valid ACORE_GM_LEVEL values are 0, 1, 2, and 3. The given value was: #{gm_level}.")
end
{:ok, pid} =
MyXQL.start_link(
protocol: :tcp,
database: System.get_env("MYSQL_DATABASE", "acore_auth"),
username: System.get_env("MYSQL_USERNAME", "root"),
password: System.get_env("MYSQL_PASSWORD", "password"),
port: System.get_env("MYSQL_PORT", "3306") |> String.to_integer(),
hostname: System.get_env("MYSQL_HOST", "localhost")
)
Logger.info("MySQL connection created")
Logger.info("Checking database for user #{username_lower}")
# Check if user already exists in database
{:ok, result} = MyXQL.query(pid, "SELECT salt FROM account WHERE username=?", [username])
%{salt: salt, verifier: verifier} =
case result do
%{rows: [[salt | _] | _]} ->
Logger.info("Salt for #{username_lower} found in database")
# re-use the salt if the user exists in database
Srp.generate_stored_values(username, password, salt)
_ ->
Logger.info("Salt not found in database for #{username_lower}. Generating a new one")
Srp.generate_stored_values(username, password)
end
Logger.info("New salt and verifier generated")
# Insert values into DB, replacing the verifier if the user already exists
result =
MyXQL.query(
pid,
"""
INSERT INTO account
(`username`, `salt`, `verifier`)
VALUES
(?, ?, ?)
ON DUPLICATE KEY UPDATE verifier=?
""",
[username, salt, verifier, verifier]
)
case result do
{:error, %{message: message}} ->
File.write("fail.log", message)
Logger.info(
"Account #{username_lower} failed to create. You can check the error message at fail.log."
)
exit({:shutdown, 1})
# if num_rows changed and last_insert_id == 0, it means the verifier matched. No change necessary
{:ok, %{num_rows: 1, last_insert_id: 0}} ->
Logger.info(
"Account #{username_lower} doesn't need to have its' password changed. You should be able to log in with that account"
)
{:ok, %{num_rows: 1}} ->
Logger.info(
"Account #{username_lower} has been created. You should now be able to login with that account"
)
{:ok, %{num_rows: 2}} ->
Logger.info(
"Account #{username_lower} has had its' password reset. You should now be able to login with that account"
)
end
# Set GM level to configured value
{:ok, _} =
MyXQL.query(
pid,
"""
INSERT INTO account_access
(`id`, `gmlevel`, `comment`)
VALUES
((SELECT id FROM account WHERE username=?), ?, ?)
ON DUPLICATE KEY UPDATE gmlevel=?, comment=?
""", [username, gm_level, account_access_comment, gm_level, account_access_comment])
Logger.info("GM Level for #{username_lower} set to #{gm_level}")
-59
View File
@@ -1,59 +0,0 @@
defmodule Srp do
# Constants required in WoW's SRP6 implementation
@n <<137, 75, 100, 94, 137, 225, 83, 91, 189, 173, 91, 139, 41, 6, 80, 83, 8, 1, 177, 142, 191,
191, 94, 143, 171, 60, 130, 135, 42, 62, 155, 183>>
@g <<7>>
@field_length 32
# Wrapper function
def generate_stored_values(username, password, salt \\ "") do
default_state()
|> generate_salt(salt)
|> calculate_x(username, password)
|> calculate_v()
end
def default_state() do
%{n: @n, g: @g}
end
# Generate salt if it's not defined
def generate_salt(state, "") do
salt = :crypto.strong_rand_bytes(32)
Map.merge(state, %{salt: salt})
end
# Don't generate salt if it's already defined
def generate_salt(state, salt) do
padded_salt = pad_binary(salt)
Map.merge(state, %{salt: padded_salt})
end
# Get h1
def calculate_x(state, username, password) do
hash = :crypto.hash(:sha, String.upcase(username) <> ":" <> String.upcase(password))
x = reverse(:crypto.hash(:sha, state.salt <> hash))
Map.merge(state, %{x: x, username: username})
end
# Get h2
def calculate_v(state) do
verifier =
:crypto.mod_pow(state.g, state.x, state.n)
|> reverse()
|> pad_binary()
Map.merge(state, %{verifier: verifier})
end
defp pad_binary(blob) do
pad = @field_length - byte_size(blob)
<<blob::binary, 0::pad*8>>
end
defp reverse(binary) do
binary
|> :binary.decode_unsigned(:big)
|> :binary.encode_unsigned(:little)
end
end
@@ -0,0 +1,35 @@
-- DB update 2024_07_21_00 -> 2024_07_23_00
UPDATE `creature` SET `MovementType` = 2 WHERE `id1` = 23600 AND `guid` = 18604;
DELETE FROM `creature_addon` WHERE (`guid` IN (18604));
INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
(18604, 186040, 0, 0, 1, 0, 0, NULL);
DELETE FROM `waypoint_data` WHERE `id` = 186040;
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`) VALUES
(186040, 1, -4044.12, -3393.59, 38.1363, NULL, 6000), -- 1s, Talk 0, 5s, Talk 1
(186040, 2, -4044.21, -3394.23, 38.3905, NULL, 0),
(186040, 3, -4042.96, -3396.48, 38.3905, NULL, 0),
(186040, 4, -4041.71, -3397.23, 38.3905, NULL, 0),
(186040, 5, -4040.8, -3396.88, 38.1447, NULL, 16000), -- 2s, Emote 16, 6s, Talk 2, 6s, Garion Talk 0
(186040, 6, -4043.67, -3395.27, 38.1634, NULL, 0),
(186040, 7, -4043.67, -3395.27, 38.1634, 3.87463, 240000);
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 23600;
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 23600);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(23600, 0, 0, 0, 108, 0, 100, 0, 1, 0, 0, 0, 0, 0, 80, 2360000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Apprentice Morlann - On Point 1 of Path Any Reached - Run Script'),
(23600, 0, 1, 0, 108, 0, 100, 0, 5, 0, 0, 0, 0, 0, 80, 2360001, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Apprentice Morlann - On Point 5 of Path Any Reached - Run Script');
DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` IN (2360000, 2360001));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(2360000, 9, 0, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Apprentice Morlann - Actionlist - Say Line 0'),
(2360000, 9, 1, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Apprentice Morlann - Actionlist - Say Line 1'),
(2360001, 9, 0, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 5, 16, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Apprentice Morlann - Actionlist - Play Emote 16'),
(2360001, 9, 1, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Apprentice Morlann - Actionlist - Say Line 2'),
(2360001, 9, 2, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 23601, 0, 0, 0, 0, 0, 0, 0, 'Apprentice Morlann - Actionlist - Say Line 0 (Apprentice Garion)');
DELETE FROM `waypoint_scripts` WHERE `id` IN (1007, 1008) AND `guid` IN (648, 649);
@@ -0,0 +1,3 @@
-- DB update 2024_07_23_00 -> 2024_07_23_01
--
UPDATE `creature_template` SET `flags_extra` = `flags_extra`|256 WHERE `entry` = 22917;
+205
View File
@@ -0,0 +1,205 @@
-- DB update 2024_07_23_01 -> 2024_07_23_02
--
UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%s', '{}');
UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%u', '{}');
UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%i', '{}');
UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%f', '{}');
UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%d', '{}');
UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%c', '{}');
UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%x', '{}');
UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%2.2f', '{}');
UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%.*s', '{}');
UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%3d', '{}');
UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%4d', '{}');
UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%5d', '{}');
UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%20s', '{}');
UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%19s', '{}');
UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%16s', '{}');
UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%12s', '{}');
UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%15s', '{}');
UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%-10s', '{}');
UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%6u', '{}');
UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%8u', '{}');
UPDATE `acore_string` SET `content_default` = REPLACE(content_default, '%10u', '{}');
UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%s', '{}');
UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%u', '{}');
UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%i', '{}');
UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%f', '{}');
UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%d', '{}');
UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%c', '{}');
UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%x', '{}');
UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%2.2f', '{}');
UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%.*s', '{}');
UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%3d', '{}');
UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%4d', '{}');
UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%5d', '{}');
UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%20s', '{}');
UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%19s', '{}');
UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%16s', '{}');
UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%12s', '{}');
UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%15s', '{}');
UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%-10s', '{}');
UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%6u', '{}');
UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%8u', '{}');
UPDATE `acore_string` SET `locale_koKR` = REPLACE(locale_koKR, '%10u', '{}');
UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%s', '{}');
UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%u', '{}');
UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%i', '{}');
UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%f', '{}');
UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%d', '{}');
UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%c', '{}');
UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%x', '{}');
UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%2.2f', '{}');
UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%.*s', '{}');
UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%3d', '{}');
UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%4d', '{}');
UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%5d', '{}');
UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%20s', '{}');
UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%19s', '{}');
UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%16s', '{}');
UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%12s', '{}');
UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%15s', '{}');
UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%-10s', '{}');
UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%6u', '{}');
UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%8u', '{}');
UPDATE `acore_string` SET `locale_frFR` = REPLACE(locale_frFR, '%10u', '{}');
UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%s', '{}');
UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%u', '{}');
UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%i', '{}');
UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%f', '{}');
UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%d', '{}');
UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%c', '{}');
UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%x', '{}');
UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%2.2f', '{}');
UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%.*s', '{}');
UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%3d', '{}');
UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%4d', '{}');
UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%5d', '{}');
UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%20s', '{}');
UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%19s', '{}');
UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%16s', '{}');
UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%12s', '{}');
UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%15s', '{}');
UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%-10s', '{}');
UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%6u', '{}');
UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%8u', '{}');
UPDATE `acore_string` SET `locale_deDE` = REPLACE(locale_deDE, '%10u', '{}');
UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%s', '{}');
UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%u', '{}');
UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%i', '{}');
UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%f', '{}');
UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%d', '{}');
UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%c', '{}');
UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%x', '{}');
UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%2.2f', '{}');
UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%.*s', '{}');
UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%3d', '{}');
UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%4d', '{}');
UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%5d', '{}');
UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%20s', '{}');
UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%19s', '{}');
UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%16s', '{}');
UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%12s', '{}');
UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%15s', '{}');
UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%-10s', '{}');
UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%6u', '{}');
UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%8u', '{}');
UPDATE `acore_string` SET `locale_zhCN` = REPLACE(locale_zhCN, '%10u', '{}');
UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%s', '{}');
UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%u', '{}');
UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%i', '{}');
UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%f', '{}');
UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%d', '{}');
UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%c', '{}');
UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%x', '{}');
UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%2.2f', '{}');
UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%.*s', '{}');
UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%3d', '{}');
UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%4d', '{}');
UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%5d', '{}');
UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%20s', '{}');
UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%19s', '{}');
UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%16s', '{}');
UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%12s', '{}');
UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%15s', '{}');
UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%-10s', '{}');
UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%6u', '{}');
UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%8u', '{}');
UPDATE `acore_string` SET `locale_zhTW` = REPLACE(locale_zhTW, '%10u', '{}');
UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%s', '{}');
UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%u', '{}');
UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%i', '{}');
UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%f', '{}');
UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%d', '{}');
UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%c', '{}');
UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%x', '{}');
UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%2.2f', '{}');
UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%.*s', '{}');
UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%3d', '{}');
UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%4d', '{}');
UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%5d', '{}');
UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%20s', '{}');
UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%19s', '{}');
UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%16s', '{}');
UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%12s', '{}');
UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%15s', '{}');
UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%-10s', '{}');
UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%6u', '{}');
UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%8u', '{}');
UPDATE `acore_string` SET `locale_esES` = REPLACE(locale_esES, '%10u', '{}');
UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%s', '{}');
UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%u', '{}');
UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%i', '{}');
UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%f', '{}');
UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%d', '{}');
UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%c', '{}');
UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%x', '{}');
UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%2.2f', '{}');
UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%.*s', '{}');
UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%3d', '{}');
UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%4d', '{}');
UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%5d', '{}');
UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%20s', '{}');
UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%19s', '{}');
UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%16s', '{}');
UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%12s', '{}');
UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%15s', '{}');
UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%-10s', '{}');
UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%6u', '{}');
UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%8u', '{}');
UPDATE `acore_string` SET `locale_esMX` = REPLACE(locale_esMX, '%10u', '{}');
UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%s', '{}');
UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%u', '{}');
UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%i', '{}');
UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%f', '{}');
UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%d', '{}');
UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%c', '{}');
UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%x', '{}');
UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%2.2f', '{}');
UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%.*s', '{}');
UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%3d', '{}');
UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%4d', '{}');
UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%5d', '{}');
UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%20s', '{}');
UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%19s', '{}');
UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%16s', '{}');
UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%12s', '{}');
UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%15s', '{}');
UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%-10s', '{}');
UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%6u', '{}');
UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%8u', '{}');
UPDATE `acore_string` SET `locale_ruRU` = REPLACE(locale_ruRU, '%10u', '{}');
-- Only case I found that got broke. Due to these being sent to the client via WorldPacket
DELETE FROM `acore_string` WHERE `entry` IN (6613,6615);
INSERT INTO `acore_string` (`entry`, `content_default`, `locale_koKR`, `locale_frFR`, `locale_deDE`, `locale_zhCN`, `locale_zhTW`, `locale_esES`, `locale_esMX`, `locale_ruRU`) VALUES
(6613, '|cfff00000[GM Announcement]: %s|r', NULL, NULL, '|cfff00000[GM Ankündigung von [%s]]: %s|r', '|cfff00000[管理员公告]: %s|r', NULL, NULL, NULL, NULL),
(6615, '|cffffff00[|c1f40af20GM Announce by|r |cffff0000%s|cffffff00]:|r %s|r', NULL, NULL, '|cffffff00[|c1f40af20GM Ankündigung von|r |cffff0000%s|cffffff00]:|r %s|r', '|cffffff00[|c1f40af20管理员广播|r |cffff0000%s|cffffff00]:|r %s|r', NULL, NULL, NULL, NULL);
@@ -156,7 +156,7 @@ bool ArenaSpectator::HandleSpectatorSpectateCommand(ChatHandler* handler, std::s
{
handler->PSendSysMessage("To spectate, please fix the following:");
for (std::list<std::string>::const_iterator itr = errors.begin(); itr != errors.end(); ++itr)
handler->PSendSysMessage("- %s", (*itr).c_str());
handler->PSendSysMessage("- {}", (*itr));
return true;
}
@@ -1057,7 +1057,7 @@ void BattlegroundQueue::SendMessageBGQueue(Player* leader, Battleground* bg, PvP
// Show queue status to player only (when joining battleground queue or Arena and arena world announcer is disabled)
if (sWorld->getBoolConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY))
{
ChatHandler(leader->GetSession()).PSendSysMessage(LANG_BG_QUEUE_ANNOUNCE_SELF, bgName.c_str(), q_min_level, q_max_level,
ChatHandler(leader->GetSession()).PSendSysMessage(LANG_BG_QUEUE_ANNOUNCE_SELF, bgName, q_min_level, q_max_level,
qAlliance, (MinPlayers > qAlliance) ? MinPlayers - qAlliance : (uint32)0,
qHorde, (MinPlayers > qHorde) ? MinPlayers - qHorde : (uint32)0);
}
@@ -1119,7 +1119,7 @@ void BattlegroundQueue::SendJoinMessageArenaQueue(Player* leader, GroupQueueInfo
if (sWorld->getBoolConfig(CONFIG_ARENA_QUEUE_ANNOUNCER_PLAYERONLY))
{
ChatHandler(leader->GetSession()).PSendSysMessage(LANG_ARENA_QUEUE_ANNOUNCE_SELF,
bgName, arenatype.c_str(), q_min_level, q_max_level, qPlayers, playersNeed - qPlayers);
bgName, arenatype, q_min_level, q_max_level, qPlayers, playersNeed - qPlayers);
}
else
{
+2 -2
View File
@@ -213,7 +213,7 @@ void Channel::JoinChannel(Player* player, std::string const& pass)
playersStore[guid] = pinfo;
if (_channelRights.joinMessage.length())
ChatHandler(player->GetSession()).PSendSysMessage("%s", _channelRights.joinMessage.c_str());
ChatHandler(player->GetSession()).PSendSysMessage("{}", _channelRights.joinMessage);
WorldPacket data;
MakeYouJoined(&data);
@@ -364,7 +364,7 @@ void Channel::KickOrBan(Player const* player, std::string const& badname, bool b
}
else
{
ChatHandler(player->GetSession()).PSendSysMessage("Character %s has other faction!", badname.c_str());
ChatHandler(player->GetSession()).PSendSysMessage("Character {} has other faction!", badname);
return;
}
}
+6 -1
View File
@@ -150,6 +150,11 @@ void ChatHandler::SendSysMessage(uint32 entry)
SendSysMessage(GetAcoreString(entry));
}
void ChatHandler::PSendSysMessage(std::string_view str, bool escapeCharacters)
{
SendSysMessage(str, escapeCharacters);
}
void ChatHandler::SendErrorMessage(uint32 entry)
{
SendSysMessage(entry);
@@ -172,7 +177,7 @@ bool ChatHandler::_ParseCommands(std::string_view text)
return false;
// Send error message for GMs
SendErrorMessage(LANG_CMD_INVALID, STRING_VIEW_FMT_ARG(text));
SendErrorMessage(LANG_CMD_INVALID, text);
return true;
}
+4 -3
View File
@@ -55,23 +55,24 @@ public:
virtual void SendSysMessage(std::string_view str, bool escapeCharacters = false);
void SendSysMessage(uint32 entry);
void PSendSysMessage(std::string_view str, bool escapeCharacters = false);
template<typename... Args>
void PSendSysMessage(char const* fmt, Args&&... args)
{
SendSysMessage(Acore::StringFormat(fmt, std::forward<Args>(args)...).c_str());
SendSysMessage(Acore::StringFormatFmt(fmt, std::forward<Args>(args)...));
}
template<typename... Args>
void PSendSysMessage(uint32 entry, Args&&... args)
{
SendSysMessage(PGetParseString(entry, std::forward<Args>(args)...).c_str());
SendSysMessage(PGetParseString(entry, std::forward<Args>(args)...));
}
template<typename... Args>
std::string PGetParseString(uint32 entry, Args&&... args) const
{
return Acore::StringFormat(GetAcoreString(entry), std::forward<Args>(args)...);
return Acore::StringFormatFmt(GetAcoreString(entry), std::forward<Args>(args)...);
}
void SendErrorMessage(uint32 entry);
@@ -198,8 +198,8 @@ void Acore::Impl::ChatCommands::ChatCommandNode::SendCommandHelp(ChatHandler& ha
handler.SendSysMessage(std::get<std::string>(_help));
else
{
handler.PSendSysMessage(LANG_CMD_HELP_GENERIC, STRING_VIEW_FMT_ARG(_name));
handler.PSendSysMessage(LANG_CMD_NO_HELP_AVAILABLE, STRING_VIEW_FMT_ARG(_name));
handler.PSendSysMessage(LANG_CMD_HELP_GENERIC, _name);
handler.PSendSysMessage(LANG_CMD_NO_HELP_AVAILABLE, _name);
}
}
@@ -218,14 +218,14 @@ void Acore::Impl::ChatCommands::ChatCommandNode::SendCommandHelp(ChatHandler& ha
{
if (!hasInvoker)
{
handler.PSendSysMessage(LANG_CMD_HELP_GENERIC, STRING_VIEW_FMT_ARG(_name));
handler.PSendSysMessage(LANG_CMD_HELP_GENERIC, _name);
}
handler.SendSysMessage(LANG_SUBCMDS_LIST);
header = true;
}
handler.PSendSysMessage(subCommandHasSubCommand ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, STRING_VIEW_FMT_ARG(it->second._name));
handler.PSendSysMessage(subCommandHasSubCommand ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, it->second._name);
}
}
@@ -301,14 +301,14 @@ namespace Acore::Impl::ChatCommands
if (it2)
{ /* there are multiple matching subcommands - print possibilities and return */
if (cmd)
handler.PSendSysMessage(LANG_SUBCMD_AMBIGUOUS, STRING_VIEW_FMT_ARG(cmd->_name), COMMAND_DELIMITER, STRING_VIEW_FMT_ARG(token));
handler.PSendSysMessage(LANG_SUBCMD_AMBIGUOUS, cmd->_name, COMMAND_DELIMITER, token);
else
handler.PSendSysMessage(LANG_CMD_AMBIGUOUS, STRING_VIEW_FMT_ARG(token));
handler.PSendSysMessage(LANG_CMD_AMBIGUOUS, token);
handler.PSendSysMessage(it1->second.HasVisibleSubCommands(handler) ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, STRING_VIEW_FMT_ARG(it1->first));
handler.PSendSysMessage(it1->second.HasVisibleSubCommands(handler) ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, it1->first);
do
{
handler.PSendSysMessage(it2->second.HasVisibleSubCommands(handler) ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, STRING_VIEW_FMT_ARG(it2->first));
handler.PSendSysMessage(it2->second.HasVisibleSubCommands(handler) ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, it2->first);
} while (++it2);
return true;
@@ -359,10 +359,10 @@ namespace Acore::Impl::ChatCommands
if (cmd)
{
cmd->SendCommandHelp(handler);
handler.PSendSysMessage(LANG_SUBCMD_INVALID, STRING_VIEW_FMT_ARG(cmd->_name), COMMAND_DELIMITER, STRING_VIEW_FMT_ARG(token));
handler.PSendSysMessage(LANG_SUBCMD_INVALID, cmd->_name, COMMAND_DELIMITER, token);
}
else
handler.PSendSysMessage(LANG_CMD_INVALID, STRING_VIEW_FMT_ARG(token));
handler.PSendSysMessage(LANG_CMD_INVALID, token);
return;
}
@@ -374,14 +374,14 @@ namespace Acore::Impl::ChatCommands
if (it2)
{ /* there are multiple matching subcommands - print possibilities and return */
if (cmd)
handler.PSendSysMessage(LANG_SUBCMD_AMBIGUOUS, STRING_VIEW_FMT_ARG(cmd->_name), COMMAND_DELIMITER, STRING_VIEW_FMT_ARG(token));
handler.PSendSysMessage(LANG_SUBCMD_AMBIGUOUS, cmd->_name, COMMAND_DELIMITER, token);
else
handler.PSendSysMessage(LANG_CMD_AMBIGUOUS, STRING_VIEW_FMT_ARG(token));
handler.PSendSysMessage(LANG_CMD_AMBIGUOUS, token);
handler.PSendSysMessage(it1->second.HasVisibleSubCommands(handler) ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, STRING_VIEW_FMT_ARG(it1->first));
handler.PSendSysMessage(it1->second.HasVisibleSubCommands(handler) ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, it1->first);
do
{
handler.PSendSysMessage(it2->second.HasVisibleSubCommands(handler) ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, STRING_VIEW_FMT_ARG(it2->first));
handler.PSendSysMessage(it2->second.HasVisibleSubCommands(handler) ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, it2->first);
} while (++it2);
return;
@@ -402,11 +402,11 @@ namespace Acore::Impl::ChatCommands
handler.SendSysMessage(LANG_AVAILABLE_CMDS);
do
{
handler.PSendSysMessage(it->second.HasVisibleSubCommands(handler) ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, STRING_VIEW_FMT_ARG(it->second._name));
handler.PSendSysMessage(it->second.HasVisibleSubCommands(handler) ? LANG_SUBCMDS_LIST_ENTRY_ELLIPSIS : LANG_SUBCMDS_LIST_ENTRY, it->second._name);
} while (++it);
}
else
handler.PSendSysMessage(LANG_CMD_INVALID, STRING_VIEW_FMT_ARG(cmdStr));
handler.PSendSysMessage(LANG_CMD_INVALID, cmdStr);
}
/*static*/ std::vector<std::string> Acore::Impl::ChatCommands::ChatCommandNode::GetAutoCompletionsFor(ChatHandler const& handler, std::string_view cmdStr)
@@ -63,7 +63,7 @@ ChatCommandResult Acore::Impl::ChatCommands::ArgInfo<GameTele const*>::TryConsum
if (val.holds_alternative<Hyperlink<tele>>())
return FormatAcoreString(handler, LANG_CMDPARSER_GAME_TELE_ID_NO_EXIST, static_cast<uint32>(std::get<Hyperlink<tele>>(val)));
else
return FormatAcoreString(handler, LANG_CMDPARSER_GAME_TELE_NO_EXIST, STRING_VIEW_FMT_ARG(std::get<std::string_view>(val)));
return FormatAcoreString(handler, LANG_CMDPARSER_GAME_TELE_NO_EXIST, std::get<std::string_view>(val));
}
struct ItemTemplateVisitor
@@ -62,12 +62,12 @@ namespace Acore::Impl::ChatCommands
if (Optional<T> v = StringTo<T>(token, 0))
val = *v;
else
return FormatAcoreString(handler, LANG_CMDPARSER_STRING_VALUE_INVALID, STRING_VIEW_FMT_ARG(token), GetTypeName<T>().c_str());
return FormatAcoreString(handler, LANG_CMDPARSER_STRING_VALUE_INVALID, token, GetTypeName<T>());
if constexpr (std::is_floating_point_v<T>)
{
if (!std::isfinite(val))
return FormatAcoreString(handler, LANG_CMDPARSER_STRING_VALUE_INVALID, STRING_VIEW_FMT_ARG(token), GetTypeName<T>().c_str());
return FormatAcoreString(handler, LANG_CMDPARSER_STRING_VALUE_INVALID, token, GetTypeName<T>());
}
return tail;
@@ -200,7 +200,7 @@ namespace Acore::Impl::ChatCommands
}
if (next1)
return FormatAcoreString(handler, LANG_CMDPARSER_STRING_VALUE_INVALID, STRING_VIEW_FMT_ARG(strVal), GetTypeName<T>().c_str());
return FormatAcoreString(handler, LANG_CMDPARSER_STRING_VALUE_INVALID, strVal, GetTypeName<T>());
else
return next1;
}
@@ -125,7 +125,7 @@ namespace Acore::Impl::ChatCommands
template <typename... Ts>
std::string FormatAcoreString(ChatHandler const* handler, AcoreStrings which, Ts&&... args)
{
return Acore::StringFormat(GetAcoreString(handler, which), std::forward<Ts>(args)...);
return Acore::StringFormatFmt(GetAcoreString(handler, which), std::forward<Ts>(args)...);
}
}
@@ -77,7 +77,7 @@ ChatCommandResult Acore::ChatCommands::AccountIdentifier::TryConsume(ChatHandler
// try parsing as account id instead
Optional<uint32> id = Acore::StringTo<uint32>(text, 10);
if (!id)
return FormatAcoreString(handler, LANG_CMDPARSER_ACCOUNT_NAME_NO_EXIST, STRING_VIEW_FMT_ARG(_name));
return FormatAcoreString(handler, LANG_CMDPARSER_ACCOUNT_NAME_NO_EXIST, _name);
_id = *id;
@@ -104,7 +104,7 @@ ChatCommandResult Acore::ChatCommands::PlayerIdentifier::TryConsume(ChatHandler
}
else if (!sCharacterCache->GetCharacterNameByGuid(_guid, _name))
{
return FormatAcoreString(handler, LANG_CMDPARSER_CHAR_GUID_NO_EXIST, _guid.ToString().c_str());
return FormatAcoreString(handler, LANG_CMDPARSER_CHAR_GUID_NO_EXIST, _guid.ToString());
}
return next;
@@ -117,7 +117,7 @@ ChatCommandResult Acore::ChatCommands::PlayerIdentifier::TryConsume(ChatHandler
_name.assign(val.get<std::string_view>());
if (!normalizePlayerName(_name))
return FormatAcoreString(handler, LANG_CMDPARSER_CHAR_NAME_INVALID, STRING_VIEW_FMT_ARG(_name));
return FormatAcoreString(handler, LANG_CMDPARSER_CHAR_NAME_INVALID, _name);
if ((_player = ObjectAccessor::FindPlayerByName(_name)))
{
@@ -125,7 +125,7 @@ ChatCommandResult Acore::ChatCommands::PlayerIdentifier::TryConsume(ChatHandler
}
else if (!(_guid = sCharacterCache->GetCharacterGuidByName(_name)))
{
return FormatAcoreString(handler, LANG_CMDPARSER_CHAR_NAME_NO_EXIST, STRING_VIEW_FMT_ARG(_name));
return FormatAcoreString(handler, LANG_CMDPARSER_CHAR_NAME_NO_EXIST, _name);
}
return next;
@@ -101,7 +101,7 @@ namespace Acore::ChatCommands
return tail;
start = args.substr(0, _string.length() + remainingToken.length());
}
return Acore::Impl::ChatCommands::FormatAcoreString(handler, LANG_CMDPARSER_EXACT_SEQ_MISMATCH, STRING_VIEW_FMT_ARG(_string), STRING_VIEW_FMT_ARG(start));
return Acore::Impl::ChatCommands::FormatAcoreString(handler, LANG_CMDPARSER_EXACT_SEQ_MISMATCH, _string, start);
}
private:
+2 -2
View File
@@ -9395,11 +9395,11 @@ void Player::Whisper(std::string_view text, Language language, Player* target, b
// announce afk or dnd message
if (target->isAFK())
{
ChatHandler(GetSession()).PSendSysMessage(LANG_PLAYER_AFK, target->GetName().c_str(), target->autoReplyMsg.c_str());
ChatHandler(GetSession()).PSendSysMessage(LANG_PLAYER_AFK, target->GetName(), target->autoReplyMsg);
}
else if (target->isDND())
{
ChatHandler(GetSession()).PSendSysMessage(LANG_PLAYER_DND, target->GetName().c_str(), target->autoReplyMsg.c_str());
ChatHandler(GetSession()).PSendSysMessage(LANG_PLAYER_DND, target->GetName(), target->autoReplyMsg);
}
}
@@ -6640,11 +6640,11 @@ void Player::PrettyPrintRequirementsQuestList(const std::vector<const Progressio
if (missingReq->note.empty())
{
ChatHandler(GetSession()).PSendSysMessage(" - %s", stream.str().c_str());
ChatHandler(GetSession()).PSendSysMessage(" - {}", stream.str());
}
else
{
ChatHandler(GetSession()).PSendSysMessage(" - %s %s %s", stream.str().c_str(), sObjectMgr->GetAcoreString(LANG_ACCESS_REQUIREMENT_NOTE, loc_idx), missingReq->note.c_str());
ChatHandler(GetSession()).PSendSysMessage(" - {} {} {}", stream.str(), sObjectMgr->GetAcoreString(LANG_ACCESS_REQUIREMENT_NOTE, loc_idx), missingReq->note);
}
}
}
@@ -6673,11 +6673,11 @@ void Player::PrettyPrintRequirementsAchievementsList(const std::vector<const Pro
if (missingReq->note.empty())
{
ChatHandler(GetSession()).PSendSysMessage(" - %s", stream.str().c_str());
ChatHandler(GetSession()).PSendSysMessage(" - {}", stream.str());
}
else
{
ChatHandler(GetSession()).PSendSysMessage(" - %s %s %s", stream.str().c_str(), sObjectMgr->GetAcoreString(LANG_ACCESS_REQUIREMENT_NOTE, loc_idx), missingReq->note.c_str());
ChatHandler(GetSession()).PSendSysMessage(" - {} {} {}", stream.str(), sObjectMgr->GetAcoreString(LANG_ACCESS_REQUIREMENT_NOTE, loc_idx), missingReq->note);
}
}
}
@@ -6711,11 +6711,11 @@ void Player::PrettyPrintRequirementsItemsList(const std::vector<const Progressio
if (missingReq->note.empty())
{
ChatHandler(GetSession()).PSendSysMessage(" - %s", stream.str().c_str());
ChatHandler(GetSession()).PSendSysMessage(" - {}", stream.str());
}
else
{
ChatHandler(GetSession()).PSendSysMessage(" - %s %s %s", stream.str().c_str(), sObjectMgr->GetAcoreString(LANG_ACCESS_REQUIREMENT_NOTE, loc_idx), missingReq->note.c_str());
ChatHandler(GetSession()).PSendSysMessage(" - {} {} {}", stream.str(), sObjectMgr->GetAcoreString(LANG_ACCESS_REQUIREMENT_NOTE, loc_idx), missingReq->note);
}
}
}
@@ -6860,11 +6860,11 @@ bool Player::Satisfy(DungeonProgressionRequirements const* ar, uint32 target_map
//Blizzlike method of printing out the requirements
if (missingPlayerQuests.size() && !missingPlayerQuests[0]->note.empty())
{
ChatHandler(GetSession()).PSendSysMessage("%s", missingPlayerQuests[0]->note.c_str());
ChatHandler(GetSession()).PSendSysMessage("{}", missingPlayerQuests[0]->note);
}
else if (missingLeaderQuests.size() && !missingLeaderQuests[0]->note.empty())
{
ChatHandler(GetSession()).PSendSysMessage("%s", missingLeaderQuests[0]->note.c_str());
ChatHandler(GetSession()).PSendSysMessage("{}", missingLeaderQuests[0]->note);
}
else if (mapDiff->hasErrorMessage)
{
@@ -6902,7 +6902,7 @@ bool Player::Satisfy(DungeonProgressionRequirements const* ar, uint32 target_map
}
if (missingLeaderQuests.size())
{
ChatHandler(GetSession()).PSendSysMessage(LANG_ACCESS_REQUIREMENT_LEADER_COMPLETE_QUESTS, leaderName.c_str());
ChatHandler(GetSession()).PSendSysMessage(LANG_ACCESS_REQUIREMENT_LEADER_COMPLETE_QUESTS, leaderName);
PrettyPrintRequirementsQuestList(missingLeaderQuests);
errorAlreadyPrinted = true;
}
@@ -6915,7 +6915,7 @@ bool Player::Satisfy(DungeonProgressionRequirements const* ar, uint32 target_map
}
if (missingLeaderAchievements.size())
{
ChatHandler(GetSession()).PSendSysMessage(LANG_ACCESS_REQUIREMENT_LEADER_COMPLETE_ACHIEVEMENTS, leaderName.c_str());
ChatHandler(GetSession()).PSendSysMessage(LANG_ACCESS_REQUIREMENT_LEADER_COMPLETE_ACHIEVEMENTS, leaderName);
PrettyPrintRequirementsAchievementsList(missingLeaderAchievements);
errorAlreadyPrinted = true;
}
@@ -6929,7 +6929,7 @@ bool Player::Satisfy(DungeonProgressionRequirements const* ar, uint32 target_map
if (missingLeaderItems.size())
{
ChatHandler(GetSession()).PSendSysMessage(LANG_ACCESS_REQUIREMENT_LEADER_OBTAIN_ITEMS, leaderName.c_str());
ChatHandler(GetSession()).PSendSysMessage(LANG_ACCESS_REQUIREMENT_LEADER_OBTAIN_ITEMS, leaderName);
PrettyPrintRequirementsItemsList(missingLeaderItems);
errorAlreadyPrinted = true;
}
+1 -1
View File
@@ -9348,7 +9348,7 @@ bool ObjectMgr::IsVendorItemValid(uint32 vendor_entry, uint32 item_id, int32 max
if (maxcount > 0 && incrtime == 0)
{
if (player)
ChatHandler(player->GetSession()).PSendSysMessage("MaxCount != 0 (%u) but IncrTime == 0", maxcount);
ChatHandler(player->GetSession()).PSendSysMessage("MaxCount != 0 ({}) but IncrTime == 0", maxcount);
else
LOG_ERROR("sql.sql", "Table `(game_event_)npc_vendor` has `maxcount` ({}) for item {} of vendor (Entry: {}) but `incrtime`=0, ignore", maxcount, item_id, vendor_entry);
return false;
+1 -1
View File
@@ -1476,7 +1476,7 @@ void Guild::HandleInviteMember(WorldSession* session, std::string const& name)
uint32 memberLimit = sConfigMgr->GetOption<uint32>("Guild.MemberLimit", 0);
if (memberLimit > 0 && player->GetGuild()->GetMemberCount() >= memberLimit)
{
ChatHandler(player->GetSession()).PSendSysMessage("Your guild has reached the maximum amount of members (%u). You cannot send another invite until the guild member count is lower.", memberLimit);
ChatHandler(player->GetSession()).PSendSysMessage("Your guild has reached the maximum amount of members ({}). You cannot send another invite until the guild member count is lower.", memberLimit);
SendCommandResult(session, GUILD_COMMAND_INVITE, ERR_GUILD_INTERNAL, name);
return;
}
@@ -827,7 +827,7 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder const& holder)
// send server info
if (sWorld->getIntConfig(CONFIG_ENABLE_SINFO_LOGIN) == 1)
chH.PSendSysMessage("%s", GitRevision::GetFullVersion());
chH.PSendSysMessage("{}", GitRevision::GetFullVersion());
}
if (uint32 guildId = sCharacterCache->GetCharacterGuildIdByGuid(pCurrChar->GetGUID()))
@@ -875,7 +875,7 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder const& holder)
// send new char string if not empty
if (!sWorld->GetNewCharString().empty())
chH.PSendSysMessage("%s", sWorld->GetNewCharString().c_str());
chH.PSendSysMessage("{}", sWorld->GetNewCharString());
}
}
@@ -1145,7 +1145,7 @@ void WorldSession::HandlePlayerLoginToCharInWorld(Player* pCurrChar)
// send server info
if (sWorld->getIntConfig(CONFIG_ENABLE_SINFO_LOGIN) == 1)
chH.PSendSysMessage("%s", GitRevision::GetFullVersion());
chH.PSendSysMessage("{}", GitRevision::GetFullVersion());
LOG_DEBUG("network.opcode", "WORLD: Sent server info");
}
+3 -3
View File
@@ -610,7 +610,7 @@ void WorldSession::HandleCharacterAuraFrozen(PreparedQueryResult result)
{
Field* fields = result->Fetch();
std::string player = fields[0].Get<std::string>();
handler.PSendSysMessage(LANG_COMMAND_FROZEN_PLAYERS, player.c_str());
handler.PSendSysMessage(LANG_COMMAND_FROZEN_PLAYERS, player);
} while (result->NextRow());
}
@@ -1402,11 +1402,11 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recv_data)
switch (group->GetDifficultyChangePreventionReason())
{
case DIFFICULTY_PREVENTION_CHANGE_BOSS_KILLED:
ChatHandler(this).PSendSysMessage("Raid was in combat recently and may not change difficulty again for %u sec.", preventionTime);
ChatHandler(this).PSendSysMessage("Raid was in combat recently and may not change difficulty again for {} sec.", preventionTime);
break;
case DIFFICULTY_PREVENTION_CHANGE_RECENTLY_CHANGED:
default:
ChatHandler(this).PSendSysMessage("Raid difficulty has changed recently, and may not change again for %u sec.", preventionTime);
ChatHandler(this).PSendSysMessage("Raid difficulty has changed recently, and may not change again for {} sec.", preventionTime);
break;
}
+16 -16
View File
@@ -348,7 +348,7 @@ public:
switch (result)
{
case AOR_OK:
handler->PSendSysMessage(LANG_ACCOUNT_DELETED, accountName.c_str());
handler->PSendSysMessage(LANG_ACCOUNT_DELETED, accountName);
break;
case AOR_NAME_NOT_EXIST:
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
@@ -400,12 +400,12 @@ public:
{
Field* fieldsLogin = resultLogin->Fetch();
handler->PSendSysMessage(LANG_ACCOUNT_LIST_LINE,
fieldsLogin[0].Get<std::string>().c_str(), name.c_str(), fieldsLogin[1].Get<std::string>().c_str(),
fieldsLogin[0].Get<std::string>(), name, fieldsLogin[1].Get<std::string>(),
fieldsDB[2].Get<uint16>(), fieldsDB[3].Get<uint16>(), fieldsLogin[3].Get<uint8>(),
fieldsLogin[2].Get<uint8>());
}
else
handler->PSendSysMessage(LANG_ACCOUNT_LIST_ERROR, name.c_str());
handler->PSendSysMessage(LANG_ACCOUNT_LIST_ERROR, name);
} while (result->NextRow());
handler->SendSysMessage(LANG_ACCOUNT_LIST_BAR);
@@ -428,14 +428,14 @@ public:
std::string accountName = _accountName;
if (!Utf8ToUpperOnlyLatin(accountName))
{
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
return false;
}
uint32 accountId = AccountMgr::GetId(accountName);
if (!accountId)
{
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
return false;
}
@@ -599,14 +599,14 @@ public:
if (!Utf8ToUpperOnlyLatin(accountName))
{
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
return false;
}
uint32 targetAccountId = AccountMgr::GetId(accountName);
if (!targetAccountId)
{
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
return false;
}
@@ -651,7 +651,7 @@ public:
stmt->SetData(1, targetAccountId);
LoginDatabase.Execute(stmt);
handler->PSendSysMessage(LANG_2FA_SECRET_SET_COMPLETE, accountName.c_str());
handler->PSendSysMessage(LANG_2FA_SECRET_SET_COMPLETE, accountName);
return true;
}
@@ -691,14 +691,14 @@ public:
accountName = account;
if (!Utf8ToUpperOnlyLatin(accountName))
{
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
return false;
}
accountId = AccountMgr::GetId(accountName);
if (!accountId)
{
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
return false;
}
}
@@ -720,7 +720,7 @@ public:
LoginDatabase.Execute(stmt);
handler->PSendSysMessage(LANG_ACCOUNT_SETADDON, accountName.c_str(), accountId, *expansion);
handler->PSendSysMessage(LANG_ACCOUNT_SETADDON, accountName, accountId, *expansion);
return true;
}
@@ -755,7 +755,7 @@ public:
targetAccountName = arg1;
if (!Utf8ToUpperOnlyLatin(targetAccountName))
{
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, targetAccountName.c_str());
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, targetAccountName);
return false;
}
}
@@ -838,7 +838,7 @@ public:
LoginDatabase.Execute(stmt);
}
handler->PSendSysMessage(LANG_YOU_CHANGE_SECURITY, targetAccountName.c_str(), gm);
handler->PSendSysMessage(LANG_YOU_CHANGE_SECURITY, targetAccountName, gm);
return true;
}
@@ -859,14 +859,14 @@ public:
std::string accountName = account;
if (!Utf8ToUpperOnlyLatin(accountName))
{
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
return false;
}
uint32 targetAccountId = AccountMgr::GetId(accountName);
if (!targetAccountId)
{
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
return false;
}
@@ -889,7 +889,7 @@ public:
handler->SendSysMessage(LANG_COMMAND_PASSWORD);
break;
case AOR_NAME_NOT_EXIST:
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
return false;
case AOR_PASS_TOO_LONG:
handler->SendErrorMessage(LANG_PASSWORD_TOO_LONG);
+14 -14
View File
@@ -58,7 +58,7 @@ public:
{
if (sArenaTeamMgr->GetArenaTeamByName(name))
{
handler->SendErrorMessage(LANG_ARENA_ERROR_NAME_EXISTS, name.c_str());
handler->SendErrorMessage(LANG_ARENA_ERROR_NAME_EXISTS, name);
return false;
}
@@ -70,7 +70,7 @@ public:
if (Player::GetArenaTeamIdFromDB(captain->GetGUID(), type) != 0)
{
handler->SendErrorMessage(LANG_ARENA_ERROR_SIZE, captain->GetName().c_str());
handler->SendErrorMessage(LANG_ARENA_ERROR_SIZE, captain->GetName());
return false;
}
@@ -84,7 +84,7 @@ public:
}
sArenaTeamMgr->AddArenaTeam(arena);
handler->PSendSysMessage(LANG_ARENA_CREATE, arena->GetName().c_str(), arena->GetId(), arena->GetType(), arena->GetCaptain().GetCounter());
handler->PSendSysMessage(LANG_ARENA_CREATE, arena->GetName(), arena->GetId(), arena->GetType(), arena->GetCaptain().ToString());
return true;
}
@@ -110,7 +110,7 @@ public:
delete(arena);
handler->PSendSysMessage(LANG_ARENA_DISBAND, name.c_str(), teamId);
handler->PSendSysMessage(LANG_ARENA_DISBAND, name, teamId);
return true;
}
@@ -119,13 +119,13 @@ public:
ArenaTeam* arena = sArenaTeamMgr->GetArenaTeamByName(oldName);
if (!arena)
{
handler->SendErrorMessage(LANG_ARENA_ERROR_NAME_NOT_FOUND, oldName.c_str());
handler->SendErrorMessage(LANG_ARENA_ERROR_NAME_NOT_FOUND, oldName);
return false;
}
if (sArenaTeamMgr->GetArenaTeamByName(newName))
{
handler->SendErrorMessage(LANG_ARENA_ERROR_NAME_EXISTS, oldName.c_str());
handler->SendErrorMessage(LANG_ARENA_ERROR_NAME_EXISTS, oldName);
return false;
}
@@ -141,7 +141,7 @@ public:
return false;
}
handler->PSendSysMessage(LANG_ARENA_RENAME, arena->GetId(), oldName.c_str(), newName.c_str());
handler->PSendSysMessage(LANG_ARENA_RENAME, arena->GetId(), oldName, newName);
return true;
}
@@ -169,13 +169,13 @@ public:
if (!arena->IsMember(target->GetGUID()))
{
handler->SendErrorMessage(LANG_ARENA_ERROR_NOT_MEMBER, target->GetName().c_str(), arena->GetName().c_str());
handler->SendErrorMessage(LANG_ARENA_ERROR_NOT_MEMBER, target->GetName(), arena->GetName());
return false;
}
if (arena->GetCaptain() == target->GetGUID())
{
handler->SendErrorMessage(LANG_ARENA_ERROR_CAPTAIN, target->GetName().c_str(), arena->GetName().c_str());
handler->SendErrorMessage(LANG_ARENA_ERROR_CAPTAIN, target->GetName(), arena->GetName());
return false;
}
@@ -183,7 +183,7 @@ public:
sCharacterCache->GetCharacterNameByGuid(arena->GetCaptain(), oldCaptainName);
arena->SetCaptain(target->GetGUID());
handler->PSendSysMessage(LANG_ARENA_CAPTAIN, arena->GetName().c_str(), arena->GetId(), oldCaptainName.c_str(), target->GetName().c_str());
handler->PSendSysMessage(LANG_ARENA_CAPTAIN, arena->GetName(), arena->GetId(), oldCaptainName, target->GetName());
return true;
}
@@ -197,10 +197,10 @@ public:
return false;
}
handler->PSendSysMessage(LANG_ARENA_INFO_HEADER, arena->GetName().c_str(), arena->GetId(), arena->GetRating(), arena->GetType(), arena->GetType());
handler->PSendSysMessage(LANG_ARENA_INFO_HEADER, arena->GetName(), arena->GetId(), arena->GetRating(), arena->GetType(), arena->GetType());
for (auto const& itr : arena->GetMembers())
handler->PSendSysMessage(LANG_ARENA_INFO_MEMBERS, itr.Name.c_str(), itr.Guid.GetCounter(), itr.PersonalRating, (arena->GetCaptain() == itr.Guid ? "- Captain" : ""));
handler->PSendSysMessage(LANG_ARENA_INFO_MEMBERS, itr.Name, itr.Guid.ToString(), itr.PersonalRating, (arena->GetCaptain() == itr.Guid ? "- Captain" : ""));
return true;
}
@@ -217,7 +217,7 @@ public:
{
if (handler->GetSession())
{
handler->PSendSysMessage(LANG_ARENA_LOOKUP, team->GetName().c_str(), team->GetId(), team->GetType(), team->GetType());
handler->PSendSysMessage(LANG_ARENA_LOOKUP, team->GetName(), team->GetId(), team->GetType(), team->GetType());
found = true;
continue;
}
@@ -225,7 +225,7 @@ public:
}
if (!found)
handler->PSendSysMessage(LANG_ARENA_ERROR_NAME_NOT_FOUND, std::string(needle).c_str());
handler->PSendSysMessage(LANG_ARENA_ERROR_NAME_NOT_FOUND, std::string(needle));
return true;
}
+39 -39
View File
@@ -131,17 +131,17 @@ public:
if (atoi(durationStr) > 0)
{
if (!sWorld->getBoolConfig(CONFIG_SHOW_BAN_IN_WORLD))
handler->PSendSysMessage(LANG_BAN_YOUBANNED, name.c_str(), secsToTimeString(TimeStringToSecs(durationStr), true).c_str(), reasonStr);
handler->PSendSysMessage(LANG_BAN_YOUBANNED, name, secsToTimeString(TimeStringToSecs(durationStr), true), reasonStr);
}
else
{
if (!sWorld->getBoolConfig(CONFIG_SHOW_BAN_IN_WORLD))
handler->PSendSysMessage(LANG_BAN_YOUPERMBANNED, name.c_str(), reasonStr);
handler->PSendSysMessage(LANG_BAN_YOUPERMBANNED, name, reasonStr);
}
break;
case BAN_NOTFOUND:
{
handler->SendErrorMessage(LANG_BAN_NOTFOUND, "character", name.c_str());
handler->SendErrorMessage(LANG_BAN_NOTFOUND, "character", name);
return false;
}
default:
@@ -185,7 +185,7 @@ public:
case BAN_ACCOUNT:
if (!Utf8ToUpperOnlyLatin(nameOrIP))
{
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, nameOrIP.c_str());
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, nameOrIP);
return false;
}
break;
@@ -224,12 +224,12 @@ public:
if (atoi(durationStr) > 0)
{
if (!sWorld->getBoolConfig(CONFIG_SHOW_BAN_IN_WORLD))
handler->PSendSysMessage(LANG_BAN_YOUBANNED, nameOrIP.c_str(), secsToTimeString(TimeStringToSecs(durationStr), true).c_str(), reasonStr);
handler->PSendSysMessage(LANG_BAN_YOUBANNED, nameOrIP, secsToTimeString(TimeStringToSecs(durationStr), true), reasonStr);
}
else
{
if (!sWorld->getBoolConfig(CONFIG_SHOW_BAN_IN_WORLD))
handler->PSendSysMessage(LANG_BAN_YOUPERMBANNED, nameOrIP.c_str(), reasonStr);
handler->PSendSysMessage(LANG_BAN_YOUPERMBANNED, nameOrIP, reasonStr);
}
break;
case BAN_SYNTAX_ERROR:
@@ -238,13 +238,13 @@ public:
switch (mode)
{
default:
handler->SendErrorMessage(LANG_BAN_NOTFOUND, "account", nameOrIP.c_str());
handler->SendErrorMessage(LANG_BAN_NOTFOUND, "account", nameOrIP);
break;
case BAN_CHARACTER:
handler->SendErrorMessage(LANG_BAN_NOTFOUND, "character", nameOrIP.c_str());
handler->SendErrorMessage(LANG_BAN_NOTFOUND, "character", nameOrIP);
break;
case BAN_IP:
handler->SendErrorMessage(LANG_BAN_NOTFOUND, "ip", nameOrIP.c_str());
handler->SendErrorMessage(LANG_BAN_NOTFOUND, "ip", nameOrIP);
break;
}
return false;
@@ -270,14 +270,14 @@ public:
std::string accountName = nameStr;
if (!Utf8ToUpperOnlyLatin(accountName))
{
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
return false;
}
uint32 accountId = AccountMgr::GetId(accountName);
if (!accountId)
{
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
return true;
}
@@ -305,7 +305,7 @@ public:
bool permanent = (fields[1].Get<uint64>() == uint64(0));
std::string banTime = permanent ? handler->GetAcoreString(LANG_BANINFO_INFINITE) : secsToTimeString(fields[1].Get<uint64>(), true);
handler->PSendSysMessage(LANG_BANINFO_HISTORYENTRY,
fields[0].Get<std::string>().c_str(), banTime.c_str(), active ? handler->GetAcoreString(LANG_YES) : handler->GetAcoreString(LANG_NO), fields[4].Get<std::string>().c_str(), fields[5].Get<std::string>().c_str());
fields[0].Get<std::string>(), banTime, active ? handler->GetAcoreString(LANG_YES) : handler->GetAcoreString(LANG_NO), fields[4].Get<std::string>(), fields[5].Get<std::string>());
} while (result->NextRow());
return true;
@@ -338,11 +338,11 @@ public:
PreparedQueryResult result = CharacterDatabase.Query(stmt);
if (!result)
{
handler->PSendSysMessage(LANG_CHAR_NOT_BANNED, name.c_str());
handler->PSendSysMessage(LANG_CHAR_NOT_BANNED, name);
return true;
}
handler->PSendSysMessage(LANG_BANINFO_BANHISTORY, name.c_str());
handler->PSendSysMessage(LANG_BANINFO_BANHISTORY, name);
do
{
Field* fields = result->Fetch();
@@ -353,7 +353,7 @@ public:
bool permanent = (fields[1].Get<uint32>() == uint32(0));
std::string banTime = permanent ? handler->GetAcoreString(LANG_BANINFO_INFINITE) : secsToTimeString(fields[1].Get<uint64>(), true);
handler->PSendSysMessage(LANG_BANINFO_HISTORYENTRY,
fields[0].Get<std::string>().c_str(), banTime.c_str(), active ? handler->GetAcoreString(LANG_YES) : handler->GetAcoreString(LANG_NO), fields[4].Get<std::string>().c_str(), fields[5].Get<std::string>().c_str());
fields[0].Get<std::string>(), banTime, active ? handler->GetAcoreString(LANG_YES) : handler->GetAcoreString(LANG_NO), fields[4].Get<std::string>(), fields[5].Get<std::string>());
} while (result->NextRow());
return true;
@@ -391,8 +391,8 @@ public:
Field* fields = result->Fetch();
bool permanent = fields[6].Get<uint64>() == 1;
handler->PSendSysMessage(LANG_BANINFO_IPENTRY,
fields[0].Get<std::string>().c_str(), fields[1].Get<std::string>().c_str(), permanent ? handler->GetAcoreString(LANG_BANINFO_NEVER) : fields[2].Get<std::string>().c_str(),
permanent ? handler->GetAcoreString(LANG_BANINFO_INFINITE) : secsToTimeString(fields[3].Get<uint64>(), true).c_str(), fields[4].Get<std::string>().c_str(), fields[5].Get<std::string>().c_str());
fields[0].Get<std::string>(), fields[1].Get<std::string>(), permanent ? handler->GetAcoreString(LANG_BANINFO_NEVER) : fields[2].Get<std::string>(),
permanent ? handler->GetAcoreString(LANG_BANINFO_INFINITE) : secsToTimeString(fields[3].Get<uint64>(), true), fields[4].Get<std::string>(), fields[5].Get<std::string>());
return true;
}
@@ -444,7 +444,7 @@ public:
if (banResult)
{
Field* fields2 = banResult->Fetch();
handler->PSendSysMessage("%s", fields2[0].Get<std::string>().c_str());
handler->PSendSysMessage("%s", fields2[0].Get<std::string>());
}
} while (result->NextRow());
}
@@ -481,16 +481,16 @@ public:
if (fields2[0].Get<uint32>() == fields2[1].Get<uint32>())
{
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d| permanent |%-15.15s|%-15.15s|",
accountName.c_str(), tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
fields2[2].Get<std::string>().c_str(), fields2[3].Get<std::string>().c_str());
accountName, tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
fields2[2].Get<std::string>(), fields2[3].Get<std::string>());
}
else
{
tm tmUnban = Acore::Time::TimeBreakdown(fields2[1].Get<uint32>());
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d|%02d-%02d-%02d %02d:%02d|%-15.15s|%-15.15s|",
accountName.c_str(), tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
accountName, tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
tmUnban.tm_year % 100, tmUnban.tm_mon + 1, tmUnban.tm_mday, tmUnban.tm_hour, tmUnban.tm_min,
fields2[2].Get<std::string>().c_str(), fields2[3].Get<std::string>().c_str());
fields2[2].Get<std::string>(), fields2[3].Get<std::string>());
}
} while (banInfo->NextRow());
}
@@ -534,7 +534,7 @@ public:
PreparedQueryResult banResult = CharacterDatabase.Query(stmt2);
if (banResult)
handler->PSendSysMessage("%s", (*banResult)[0].Get<std::string>().c_str());
handler->PSendSysMessage("%s", (*banResult)[0].Get<std::string>());
} while (result->NextRow());
}
// Console wide output
@@ -565,16 +565,16 @@ public:
if (banFields[0].Get<uint32>() == banFields[1].Get<uint32>())
{
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d| permanent |%-15.15s|%-15.15s|",
char_name.c_str(), tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
banFields[2].Get<std::string>().c_str(), banFields[3].Get<std::string>().c_str());
char_name, tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
banFields[2].Get<std::string>(), banFields[3].Get<std::string>());
}
else
{
tm tmUnban = Acore::Time::TimeBreakdown(banFields[1].Get<uint32>());
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d|%02d-%02d-%02d %02d:%02d|%-15.15s|%-15.15s|",
char_name.c_str(), tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
char_name, tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
tmUnban.tm_year % 100, tmUnban.tm_mon + 1, tmUnban.tm_mday, tmUnban.tm_hour, tmUnban.tm_min,
banFields[2].Get<std::string>().c_str(), banFields[3].Get<std::string>().c_str());
banFields[2].Get<std::string>(), banFields[3].Get<std::string>());
}
} while (banInfo->NextRow());
}
@@ -621,7 +621,7 @@ public:
do
{
Field* fields = result->Fetch();
handler->PSendSysMessage("%s", fields[0].Get<std::string>().c_str());
handler->PSendSysMessage("%s", fields[0].Get<std::string>());
} while (result->NextRow());
}
// Console wide output
@@ -638,16 +638,16 @@ public:
if (fields[1].Get<uint32>() == fields[2].Get<uint32>())
{
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d| permanent |%-15.15s|%-15.15s|",
fields[0].Get<std::string>().c_str(), tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
fields[3].Get<std::string>().c_str(), fields[4].Get<std::string>().c_str());
fields[0].Get<std::string>(), tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
fields[3].Get<std::string>(), fields[4].Get<std::string>());
}
else
{
tm tmUnban = Acore::Time::TimeBreakdown(fields[2].Get<uint32>());
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d|%02d-%02d-%02d %02d:%02d|%-15.15s|%-15.15s|",
fields[0].Get<std::string>().c_str(), tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
fields[0].Get<std::string>(), tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
tmUnban.tm_year % 100, tmUnban.tm_mon + 1, tmUnban.tm_mday, tmUnban.tm_hour, tmUnban.tm_min,
fields[3].Get<std::string>().c_str(), fields[4].Get<std::string>().c_str());
fields[3].Get<std::string>(), fields[4].Get<std::string>());
}
} while (result->NextRow());
@@ -714,7 +714,7 @@ public:
case BAN_ACCOUNT:
if (!Utf8ToUpperOnlyLatin(nameOrIP))
{
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, nameOrIP.c_str());
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, nameOrIP);
return false;
}
break;
@@ -735,21 +735,21 @@ public:
{
case BAN_ACCOUNT:
if (sBan->RemoveBanAccount(nameOrIP))
handler->PSendSysMessage(LANG_UNBAN_UNBANNED, nameOrIP.c_str());
handler->PSendSysMessage(LANG_UNBAN_UNBANNED, nameOrIP);
else
handler->PSendSysMessage(LANG_UNBAN_ERROR, nameOrIP.c_str());
handler->PSendSysMessage(LANG_UNBAN_ERROR, nameOrIP);
break;
case BAN_CHARACTER:
if (sBan->RemoveBanAccountByPlayerName(nameOrIP))
handler->PSendSysMessage(LANG_UNBAN_UNBANNED, nameOrIP.c_str());
handler->PSendSysMessage(LANG_UNBAN_UNBANNED, nameOrIP);
else
handler->PSendSysMessage(LANG_UNBAN_ERROR, nameOrIP.c_str());
handler->PSendSysMessage(LANG_UNBAN_ERROR, nameOrIP);
break;
case BAN_IP:
if (sBan->RemoveBanIP(nameOrIP))
handler->PSendSysMessage(LANG_UNBAN_UNBANNED, nameOrIP.c_str());
handler->PSendSysMessage(LANG_UNBAN_UNBANNED, nameOrIP);
else
handler->PSendSysMessage(LANG_UNBAN_ERROR, nameOrIP.c_str());
handler->PSendSysMessage(LANG_UNBAN_ERROR, nameOrIP);
break;
default:
break;
+4 -4
View File
@@ -65,8 +65,8 @@ public:
return false;
}
handler->PSendSysMessage(LANG_COMMAND_CACHE_INFO, cache->Name, cache->Guid.GetCounter(), cache->AccountId,
cache->Class, cache->Race, cache->Sex, cache->Level, cache->MailCount, cache->GuildId, cache->GroupGuid.GetCounter(),
handler->PSendSysMessage(LANG_COMMAND_CACHE_INFO, cache->Name, cache->Guid.ToString(), cache->AccountId,
cache->Class, cache->Race, cache->Sex, cache->Level, cache->MailCount, cache->GuildId, cache->GroupGuid.ToString(),
cache->ArenaTeamId[ARENA_SLOT_2v2], cache->ArenaTeamId[ARENA_SLOT_3v3], cache->ArenaTeamId[ARENA_SLOT_5v5]);
handler->SetSentErrorMessage(false);
@@ -87,7 +87,7 @@ public:
}
sCharacterCache->DeleteCharacterCacheEntry(player->GetGUID(), player->GetName());
handler->PSendSysMessage(LANG_COMMAND_CACHE_DELETE, player->GetName(), player->GetGUID().GetCounter());
handler->PSendSysMessage(LANG_COMMAND_CACHE_DELETE, player->GetName(), player->GetGUID().ToString());
handler->SetSentErrorMessage(false);
return true;
}
@@ -141,7 +141,7 @@ public:
sCharacterCache->RefreshCacheEntry(player->GetGUID().GetCounter());
}
handler->PSendSysMessage(LANG_COMMAND_CACHE_REFRESH, player->GetName(), player->GetGUID().GetCounter());
handler->PSendSysMessage(LANG_COMMAND_CACHE_REFRESH, player->GetName(), player->GetGUID().ToString());
handler->SetSentErrorMessage(false);
return true;
}
+45 -45
View File
@@ -188,12 +188,12 @@ public:
if (!handler->GetSession())
handler->PSendSysMessage(LANG_CHARACTER_DELETED_LIST_LINE_CONSOLE,
itr->lowGuid, itr->name.c_str(), itr->accountName.empty() ? "<Not existing>" : itr->accountName.c_str(),
itr->accountId, dateStr.c_str());
itr->lowGuid, itr->name, itr->accountName.empty() ? "<Not existing>" : itr->accountName,
itr->accountId, dateStr);
else
handler->PSendSysMessage(LANG_CHARACTER_DELETED_LIST_LINE_CHAT,
itr->lowGuid, itr->name.c_str(), itr->accountName.empty() ? "<Not existing>" : itr->accountName.c_str(),
itr->accountId, dateStr.c_str());
itr->lowGuid, itr->name, itr->accountName.empty() ? "<Not existing>" : itr->accountName,
itr->accountId, dateStr);
}
if (!handler->GetSession())
@@ -214,7 +214,7 @@ public:
{
if (delInfo.accountName.empty()) // account does not exist
{
handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_ACCOUNT, delInfo.name.c_str(), delInfo.lowGuid, delInfo.accountId);
handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_ACCOUNT, delInfo.name, delInfo.lowGuid, delInfo.accountId);
return;
}
@@ -222,13 +222,13 @@ public:
uint32 charcount = AccountMgr::GetCharactersCount(delInfo.accountId);
if (charcount >= 10)
{
handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_FULL, delInfo.name.c_str(), delInfo.lowGuid, delInfo.accountId);
handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_FULL, delInfo.name, delInfo.lowGuid, delInfo.accountId);
return;
}
if (sCharacterCache->GetCharacterGuidByName(delInfo.name))
{
handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_NAME, delInfo.name.c_str(), delInfo.lowGuid, delInfo.accountId);
handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_NAME, delInfo.name, delInfo.lowGuid, delInfo.accountId);
return;
}
@@ -257,11 +257,11 @@ public:
if (handler->needReportToTarget(player))
{
if (oldLevel == newLevel)
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_PROGRESS_RESET, handler->GetNameLink().c_str());
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_PROGRESS_RESET, handler->GetNameLink());
else if (oldLevel < newLevel)
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_UP, handler->GetNameLink().c_str(), newLevel);
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_UP, handler->GetNameLink(), newLevel);
else // if (oldlevel > newlevel)
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_DOWN, handler->GetNameLink().c_str(), newLevel);
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_DOWN, handler->GetNameLink(), newLevel);
}
}
else
@@ -314,7 +314,7 @@ public:
// send title in "id (idx:idx) - [namedlink locale]" format
if (handler->GetSession())
handler->PSendSysMessage(LANG_TITLE_LIST_CHAT, id, titleInfo->bit_index, id, titleName.c_str(), localeNames[loc], knownStr, activeStr);
handler->PSendSysMessage(LANG_TITLE_LIST_CHAT, id, titleInfo->bit_index, id, titleName, localeNames[loc], knownStr, activeStr);
else
handler->PSendSysMessage(LANG_TITLE_LIST_CONSOLE, id, titleInfo->bit_index, name, localeNames[loc], knownStr, activeStr);
}
@@ -371,7 +371,7 @@ public:
PreparedQueryResult result = CharacterDatabase.Query(stmt);
if (result)
{
handler->SendErrorMessage(LANG_RENAME_PLAYER_ALREADY_EXISTS, newName.c_str());
handler->SendErrorMessage(LANG_RENAME_PLAYER_ALREADY_EXISTS, newName);
return false;
}
@@ -399,13 +399,13 @@ public:
sCharacterCache->UpdateCharacterData(player->GetGUID(), newName);
handler->PSendSysMessage(LANG_RENAME_PLAYER_WITH_NEW_NAME, player->GetName().c_str(), newName.c_str());
handler->PSendSysMessage(LANG_RENAME_PLAYER_WITH_NEW_NAME, player->GetName(), newName);
}
else
{
if (Player* target = player->GetConnectedPlayer())
{
handler->PSendSysMessage(LANG_RENAME_PLAYER, handler->GetNameLink(target).c_str());
handler->PSendSysMessage(LANG_RENAME_PLAYER, handler->GetNameLink(target));
target->SetAtLoginFlag(AT_LOGIN_RENAME);
}
else
@@ -414,7 +414,7 @@ public:
if (handler->HasLowerSecurity(nullptr, player->GetGUID()))
return false;
handler->PSendSysMessage(LANG_RENAME_PLAYER_GUID, handler->playerLink(*player).c_str(), player->GetGUID().GetCounter());
handler->PSendSysMessage(LANG_RENAME_PLAYER_GUID, handler->playerLink(*player), player->GetGUID().ToString());
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
stmt->SetData(0, uint16(AT_LOGIN_RENAME));
@@ -450,7 +450,7 @@ public:
HandleCharacterLevel(player->GetConnectedPlayer(), player->GetGUID(), oldlevel, newlevel, handler);
if (!handler->GetSession() || (handler->GetSession()->GetPlayer() != player->GetConnectedPlayer())) // including chr == NULL
handler->PSendSysMessage(LANG_YOU_CHANGE_LVL, handler->playerLink(*player).c_str(), newlevel);
handler->PSendSysMessage(LANG_YOU_CHANGE_LVL, handler->playerLink(*player), newlevel);
return true;
}
@@ -465,12 +465,12 @@ public:
if (Player* target = player->GetConnectedPlayer())
{
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER, handler->GetNameLink(target).c_str());
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER, handler->GetNameLink(target));
target->SetAtLoginFlag(AT_LOGIN_CUSTOMIZE);
}
else
{
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player).c_str(), player->GetGUID().GetCounter());
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player), player->GetGUID().ToString());
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
stmt->SetData(0, static_cast<uint16>(AT_LOGIN_CUSTOMIZE));
stmt->SetData(1, player->GetGUID().GetCounter());
@@ -489,12 +489,12 @@ public:
if (Player* target = player->GetConnectedPlayer())
{
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER, handler->GetNameLink(target).c_str());
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER, handler->GetNameLink(target));
target->SetAtLoginFlag(AT_LOGIN_CHANGE_FACTION);
}
else
{
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player).c_str(), player->GetGUID().GetCounter());
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player), player->GetGUID().ToString());
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
stmt->SetData(0, uint16(AT_LOGIN_CHANGE_FACTION));
stmt->SetData(1, player->GetGUID().GetCounter());
@@ -513,12 +513,12 @@ public:
if (Player* target = player->GetConnectedPlayer())
{
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER, handler->GetNameLink(target).c_str());
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER, handler->GetNameLink(target));
target->SetAtLoginFlag(AT_LOGIN_CHANGE_RACE);
}
else
{
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player).c_str(), player->GetGUID().GetCounter());
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, handler->playerLink(*player), player->GetGUID().ToString());
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
stmt->SetData(0, uint16(AT_LOGIN_CHANGE_RACE));
stmt->SetData(1, player->GetGUID().GetCounter());
@@ -746,7 +746,7 @@ public:
AccountMgr::GetName(accountId, accountName);
Player::DeleteFromDB(player.GetGUID().GetCounter(), accountId, true, true);
handler->PSendSysMessage(LANG_CHARACTER_DELETED, player.GetName().c_str(), player.GetGUID().GetCounter(), accountName.c_str(), accountId);
handler->PSendSysMessage(LANG_CHARACTER_DELETED, player.GetName(), player.GetGUID().ToString(), accountName, accountId);
return true;
}
@@ -771,7 +771,7 @@ public:
HandleCharacterLevel(player->GetConnectedPlayer(), player->GetGUID(), oldlevel, newlevel, handler);
if (!handler->GetSession() || (handler->GetSession()->GetPlayer() != player->GetConnectedPlayer())) // including chr == NULL
handler->PSendSysMessage(LANG_YOU_CHANGE_LVL, handler->playerLink(*player).c_str(), newlevel);
handler->PSendSysMessage(LANG_YOU_CHANGE_LVL, handler->playerLink(*player), newlevel);
return true;
}
@@ -819,13 +819,13 @@ public:
handler->PSendSysMessage(LANG_COMMAND_IMPORT_SUCCESS);
break;
case DUMP_FILE_OPEN_ERROR:
handler->SendErrorMessage(LANG_FILE_OPEN_FAIL, fileName.c_str());
handler->SendErrorMessage(LANG_FILE_OPEN_FAIL, fileName);
return false;
case DUMP_FILE_BROKEN:
handler->SendErrorMessage(LANG_DUMP_BROKEN, fileName.c_str());
handler->SendErrorMessage(LANG_DUMP_BROKEN, fileName);
return false;
case DUMP_TOO_MANY_CHARS:
handler->SendErrorMessage(LANG_ACCOUNT_CHARACTER_LIST_FULL, account.GetName().c_str(), account.GetID());
handler->SendErrorMessage(LANG_ACCOUNT_CHARACTER_LIST_FULL, account.GetName(), account.GetID());
return false;
default:
handler->SendErrorMessage(LANG_COMMAND_IMPORT_FAILED);
@@ -860,7 +860,7 @@ public:
case DUMP_SUCCESS:
break;
case DUMP_TOO_MANY_CHARS:
handler->SendErrorMessage(LANG_ACCOUNT_CHARACTER_LIST_FULL, account.GetName().c_str(), account.GetID());
handler->SendErrorMessage(LANG_ACCOUNT_CHARACTER_LIST_FULL, account.GetName(), account.GetID());
return false;
case DUMP_FILE_OPEN_ERROR: // this error code should not happen
case DUMP_FILE_BROKEN: // this error code should not happen
@@ -884,7 +884,7 @@ public:
handler->PSendSysMessage(LANG_COMMAND_EXPORT_SUCCESS);
break;
case DUMP_FILE_OPEN_ERROR:
handler->SendErrorMessage(LANG_FILE_OPEN_FAIL, fileName.c_str());
handler->SendErrorMessage(LANG_FILE_OPEN_FAIL, fileName);
return false;
case DUMP_CHARACTER_DELETED:
handler->SendErrorMessage(LANG_COMMAND_EXPORT_DELETED_CHAR);
@@ -942,7 +942,7 @@ public:
std::ostringstream ItemString;
ItemString << std::hex << ItemQualityColors[item->GetTemplate()->Quality];
handler->PSendSysMessage("%u - |c%s|Hitem:%u:0:0:0:0:0:0:0:0:0|h[%s]|h|r - %u", Counter, ItemString.str().c_str(), item->GetEntry(), item->GetTemplate()->Name1.c_str(), item->GetCount());
handler->PSendSysMessage("{} - |c{}|Hitem:{}:0:0:0:0:0:0:0:0:0|h[{}]|h|r - {}", Counter, ItemString.str(), item->GetEntry(), item->GetTemplate()->Name1, item->GetCount());
}
}
}
@@ -958,7 +958,7 @@ public:
std::ostringstream ItemString;
ItemString << std::hex << ItemQualityColors[item->GetTemplate()->Quality];
handler->PSendSysMessage("%u - |c%s|Hitem:%u:0:0:0:0:0:0:0:0:0|h[%s]|h|r - %u", Counter, ItemString.str().c_str(), item->GetEntry(), item->GetTemplate()->Name1.c_str(), item->GetCount());
handler->PSendSysMessage("{} - |c{}|Hitem:{}:0:0:0:0:0:0:0:0:0|h[{}]|h|r - {}", Counter, ItemString.str(), item->GetEntry(), item->GetTemplate()->Name1, item->GetCount());
}
}
}
@@ -998,43 +998,43 @@ public:
switch (SkillID)
{
case SKILL_ALCHEMY:
handler->PSendSysMessage("%u - Alchemy - %u", Counter, player->GetSkillValue(SkillID));
handler->PSendSysMessage("{} - Alchemy - {}", Counter, player->GetSkillValue(SkillID));
break;
case SKILL_BLACKSMITHING:
handler->PSendSysMessage("%u - Blacksmithing - %u", Counter, player->GetSkillValue(SkillID));
handler->PSendSysMessage("{} - Blacksmithing - {}", Counter, player->GetSkillValue(SkillID));
break;
case SKILL_ENCHANTING:
handler->PSendSysMessage("%u - Enchanting - %u", Counter, player->GetSkillValue(SkillID));
handler->PSendSysMessage("{} - Enchanting - {}", Counter, player->GetSkillValue(SkillID));
break;
case SKILL_ENGINEERING:
handler->PSendSysMessage("%u - Engineering - %u", Counter, player->GetSkillValue(SkillID));
handler->PSendSysMessage("{} - Engineering - {}", Counter, player->GetSkillValue(SkillID));
break;
case SKILL_INSCRIPTION:
handler->PSendSysMessage("%u - Inscription - %u", Counter, player->GetSkillValue(SkillID));
handler->PSendSysMessage("{} - Inscription - {}", Counter, player->GetSkillValue(SkillID));
break;
case SKILL_JEWELCRAFTING:
handler->PSendSysMessage("%u - Jewelcrafting - %u", Counter, player->GetSkillValue(SkillID));
handler->PSendSysMessage("{} - Jewelcrafting - {}", Counter, player->GetSkillValue(SkillID));
break;
case SKILL_LEATHERWORKING:
handler->PSendSysMessage("%u - Leatherworking - %u", Counter, player->GetSkillValue(SkillID));
handler->PSendSysMessage("{} - Leatherworking - {}", Counter, player->GetSkillValue(SkillID));
break;
case SKILL_TAILORING:
handler->PSendSysMessage("%u - Tailoring - %u", Counter, player->GetSkillValue(SkillID));
handler->PSendSysMessage("{} - Tailoring - {}", Counter, player->GetSkillValue(SkillID));
break;
case SKILL_SKINNING:
handler->PSendSysMessage("%u - Skinning - %u", Counter, player->GetSkillValue(SkillID));
handler->PSendSysMessage("{} - Skinning - {}", Counter, player->GetSkillValue(SkillID));
break;
case SKILL_HERBALISM:
handler->PSendSysMessage("%u - Herbalism - %u", Counter, player->GetSkillValue(SkillID));
handler->PSendSysMessage("{} - Herbalism - {}", Counter, player->GetSkillValue(SkillID));
break;
case SKILL_MINING:
handler->PSendSysMessage("%u - Mining - %u", Counter, player->GetSkillValue(SkillID));
handler->PSendSysMessage("{} - Mining - {}", Counter, player->GetSkillValue(SkillID));
break;
case SKILL_COOKING:
handler->PSendSysMessage("%u - Cooking - %u", Counter, player->GetSkillValue(SkillID));
handler->PSendSysMessage("{} - Cooking - {}", Counter, player->GetSkillValue(SkillID));
break;
case SKILL_FIRST_AID:
handler->PSendSysMessage("%u - First Aid - %u", Counter, player->GetSkillValue(SkillID));
handler->PSendSysMessage("{} - First Aid - {}", Counter, player->GetSkillValue(SkillID));
break;
default:
break;
@@ -1071,7 +1071,7 @@ public:
{
std::string accName;
AccountMgr::GetName(cache->AccountId, accName);
handler->PSendSysMessage(LANG_CMD_CHAR_CHANGE_ACC_SUCCESS, player->GetName(), player->GetGUID().GetCounter(), accName, cache->AccountId, accountName, accountId);
handler->PSendSysMessage(LANG_CMD_CHAR_CHANGE_ACC_SUCCESS, player->GetName(), player->GetGUID().ToString(), accName, cache->AccountId, accountName, accountId);
}
if (player->IsConnected())
+8 -8
View File
@@ -185,16 +185,16 @@ public:
if (enable)
{
chr->SetTaxiCheater(true);
handler->PSendSysMessage(LANG_YOU_GIVE_TAXIS, handler->GetNameLink(chr).c_str());
handler->PSendSysMessage(LANG_YOU_GIVE_TAXIS, handler->GetNameLink(chr));
if (handler->needReportToTarget(chr))
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_TAXIS_ADDED, handler->GetNameLink().c_str());
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_TAXIS_ADDED, handler->GetNameLink());
}
else
{
chr->SetTaxiCheater(false);
handler->PSendSysMessage(LANG_YOU_REMOVE_TAXIS, handler->GetNameLink(chr).c_str());
handler->PSendSysMessage(LANG_YOU_REMOVE_TAXIS, handler->GetNameLink(chr));
if (handler->needReportToTarget(chr))
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_TAXIS_REMOVED, handler->GetNameLink().c_str());
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_TAXIS_REMOVED, handler->GetNameLink());
}
return true;
@@ -211,15 +211,15 @@ public:
if (reveal)
{
handler->PSendSysMessage(LANG_YOU_SET_EXPLORE_ALL, handler->GetNameLink(chr).c_str());
handler->PSendSysMessage(LANG_YOU_SET_EXPLORE_ALL, handler->GetNameLink(chr));
if (handler->needReportToTarget(chr))
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_EXPLORE_SET_ALL, handler->GetNameLink().c_str());
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_EXPLORE_SET_ALL, handler->GetNameLink());
}
else
{
handler->PSendSysMessage(LANG_YOU_SET_EXPLORE_NOTHING, handler->GetNameLink(chr).c_str());
handler->PSendSysMessage(LANG_YOU_SET_EXPLORE_NOTHING, handler->GetNameLink(chr));
if (handler->needReportToTarget(chr))
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_EXPLORE_SET_NOTHING, handler->GetNameLink().c_str());
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_EXPLORE_SET_NOTHING, handler->GetNameLink());
}
for (uint8 i = 0; i < PLAYER_EXPLORED_ZONES_SIZE; ++i)
+54 -54
View File
@@ -127,14 +127,14 @@ public:
// Dump camera locations
if (std::vector<FlyByCamera> const* flyByCameras = GetFlyByCameras(cineSeq->cinematicCamera))
{
handler->PSendSysMessage("Waypoints for sequence %u, camera %u", cinematicId, cineSeq->cinematicCamera);
handler->PSendSysMessage("Waypoints for sequence {}, camera {}", cinematicId, cineSeq->cinematicCamera);
uint32 count = 1;
for (FlyByCamera const& cam : *flyByCameras)
{
handler->PSendSysMessage("%02u - %7ums [%s (%f degrees)]", count, cam.timeStamp, cam.locations.ToString().c_str(), cam.locations.GetOrientation() * (180 / M_PI));
handler->PSendSysMessage("{} - {}ms [{} ({} degrees)]", count, cam.timeStamp, cam.locations.ToString(), cam.locations.GetOrientation() * (180 / M_PI));
++count;
}
handler->PSendSysMessage("%u waypoints dumped", flyByCameras->size());
handler->PSendSysMessage("{} waypoints dumped", flyByCameras->size());
}
handler->GetPlayer()->SendCinematicStart(cinematicId);
@@ -437,7 +437,7 @@ public:
data.hexlike();
player->GetSession()->SendPacket(&data);
handler->PSendSysMessage(LANG_COMMAND_OPCODESENT, data.GetOpcode(), unit->GetName().c_str());
handler->PSendSysMessage(LANG_COMMAND_OPCODESENT, data.GetOpcode(), unit->GetName());
return true;
}
@@ -495,9 +495,9 @@ public:
if (!target)
return false;
handler->PSendSysMessage("Loot recipient for creature %s (GUID %u, SpawnID %u) is %s",
target->GetName().c_str(), target->GetGUID().GetCounter(), target->GetSpawnId(),
target->hasLootRecipient() ? (target->GetLootRecipient() ? target->GetLootRecipient()->GetName().c_str() : "offline") : "no loot recipient");
handler->PSendSysMessage("Loot recipient for creature {} (GUID {}, SpawnID {}) is {}",
target->GetName(), target->GetGUID().ToString(), target->GetSpawnId(),
target->hasLootRecipient() ? (target->GetLootRecipient() ? target->GetLootRecipient()->GetName() : "offline") : "no loot recipient");
return true;
}
@@ -548,10 +548,10 @@ public:
for (uint8 j = 0; j < bag->GetBagSize(); ++j)
if (Item* item2 = bag->GetItemByPos(j))
if (item2->GetState() == state)
handler->PSendSysMessage("bag: 255 slot: %d %s owner: %s", item2->GetSlot(), item2->GetGUID().ToString().c_str(), item2->GetOwnerGUID().ToString().c_str());
handler->PSendSysMessage("bag: 255 slot: {} {} owner: {}", item2->GetSlot(), item2->GetGUID().ToString(), item2->GetOwnerGUID().ToString());
}
else if (item->GetState() == state)
handler->PSendSysMessage("bag: 255 slot: %d %s owner: %s", item->GetSlot(), item->GetGUID().ToString().c_str(), item->GetOwnerGUID().ToString().c_str());
handler->PSendSysMessage("bag: 255 slot: {} {} owner: {}", item->GetSlot(), item->GetGUID().ToString(), item->GetOwnerGUID().ToString());
}
}
}
@@ -582,7 +582,7 @@ public:
break;
}
handler->PSendSysMessage("bag: %d slot: %d guid: %d - state: %s", bagSlot, item->GetSlot(), item->GetGUID().GetCounter(), st.c_str());
handler->PSendSysMessage("bag: {} slot: {} guid: {} - state: {}", bagSlot, item->GetSlot(), item->GetGUID().ToString(), st);
}
if (updateQueue.empty())
@@ -604,21 +604,21 @@ public:
if (item->GetSlot() != i)
{
handler->PSendSysMessage("Item with slot %d and guid %d has an incorrect slot value: %d", i, item->GetGUID().GetCounter(), item->GetSlot());
handler->PSendSysMessage("Item with slot {} and guid {} has an incorrect slot value: {}", i, item->GetGUID().ToString(), item->GetSlot());
error = true;
continue;
}
if (item->GetOwnerGUID() != player->GetGUID())
{
handler->PSendSysMessage("The item with slot %d %s does have non-matching owner guid %s and %s!", item->GetSlot(), item->GetGUID().ToString().c_str(), item->GetOwnerGUID().ToString().c_str(), player->GetGUID().ToString().c_str());
handler->PSendSysMessage("The item with slot {} {} does have non-matching owner guid {} and {}!", item->GetSlot(), item->GetGUID().ToString(), item->GetOwnerGUID().ToString(), player->GetGUID().ToString());
error = true;
continue;
}
if (Bag* container = item->GetContainer())
{
handler->PSendSysMessage("The item with slot %d %s has a container (slot: %d, %s) but shouldn't!", item->GetSlot(), item->GetGUID().ToString().c_str(), container->GetSlot(), container->GetGUID().ToString().c_str());
handler->PSendSysMessage("The item with slot {} {} has a container (slot: {}, {}) but shouldn't!", item->GetSlot(), item->GetGUID().ToString(), container->GetSlot(), container->GetGUID().ToString());
error = true;
continue;
}
@@ -628,28 +628,28 @@ public:
uint16 qp = item->GetQueuePos();
if (qp > updateQueue.size())
{
handler->PSendSysMessage("The item with slot %d and guid %d has its queuepos (%d) larger than the update queue size! ", item->GetSlot(), item->GetGUID().GetCounter(), qp);
handler->PSendSysMessage("The item with slot {} and guid {} has its queuepos ({}) larger than the update queue size! ", item->GetSlot(), item->GetGUID().ToString(), qp);
error = true;
continue;
}
if (!updateQueue[qp])
{
handler->PSendSysMessage("The item with slot %d and guid %d has its queuepos (%d) pointing to NULL in the queue!", item->GetSlot(), item->GetGUID().GetCounter(), qp);
handler->PSendSysMessage("The item with slot {} and guid {} has its queuepos ({}) pointing to NULL in the queue!", item->GetSlot(), item->GetGUID().ToString(), qp);
error = true;
continue;
}
if (updateQueue[qp] != item)
{
handler->PSendSysMessage("The item with slot %d and guid %d has a queuepos (%d) that points to another item in the queue (bag: %d, slot: %d, guid: %d)", item->GetSlot(), item->GetGUID().GetCounter(), qp, updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot(), updateQueue[qp]->GetGUID().GetCounter());
handler->PSendSysMessage("The item with slot {} and guid {} has a queuepos ({}) that points to another item in the queue (bag: {}, slot: {}, guid: {})", item->GetSlot(), item->GetGUID().ToString(), qp, updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot(), updateQueue[qp]->GetGUID().ToString());
error = true;
continue;
}
}
else if (item->GetState() != ITEM_UNCHANGED)
{
handler->PSendSysMessage("The item with slot %d and guid %d is not in queue but should be (state: %d)!", item->GetSlot(), item->GetGUID().GetCounter(), item->GetState());
handler->PSendSysMessage("The item with slot {} and guid {} is not in queue but should be (state: {})!", item->GetSlot(), item->GetGUID().ToString(), item->GetState());
error = true;
continue;
}
@@ -664,14 +664,14 @@ public:
if (item2->GetSlot() != j)
{
handler->PSendSysMessage("The item in bag %d and slot %d (guid: %d) has an incorrect slot value: %d", bag->GetSlot(), j, item2->GetGUID().GetCounter(), item2->GetSlot());
handler->PSendSysMessage("The item in bag {} and slot {} (guid: {}) has an incorrect slot value: {}", bag->GetSlot(), j, item2->GetGUID().ToString(), item2->GetSlot());
error = true;
continue;
}
if (item2->GetOwnerGUID() != player->GetGUID())
{
handler->PSendSysMessage("The item in bag %d at slot %d and %s, the owner (%s) and the player (%s) don't match!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString().c_str(), item2->GetOwnerGUID().ToString().c_str(), player->GetGUID().ToString().c_str());
handler->PSendSysMessage("The item in bag {} at slot {} and {}, the owner ({}) and the player ({}) don't match!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString(), item2->GetOwnerGUID().ToString(), player->GetGUID().ToString());
error = true;
continue;
}
@@ -679,14 +679,14 @@ public:
Bag* container = item2->GetContainer();
if (!container)
{
handler->PSendSysMessage("The item in bag %d at slot %d %s has no container!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString().c_str());
handler->PSendSysMessage("The item in bag {} at slot {} {} has no container!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString());
error = true;
continue;
}
if (container != bag)
{
handler->PSendSysMessage("The item in bag %d at slot %d %s has a different container(slot %d %s)!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString().c_str(), container->GetSlot(), container->GetGUID().ToString().c_str());
handler->PSendSysMessage("The item in bag {} at slot {} {} has a different container(slot {} {})!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString(), container->GetSlot(), container->GetGUID().ToString());
error = true;
continue;
}
@@ -696,28 +696,28 @@ public:
uint16 qp = item2->GetQueuePos();
if (qp > updateQueue.size())
{
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d has a queuepos (%d) larger than the update queue size! ", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().GetCounter(), qp);
handler->PSendSysMessage("The item in bag {} at slot {} having guid {} has a queuepos ({}) larger than the update queue size! ", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString(), qp);
error = true;
continue;
}
if (!updateQueue[qp])
{
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d has a queuepos (%d) that points to NULL in the queue!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().GetCounter(), qp);
handler->PSendSysMessage("The item in bag {} at slot {} having guid {} has a queuepos ({}) that points to NULL in the queue!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString(), qp);
error = true;
continue;
}
if (updateQueue[qp] != item2)
{
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d has a queuepos (%d) that points to another item in the queue (bag: %d, slot: %d, guid: %d)", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().GetCounter(), qp, updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot(), updateQueue[qp]->GetGUID().GetCounter());
handler->PSendSysMessage("The item in bag {} at slot {} having guid {} has a queuepos ({}) that points to another item in the queue (bag: {}, slot: {}, guid: {})", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString(), qp, updateQueue[qp]->GetBagSlot(), updateQueue[qp]->GetSlot(), updateQueue[qp]->GetGUID().ToString());
error = true;
continue;
}
}
else if (item2->GetState() != ITEM_UNCHANGED)
{
handler->PSendSysMessage("The item in bag %d at slot %d having guid %d is not in queue but should be (state: %d)!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().GetCounter(), item2->GetState());
handler->PSendSysMessage("The item in bag {} at slot {} having guid {} is not in queue but should be (state: {})!", bag->GetSlot(), item2->GetSlot(), item2->GetGUID().ToString(), item2->GetState());
error = true;
continue;
}
@@ -759,7 +759,7 @@ public:
if (test != item)
{
handler->SendSysMessage(Acore::StringFormatFmt("queue({}): The bag({}) and slot({}) values for the %s are incorrect, {} is there instead!", index, item->GetBagSlot(), item->GetSlot(), item->GetGUID().ToString(), test->GetGUID().ToString()));
handler->SendSysMessage(Acore::StringFormatFmt("queue({}): The bag({}) and slot({}) values for the {} are incorrect, {} is there instead!", index, item->GetBagSlot(), item->GetSlot(), item->GetGUID().ToString(), test->GetGUID().ToString()));
error = true;
continue;
}
@@ -800,18 +800,18 @@ public:
ThreatContainer::StorageType::const_iterator itr;
uint32 count = 0;
handler->PSendSysMessage("Threat list of %s (%s)", target->GetName().c_str(), target->GetGUID().ToString().c_str());
handler->PSendSysMessage("Threat list of {} ({})", target->GetName(), target->GetGUID().ToString());
for (itr = threatList.begin(); itr != threatList.end(); ++itr)
{
Unit* unit = (*itr)->getTarget();
if (!unit)
{
handler->PSendSysMessage(" %u. No Unit - threat %f", ++count, (*itr)->GetThreat());
handler->PSendSysMessage(" {}. No Unit - threat {}", ++count, (*itr)->GetThreat());
continue;
}
handler->PSendSysMessage(" %u. %s (%s) - threat %f", ++count, unit->GetName().c_str(), unit->GetGUID().ToString().c_str(), (*itr)->GetThreat());
handler->PSendSysMessage(" {}. {} ({}) - threat {}", ++count, unit->GetName(), unit->GetGUID().ToString(), (*itr)->GetThreat());
}
auto const& threatList2 = target->GetThreatMgr().GetOfflineThreatList();
@@ -820,11 +820,11 @@ public:
Unit* unit = (*itr)->getTarget();
if (!unit)
{
handler->PSendSysMessage(" %u. [offline] No Unit - threat %f", ++count, (*itr)->GetThreat());
handler->PSendSysMessage(" {}. [offline] No Unit - threat {}", ++count, (*itr)->GetThreat());
continue;
}
handler->PSendSysMessage(" %u. [offline] %s (%s) - threat %f", ++count, unit->GetName().c_str(), unit->GetGUID().ToString().c_str(), (*itr)->GetThreat());
handler->PSendSysMessage(" {}. [offline] {} ({}) - threat {}", ++count, unit->GetName(), unit->GetGUID().ToString(), (*itr)->GetThreat());
}
handler->SendSysMessage("End of threat list.");
@@ -841,18 +841,18 @@ public:
HostileReference* ref = target->getHostileRefMgr().getFirst();
uint32 count = 0;
handler->PSendSysMessage("Hostile reference list of %s (%s)", target->GetName().c_str(), target->GetGUID().ToString().c_str());
handler->PSendSysMessage("Hostile reference list of {} ({})", target->GetName(), target->GetGUID().ToString());
while (ref)
{
if (Unit* unit = ref->GetSource()->GetOwner())
{
handler->PSendSysMessage(" %u. %s %s (%s) - threat %f", ++count, (ref->IsOnline() ? "" : "[offline]"),
unit->GetName().c_str(), unit->GetGUID().ToString().c_str(), ref->GetThreat());
handler->PSendSysMessage(" {}. {} {} ({}) - threat {}", ++count, (ref->IsOnline() ? "" : "[offline]"),
unit->GetName(), unit->GetGUID().ToString(), ref->GetThreat());
}
else
{
handler->PSendSysMessage(" %u. No Owner - threat %f", ++count, ref->GetThreat());
handler->PSendSysMessage(" {}. No Owner - threat {}", ++count, ref->GetThreat());
}
ref = ref->next();
@@ -869,7 +869,7 @@ public:
return false;
//target->SetVehicleId(id);
handler->PSendSysMessage("Vehicle id set to %u", id);
handler->PSendSysMessage("Vehicle id set to {}", id);
return true;
}
@@ -897,7 +897,7 @@ public:
passenger->EnterVehicle(target, *seatId);
}
handler->PSendSysMessage("Unit %u entered vehicle %hhd", entry, *seatId);
handler->PSendSysMessage("Unit {} entered vehicle %hhd", entry, *seatId);
return true;
}
@@ -963,7 +963,7 @@ public:
uint32 value = i->GetUInt32Value(index);
handler->PSendSysMessage("Item %u: value at %u is %u", guid, index, value);
handler->PSendSysMessage("Item {}: value at {} is {}", guid, index, value);
return true;
}
@@ -1002,7 +1002,7 @@ public:
if (Unit* unit = handler->getSelectedUnit())
unit->HandleEmoteCommand(emote);
handler->PSendSysMessage("Playing emote %s", EnumUtils::ToConstant(emote));
handler->PSendSysMessage("Playing emote {}", EnumUtils::ToConstant(emote));
return true;
}
@@ -1012,10 +1012,10 @@ public:
if (Unit* unit = handler->getSelectedUnit())
{
Player* player = handler->GetSession()->GetPlayer();
handler->PSendSysMessage("Checking LoS %s -> %s:", player->GetName().c_str(), unit->GetName().c_str());
handler->PSendSysMessage(" VMAP LoS: %s", player->IsWithinLOSInMap(unit, VMAP::ModelIgnoreFlags::Nothing, LINEOFSIGHT_CHECK_VMAP) ? "clear" : "obstructed");
handler->PSendSysMessage(" GObj LoS: %s", player->IsWithinLOSInMap(unit, VMAP::ModelIgnoreFlags::Nothing, LINEOFSIGHT_CHECK_GOBJECT_ALL) ? "clear" : "obstructed");
handler->PSendSysMessage("%s is %sin line of sight of %s.", unit->GetName().c_str(), (player->IsWithinLOSInMap(unit) ? "" : "not "), player->GetName().c_str());
handler->PSendSysMessage("Checking LoS {} -> {}:", player->GetName(), unit->GetName());
handler->PSendSysMessage(" VMAP LoS: {}", player->IsWithinLOSInMap(unit, VMAP::ModelIgnoreFlags::Nothing, LINEOFSIGHT_CHECK_VMAP) ? "clear" : "obstructed");
handler->PSendSysMessage(" GObj LoS: {}", player->IsWithinLOSInMap(unit, VMAP::ModelIgnoreFlags::Nothing, LINEOFSIGHT_CHECK_GOBJECT_ALL) ? "clear" : "obstructed");
handler->PSendSysMessage("{} is {}in line of sight of {}.", unit->GetName(), (player->IsWithinLOSInMap(unit) ? "" : "not "), player->GetName());
return true;
}
@@ -1054,19 +1054,19 @@ public:
if (index >= target->GetValuesCount())
{
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, index, target->GetGUID().GetCounter(), target->GetValuesCount());
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, index, target->GetGUID().ToString(), target->GetValuesCount());
return false;
}
if (value.holds_alternative<uint32>())
{
target->SetUInt32Value(index, value.get<uint32>());
handler->PSendSysMessage(LANG_SET_UINT_FIELD, target->GetGUID().GetCounter(), uint32(index), uint32(value));
handler->PSendSysMessage(LANG_SET_UINT_FIELD, target->GetGUID().ToString(), uint32(index), uint32(value));
}
else if (value.holds_alternative<float>())
{
target->SetFloatValue(index, value.get<float>());
handler->PSendSysMessage(LANG_SET_FLOAT_FIELD, target->GetGUID().GetCounter(), static_cast<float>(index), uint32(value));
handler->PSendSysMessage(LANG_SET_FLOAT_FIELD, target->GetGUID().ToString(), static_cast<float>(index), uint32(value));
}
return true;
@@ -1085,19 +1085,19 @@ public:
if (index >= target->GetValuesCount())
{
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, index, guid.GetCounter(), target->GetValuesCount());
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, index, guid.ToString(), target->GetValuesCount());
return false;
}
if (isInt)
{
uint32 value = target->GetUInt32Value(index);
handler->PSendSysMessage(LANG_GET_UINT_FIELD, guid.GetCounter(), index, value);
handler->PSendSysMessage(LANG_GET_UINT_FIELD, guid.ToString(), index, value);
}
else
{
float value = target->GetFloatValue(index);
handler->PSendSysMessage(LANG_GET_FLOAT_FIELD, guid.GetCounter(), index, value);
handler->PSendSysMessage(LANG_GET_FLOAT_FIELD, guid.ToString(), index, value);
}
return true;
@@ -1107,7 +1107,7 @@ public:
{
if (index >= handler->GetPlayer()->GetValuesCount())
{
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, index, handler->GetPlayer()->GetGUID().GetCounter(), handler->GetPlayer()->GetValuesCount());
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, index, handler->GetPlayer()->GetGUID().ToString(), handler->GetPlayer()->GetValuesCount());
return false;
}
@@ -1146,13 +1146,13 @@ public:
{
value = unit->GetUInt32Value(index);
handler->PSendSysMessage(LANG_UPDATE, unit->GetGUID().GetCounter(), index, *value);
handler->PSendSysMessage(LANG_UPDATE, unit->GetGUID().ToString(), index, *value);
return true;
}
unit->SetUInt32Value(index, *value);
handler->PSendSysMessage(LANG_UPDATE_CHANGE, unit->GetGUID().GetCounter(), index, *value);
handler->PSendSysMessage(LANG_UPDATE_CHANGE, unit->GetGUID().ToString(), index, *value);
return true;
}
@@ -1325,7 +1325,7 @@ public:
static void HandleDebugObjectCountMap(ChatHandler* handler, Map* map)
{
handler->PSendSysMessage("Map Id: %u Name: '%s' Instance Id: %u Creatures: %u GameObjects: %u SetActive Objects: %u",
handler->PSendSysMessage("Map Id: {} Name: '{}' Instance Id: {} Creatures: {} GameObjects: {} SetActive Objects: {}",
map->GetId(), map->GetMapName(), map->GetInstanceId(),
uint64(map->GetObjectsStore().Size<Creature>()),
uint64(map->GetObjectsStore().Size<GameObject>()),
@@ -1338,7 +1338,7 @@ public:
handler->PSendSysMessage("Top Creatures count:");
for (auto&& p : worker.GetTopCreatureCount(5))
handler->PSendSysMessage("Entry: %u Count: %u", p.first, p.second);
handler->PSendSysMessage("Entry: {} Count: {}", p.first, p.second);
}
static bool HandleDebugDummyCommand(ChatHandler* handler)
+8 -8
View File
@@ -162,7 +162,7 @@ public:
Aura* aura = target->GetAura(deserterSpell);
if (aura && aura->GetDuration() >= duration * IN_MILLISECONDS)
{
handler->PSendSysMessage("Player %s already has a longer %s Deserter active.", handler->playerLink(*playerName), isInstance ? "Instance" : "Battleground");
handler->PSendSysMessage("Player {} already has a longer {} Deserter active.", handler->playerLink(*playerName), isInstance ? "Instance" : "Battleground");
return true;
}
@@ -184,7 +184,7 @@ public:
if (remainTime < 0 || remainTime >= duration * IN_MILLISECONDS)
{
handler->PSendSysMessage("Player %s already has a longer %s Deserter active.", handler->playerLink(*playerName), isInstance ? "Instance" : "Battleground");
handler->PSendSysMessage("Player {} already has a longer {} Deserter active.", handler->playerLink(*playerName), isInstance ? "Instance" : "Battleground");
return true;
}
CharacterDatabase.Query("DELETE FROM character_aura WHERE guid = {} AND spell = {}", guid.GetCounter(), deserterSpell);
@@ -211,7 +211,7 @@ public:
CharacterDatabase.Execute(stmt);
}
handler->PSendSysMessage("%s of %s Deserter has been added to player %s.", secsToTimeString(duration), isInstance ? "Instance" : "Battleground", handler->playerLink(*playerName));
handler->PSendSysMessage("{} of {} Deserter has been added to player {}.", secsToTimeString(duration), isInstance ? "Instance" : "Battleground", handler->playerLink(*playerName));
return true;
}
@@ -274,17 +274,17 @@ public:
if (duration == 0)
{
handler->SendErrorMessage("Player %s does not have %s Deserter.", handler->playerLink(player->GetName()), isInstance ? "Instance" : "Battleground");
handler->SendErrorMessage("Player {} does not have {} Deserter.", handler->playerLink(player->GetName()), isInstance ? "Instance" : "Battleground");
return true;
}
if (duration < 0)
{
handler->SendErrorMessage("Permanent %s Deserter has been removed from player %s (GUID %u).", isInstance ? "Instance" : "Battleground", handler->playerLink(player->GetName()), player->GetGUID().GetCounter());
handler->SendErrorMessage("Permanent {} Deserter has been removed from player {} (GUID {}).", isInstance ? "Instance" : "Battleground", handler->playerLink(player->GetName()), player->GetGUID().ToString());
return true;
}
handler->PSendSysMessage("%s of %s Deserter has been removed from player %s (GUID %u).", secsToTimeString(duration / IN_MILLISECONDS), isInstance ? "Instance" : "Battleground", handler->playerLink(player->GetName()), player->GetGUID().GetCounter());
handler->PSendSysMessage("{} of {} Deserter has been removed from player {} (GUID {}).", secsToTimeString(duration / IN_MILLISECONDS), isInstance ? "Instance" : "Battleground", handler->playerLink(player->GetName()), player->GetGUID().ToString());
return true;
}
@@ -386,11 +386,11 @@ public:
if (deserterCount == 0)
{
handler->PSendSysMessage("No player on this realm has %s Deserter with a duration of %s or less.", isInstance ? "Instance" : "Battleground", remainTimeStr);
handler->PSendSysMessage("No player on this realm has {} Deserter with a duration of {} or less.", isInstance ? "Instance" : "Battleground", remainTimeStr);
return true;
}
handler->PSendSysMessage("%s Deserter has been removed from %u player(s) with a duration of %s or less.", isInstance ? "Instance" : "Battleground", deserterCount, remainTimeStr);
handler->PSendSysMessage("{} Deserter has been removed from {} player(s) with a duration of {} or less.", isInstance ? "Instance" : "Battleground", deserterCount, remainTimeStr);
return true;
}
+4 -4
View File
@@ -147,7 +147,7 @@ public:
PreparedQueryResult result = WorldDatabase.Query(stmt);
if (result)
{
handler->SendErrorMessage("This %s (Id: %u) is already disabled.", disableTypeStr.c_str(), entry);
handler->SendErrorMessage("This {} (Id: {}) is already disabled.", disableTypeStr, entry);
return false;
}
@@ -158,7 +158,7 @@ public:
stmt->SetData(3, disableComment);
WorldDatabase.Execute(stmt);
handler->PSendSysMessage("Add Disabled %s (Id: %u) for reason %s", disableTypeStr.c_str(), entry, disableComment.c_str());
handler->PSendSysMessage("Add Disabled {} (Id: {}) for reason {}", disableTypeStr, entry, disableComment);
return true;
}
@@ -234,7 +234,7 @@ public:
PreparedQueryResult result = WorldDatabase.Query(stmt);
if (!result)
{
handler->SendErrorMessage("This %s (Id: %u) is not disabled.", disableTypeStr.c_str(), entry);
handler->SendErrorMessage("This {} (Id: {}) is not disabled.", disableTypeStr, entry);
return false;
}
@@ -243,7 +243,7 @@ public:
stmt->SetData(1, disableType);
WorldDatabase.Execute(stmt);
handler->PSendSysMessage("Remove Disabled %s (Id: %u)", disableTypeStr.c_str(), entry);
handler->PSendSysMessage("Remove Disabled {} (Id: {})", disableTypeStr, entry);
return true;
}
+9 -9
View File
@@ -69,11 +69,11 @@ public:
if (handler->GetSession())
{
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT, eventId, eventId, eventData.description.c_str(), active);
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT, eventId, eventId, eventData.description, active);
}
else
{
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CONSOLE, eventId, eventData.description.c_str(), active);
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CONSOLE, eventId, eventData.description, active);
}
++counter;
@@ -120,9 +120,9 @@ public:
std::string occurenceStr = secsToTimeString(eventData.occurence * MINUTE, true);
std::string lengthStr = secsToTimeString(eventData.length * MINUTE, true);
handler->PSendSysMessage(LANG_EVENT_INFO, uint16(eventId), eventData.description.c_str(), activeStr,
startTimeStr.c_str(), endTimeStr.c_str(), occurenceStr.c_str(), lengthStr.c_str(),
nextStr.c_str());
handler->PSendSysMessage(LANG_EVENT_INFO, uint16(eventId), eventData.description, activeStr,
startTimeStr, endTimeStr, occurenceStr, lengthStr,
nextStr);
return true;
}
@@ -147,11 +147,11 @@ public:
GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr->GetActiveEventList();
if (activeEvents.find(eventId) != activeEvents.end())
{
handler->SendErrorMessage(LANG_EVENT_ALREADY_ACTIVE, uint16(eventId), eventData.description.c_str());
handler->SendErrorMessage(LANG_EVENT_ALREADY_ACTIVE, uint16(eventId), eventData.description);
return false;
}
handler->PSendSysMessage(LANG_EVENT_STARTED, uint16(eventId), eventData.description.c_str());
handler->PSendSysMessage(LANG_EVENT_STARTED, uint16(eventId), eventData.description);
sGameEventMgr->StartEvent(eventId, true);
return true;
}
@@ -177,11 +177,11 @@ public:
if (activeEvents.find(eventId) == activeEvents.end())
{
handler->SendErrorMessage(LANG_EVENT_NOT_ACTIVE, uint16(eventId), eventData.description.c_str());
handler->SendErrorMessage(LANG_EVENT_NOT_ACTIVE, uint16(eventId), eventData.description);
return false;
}
handler->PSendSysMessage(LANG_EVENT_STOPPED, uint16(eventId), eventData.description.c_str());
handler->PSendSysMessage(LANG_EVENT_STOPPED, uint16(eventId), eventData.description);
sGameEventMgr->StopEvent(eventId, true);
return true;
}
+9 -9
View File
@@ -67,11 +67,11 @@ public:
std::string nameLink = handler->playerLink(target->GetName());
handler->PSendSysMessage(LANG_YOU_REPAIR_ITEMS, nameLink.c_str());
handler->PSendSysMessage(LANG_YOU_REPAIR_ITEMS, nameLink);
if (handler->needReportToTarget(target->GetConnectedPlayer()))
{
ChatHandler(target->GetConnectedPlayer()->GetSession()).PSendSysMessage(LANG_YOUR_ITEMS_REPAIRED, nameLink.c_str());
ChatHandler(target->GetConnectedPlayer()->GetSession()).PSendSysMessage(LANG_YOUR_ITEMS_REPAIRED, nameLink);
}
return true;
@@ -86,8 +86,8 @@ public:
return false;
}
handler->PSendSysMessage("Character: %s", player->GetPlayerName().c_str());
handler->PSendSysMessage("Current equipment average item level: |cff00ffff%u|r", (int16)player->GetAverageItemLevel());
handler->PSendSysMessage("Character: {}", player->GetPlayerName());
handler->PSendSysMessage("Current equipment average item level: |cff00ffff{}|r", (int16)player->GetAverageItemLevel());
if (sWorld->getIntConfig(CONFIG_MIN_LEVEL_STAT_SAVE))
{
@@ -109,11 +109,11 @@ public:
uint32 SpellPower = fields[8].Get<uint32>();
uint32 Resilience = fields[9].Get<uint32>();
handler->PSendSysMessage("Health: |cff00ffff%u|r - Stamina: |cff00ffff%u|r", MaxHealth, Stamina);
handler->PSendSysMessage("Strength: |cff00ffff%u|r - Agility: |cff00ffff%u|r", Strength, Agility);
handler->PSendSysMessage("Intellect: |cff00ffff%u|r - Spirit: |cff00ffff%u|r", Intellect, Spirit);
handler->PSendSysMessage("AttackPower: |cff00ffff%u|r - SpellPower: |cff00ffff%u|r", AttackPower, SpellPower);
handler->PSendSysMessage("Armor: |cff00ffff%u|r - Resilience: |cff00ffff%u|r", Armor, Resilience);
handler->PSendSysMessage("Health: |cff00ffff{}|r - Stamina: |cff00ffff{}|r", MaxHealth, Stamina);
handler->PSendSysMessage("Strength: |cff00ffff{}|r - Agility: |cff00ffff{}|r", Strength, Agility);
handler->PSendSysMessage("Intellect: |cff00ffff{}|r - Spirit: |cff00ffff{}|r", Intellect, Spirit);
handler->PSendSysMessage("AttackPower: |cff00ffff{}|r - SpellPower: |cff00ffff{}|r", AttackPower, SpellPower);
handler->PSendSysMessage("Armor: |cff00ffff{}|r - Resilience: |cff00ffff{}|r", Armor, Resilience);
}
}
+5 -5
View File
@@ -107,7 +107,7 @@ public:
data << target->GetPackGUID();
data << uint32(0); // unknown
target->SendMessageToSet(&data, true);
handler->PSendSysMessage(LANG_COMMAND_FLYMODE_STATUS, handler->GetNameLink(target).c_str(), enable ? "on" : "off");
handler->PSendSysMessage(LANG_COMMAND_FLYMODE_STATUS, handler->GetNameLink(target), enable ? "on" : "off");
return true;
}
@@ -139,9 +139,9 @@ public:
if ((max + max2 + size) == 16)
max2 = max - 1;
if (handler->GetSession())
handler->PSendSysMessage("| %s GMLevel %u", name.c_str(), security);
handler->PSendSysMessage("| {} GMLevel {}", name, security);
else
handler->PSendSysMessage("|%*s%s%*s| %u |", max, " ", name.c_str(), max2, " ", security);
handler->PSendSysMessage("|{}{}{}| {} |", max, " ", name, max2, " ", security);
}
}
if (footer)
@@ -175,9 +175,9 @@ public:
if ((max + max2 + name.length()) == 16)
max2 = max - 1;
if (handler->GetSession())
handler->PSendSysMessage("| %s GMLevel %u", name.c_str(), security);
handler->PSendSysMessage("| {} GMLevel {}", name, security);
else
handler->PSendSysMessage("|%*s%s%*s| %u |", max, " ", name.c_str(), max2, " ", security);
handler->PSendSysMessage("|{}{}{}| {} |", max, " ", name, max2, " ", security);
} while (result->NextRow());
handler->SendSysMessage("========================");
}
+16 -16
View File
@@ -140,7 +140,7 @@ public:
/// @todo is it really necessary to add both the real and DB table guid here ?
sObjectMgr->AddGameobjectToGrid(guidLow, sObjectMgr->GetGameObjectData(guidLow));
handler->PSendSysMessage(LANG_GAMEOBJECT_ADD, uint32(objectId), objectInfo->name.c_str(), guidLow, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
handler->PSendSysMessage(LANG_GAMEOBJECT_ADD, uint32(objectId), objectInfo->name, guidLow, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
return true;
}
@@ -266,7 +266,7 @@ public:
GameObject* target = handler->GetObjectFromPlayerMapByDbGuid(guidLow);
handler->PSendSysMessage(LANG_GAMEOBJECT_DETAIL, guidLow, objectInfo->name.c_str(), guidLow, id, x, y, z, mapId, o, phase);
handler->PSendSysMessage(LANG_GAMEOBJECT_DETAIL, guidLow, objectInfo->name, guidLow, id, x, y, z, mapId, o, phase);
if (target)
{
@@ -277,7 +277,7 @@ public:
std::string curRespawnDelayStr = secsToTimeString(curRespawnDelay, true);
std::string defRespawnDelayStr = secsToTimeString(target->GetRespawnDelay(), true);
handler->PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr.c_str(), curRespawnDelayStr.c_str());
handler->PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr, curRespawnDelayStr);
}
return true;
}
@@ -298,7 +298,7 @@ public:
Unit* owner = ObjectAccessor::GetUnit(*handler->GetSession()->GetPlayer(), ownerGuid);
if (!owner || !ownerGuid.IsPlayer())
{
handler->SendErrorMessage(LANG_COMMAND_DELOBJREFERCREATURE, ownerGuid.GetCounter(), object->GetSpawnId());
handler->SendErrorMessage(LANG_COMMAND_DELOBJREFERCREATURE, ownerGuid.ToString(), object->GetSpawnId());
return false;
}
@@ -348,7 +348,7 @@ public:
return false;
}
handler->PSendSysMessage(LANG_COMMAND_TURNOBJMESSAGE, object->GetSpawnId(), object->GetGOInfo()->name.c_str(), object->GetSpawnId());
handler->PSendSysMessage(LANG_COMMAND_TURNOBJMESSAGE, object->GetSpawnId(), object->GetGOInfo()->name, object->GetSpawnId());
return true;
}
@@ -403,7 +403,7 @@ public:
return false;
}
handler->PSendSysMessage(LANG_COMMAND_MOVEOBJMESSAGE, object->GetSpawnId(), object->GetGOInfo()->name.c_str(), object->GetSpawnId());
handler->PSendSysMessage(LANG_COMMAND_MOVEOBJMESSAGE, object->GetSpawnId(), object->GetGOInfo()->name, object->GetSpawnId());
return true;
}
@@ -467,7 +467,7 @@ public:
if (!gameObjectInfo)
continue;
handler->PSendSysMessage(LANG_GO_LIST_CHAT, guid, entry, guid, gameObjectInfo->name.c_str(), x, y, z, mapId, "", "");
handler->PSendSysMessage(LANG_GO_LIST_CHAT, guid, entry, guid, gameObjectInfo->name, x, y, z, mapId, "", "");
++count;
} while (result->NextRow());
@@ -522,21 +522,21 @@ public:
handler->PSendSysMessage(LANG_GOINFO_ENTRY, entry);
if (gameObject)
handler->PSendSysMessage("GUID: %u", gameObject->GetGUID().GetCounter());
handler->PSendSysMessage("GUID: {}", gameObject->GetGUID().ToString());
handler->PSendSysMessage(LANG_GOINFO_TYPE, type);
handler->PSendSysMessage(LANG_GOINFO_LOOTID, lootId);
handler->PSendSysMessage(LANG_GOINFO_DISPLAYID, displayId);
if (gameObject)
{
handler->PSendSysMessage("LootMode: %u", gameObject->GetLootMode());
handler->PSendSysMessage("LootState: %u", gameObject->getLootState());
handler->PSendSysMessage("GOState: %u", gameObject->GetGoState());
handler->PSendSysMessage("PhaseMask: %u", gameObject->GetPhaseMask());
handler->PSendSysMessage("IsLootEmpty: %u", gameObject->loot.empty());
handler->PSendSysMessage("IsLootLooted: %u", gameObject->loot.isLooted());
handler->PSendSysMessage("LootMode: {}", gameObject->GetLootMode());
handler->PSendSysMessage("LootState: {}", gameObject->getLootState());
handler->PSendSysMessage("GOState: {}", gameObject->GetGoState());
handler->PSendSysMessage("PhaseMask: {}", gameObject->GetPhaseMask());
handler->PSendSysMessage("IsLootEmpty: {}", gameObject->loot.empty());
handler->PSendSysMessage("IsLootLooted: {}", gameObject->loot.isLooted());
}
handler->PSendSysMessage(LANG_GOINFO_NAME, name.c_str());
handler->PSendSysMessage(LANG_GOINFO_NAME, name);
return true;
}
@@ -571,7 +571,7 @@ public:
{
object->SendCustomAnim(*objectState);
}
handler->PSendSysMessage("Set gobject type %d state %u", objectType, *objectState);
handler->PSendSysMessage("Set gobject type {} state {}", objectType, *objectState);
return true;
}
+4 -4
View File
@@ -156,7 +156,7 @@ public:
{
groupSource->AddMember(playerTarget);
groupSource->BroadcastGroupUpdate();
handler->PSendSysMessage(LANG_GROUP_PLAYER_JOINED, playerTarget->GetName().c_str(), playerSource->GetName().c_str());
handler->PSendSysMessage(LANG_GROUP_PLAYER_JOINED, playerTarget->GetName(), playerSource->GetName());
return true;
}
else
@@ -169,7 +169,7 @@ public:
else
{
// group is full or target player already in a group
handler->PSendSysMessage(LANG_GROUP_ALREADY_IN_GROUP, playerTarget->GetName().c_str());
handler->PSendSysMessage(LANG_GROUP_ALREADY_IN_GROUP, playerTarget->GetName());
return true;
}
}
@@ -177,7 +177,7 @@ public:
else
{
// specified source player is not in a group
handler->PSendSysMessage(LANG_GROUP_NOT_IN_GROUP, playerSource->GetName().c_str());
handler->PSendSysMessage(LANG_GROUP_NOT_IN_GROUP, playerSource->GetName());
return true;
}
}
@@ -214,7 +214,7 @@ public:
if (!groupTarget)
{
handler->PSendSysMessage(LANG_GROUP_NOT_IN_GROUP, target->GetName().c_str());
handler->PSendSysMessage(LANG_GROUP_NOT_IN_GROUP, target->GetName());
return true;
}
+4 -4
View File
@@ -239,11 +239,11 @@ public:
return false;
// Display Guild Information
handler->PSendSysMessage(LANG_GUILD_INFO_NAME, guild->GetName().c_str(), guild->GetId()); // Guild Id + Name
handler->PSendSysMessage(LANG_GUILD_INFO_NAME, guild->GetName(), guild->GetId()); // Guild Id + Name
std::string guildMasterName;
if (sCharacterCache->GetCharacterNameByGuid(guild->GetLeaderGUID(), guildMasterName))
handler->PSendSysMessage(LANG_GUILD_INFO_GUILD_MASTER, guildMasterName.c_str(), guild->GetLeaderGUID().GetCounter()); // Guild Master
handler->PSendSysMessage(LANG_GUILD_INFO_GUILD_MASTER, guildMasterName, guild->GetLeaderGUID().ToString()); // Guild Master
// Format creation date
char createdDateStr[20];
@@ -254,8 +254,8 @@ public:
handler->PSendSysMessage(LANG_GUILD_INFO_CREATION_DATE, createdDateStr); // Creation Date
handler->PSendSysMessage(LANG_GUILD_INFO_MEMBER_COUNT, guild->GetMemberCount()); // Number of Members
handler->PSendSysMessage(LANG_GUILD_INFO_BANK_GOLD, guild->GetTotalBankMoney() / 100 / 100); // Bank Gold (in gold coins)
handler->PSendSysMessage(LANG_GUILD_INFO_MOTD, guild->GetMOTD().c_str()); // Message of the Day
handler->PSendSysMessage(LANG_GUILD_INFO_EXTRA_INFO, guild->GetInfo().c_str()); // Extra Information
handler->PSendSysMessage(LANG_GUILD_INFO_MOTD, guild->GetMOTD()); // Message of the Day
handler->PSendSysMessage(LANG_GUILD_INFO_EXTRA_INFO, guild->GetInfo()); // Extra Information
return true;
}
};
+9 -9
View File
@@ -74,13 +74,13 @@ public:
uint32 resetTime = bind.extended ? save->GetExtendedResetTime() : save->GetResetTime();
uint32 ttr = (resetTime >= GameTime::GetGameTime().count() ? resetTime - GameTime::GetGameTime().count() : 0);
std::string timeleft = secsToTimeString(ttr);
handler->PSendSysMessage("map: %d, inst: %d, perm: %s, diff: %d, canReset: %s, TTR: %s%s",
mapId, save->GetInstanceId(), bind.perm ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft.c_str(), (bind.extended ? " (extended)" : ""));
handler->PSendSysMessage("map: {}, inst: {}, perm: {}, diff: {}, canReset: {}, TTR: {}{}",
mapId, save->GetInstanceId(), bind.perm ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft, (bind.extended ? " (extended)" : ""));
counter++;
}
}
handler->PSendSysMessage("player binds: %d", counter);
handler->PSendSysMessage("player binds: {}", counter);
return true;
}
@@ -112,7 +112,7 @@ public:
uint32 resetTime = itr->second.extended ? save->GetExtendedResetTime() : save->GetResetTime();
uint32 ttr = (resetTime >= GameTime::GetGameTime().count() ? resetTime - GameTime::GetGameTime().count() : 0);
std::string timeleft = secsToTimeString(ttr);
handler->PSendSysMessage("unbinding map: %d, inst: %d, perm: %s, diff: %d, canReset: %s, TTR: %s%s", itr->first, save->GetInstanceId(), itr->second.perm ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft.c_str(), (itr->second.extended ? " (extended)" : ""));
handler->PSendSysMessage("unbinding map: {}, inst: {}, perm: {}, diff: {}, canReset: {}, TTR: {}{}", itr->first, save->GetInstanceId(), itr->second.perm ? "yes" : "no", save->GetDifficulty(), save->CanReset() ? "yes" : "no", timeleft, (itr->second.extended ? " (extended)" : ""));
sInstanceSaveMgr->PlayerUnbindInstance(player->GetGUID(), itr->first, Difficulty(i), true, player);
itr = m_boundInstances.begin();
counter++;
@@ -122,7 +122,7 @@ public:
}
}
handler->PSendSysMessage("instances unbound: %d", counter);
handler->PSendSysMessage("instances unbound: {}", counter);
return true;
}
@@ -131,13 +131,13 @@ public:
{
uint32 dungeon = 0, battleground = 0, arena = 0, spectators = 0;
sMapMgr->GetNumInstances(dungeon, battleground, arena);
handler->PSendSysMessage("instances loaded: dungeons (%d), battlegrounds (%d), arenas (%d)", dungeon, battleground, arena);
handler->PSendSysMessage("instances loaded: dungeons ({}), battlegrounds ({}), arenas ({})", dungeon, battleground, arena);
dungeon = 0;
battleground = 0;
arena = 0;
spectators = 0;
sMapMgr->GetNumPlayersInInstances(dungeon, battleground, arena, spectators);
handler->SendErrorMessage("players in instances: dungeons (%d), battlegrounds (%d), arenas (%d + %d spect)", dungeon, battleground, arena, spectators);
handler->SendErrorMessage("players in instances: dungeons ({}), battlegrounds ({}), arenas ({} + {} spect)", dungeon, battleground, arena, spectators);
return false;
}
@@ -202,7 +202,7 @@ public:
map->GetInstanceScript()->SetBossState(encounterId, EncounterState(state));
std::string stateName = InstanceScript::GetBossStateName(state);
handler->PSendSysMessage(LANG_COMMAND_INST_SET_BOSS_STATE, encounterId, state, stateName.c_str());
handler->PSendSysMessage(LANG_COMMAND_INST_SET_BOSS_STATE, encounterId, state, stateName);
return true;
}
@@ -245,7 +245,7 @@ public:
uint32 state = map->GetInstanceScript()->GetBossState(encounterId);
std::string stateName = InstanceScript::GetBossStateName(state);
handler->PSendSysMessage(LANG_COMMAND_INST_GET_BOSS_STATE, encounterId, state, stateName.c_str());
handler->PSendSysMessage(LANG_COMMAND_INST_GET_BOSS_STATE, encounterId, state, stateName);
return true;
}
};
+1 -1
View File
@@ -114,7 +114,7 @@ public:
CharacterDatabase.Execute(delStmt);
std::string nameLink = handler->playerLink(player.GetName());
handler->PSendSysMessage(LANG_MAIL_SENT, nameLink.c_str());
handler->PSendSysMessage(LANG_MAIL_SENT, nameLink);
return true;
}
+1 -1
View File
@@ -303,7 +303,7 @@ public:
target->LearnCustomSpells();
target->learnQuestRewardedSpells();
handler->PSendSysMessage(LANG_COMMAND_LEARN_ALL_DEFAULT_AND_QUEST, handler->GetNameLink(target).c_str());
handler->PSendSysMessage(LANG_COMMAND_LEARN_ALL_DEFAULT_AND_QUEST, handler->GetNameLink(target));
return true;
}
+5 -5
View File
@@ -31,9 +31,9 @@ void GetPlayerInfo(ChatHandler* handler, Player* player)
lfg::LfgDungeonSet dungeons = sLFGMgr->GetSelectedDungeons(guid);
std::string const& state = lfg::GetStateString(sLFGMgr->GetState(guid));
handler->PSendSysMessage(LANG_LFG_PLAYER_INFO, player->GetName().c_str(),
state.c_str(), uint8(dungeons.size()), lfg::ConcatenateDungeons(dungeons).c_str(),
lfg::GetRolesString(sLFGMgr->GetRoles(guid)).c_str(), sLFGMgr->GetComment(guid).c_str());
handler->PSendSysMessage(LANG_LFG_PLAYER_INFO, player->GetName(),
state, uint8(dungeons.size()), lfg::ConcatenateDungeons(dungeons),
lfg::GetRolesString(sLFGMgr->GetRoles(guid)), sLFGMgr->GetComment(guid));
}
using namespace Acore::ChatCommands;
@@ -89,14 +89,14 @@ public:
groupTarget = target->GetGroup();
if (!groupTarget)
{
handler->PSendSysMessage(LANG_LFG_NOT_IN_GROUP, player->GetName().c_str());
handler->PSendSysMessage(LANG_LFG_NOT_IN_GROUP, player->GetName());
return true;
}
ObjectGuid guid = groupTarget->GetGUID();
std::string const& state = lfg::GetStateString(sLFGMgr->GetState(guid));
handler->PSendSysMessage(LANG_LFG_GROUP_INFO, groupTarget->isLFGGroup(),
state.c_str(), sLFGMgr->GetDungeon(guid));
state, sLFGMgr->GetDungeon(guid));
for (GroupReference* itr = groupTarget->GetFirstMember(); itr != nullptr; itr = itr->next())
GetPlayerInfo(handler, itr->GetSource());
+14 -14
View File
@@ -124,9 +124,9 @@ public:
for (std::unordered_multimap<uint32, Creature*>::const_iterator itr = creBounds.first; itr != creBounds.second;)
{
if (handler->GetSession())
handler->PSendSysMessage(LANG_CREATURE_LIST_CHAT, guid, cInfo->Entry, guid, cInfo->Name.c_str(), x, y, z, mapId, itr->second->GetGUID().ToString().c_str(), itr->second->IsAlive() ? "*" : " ");
handler->PSendSysMessage(LANG_CREATURE_LIST_CHAT, guid, cInfo->Entry, guid, cInfo->Name, x, y, z, mapId, itr->second->GetGUID().ToString(), itr->second->IsAlive() ? "*" : " ");
else
handler->PSendSysMessage(LANG_CREATURE_LIST_CONSOLE, guid, cInfo->Name.c_str(), x, y, z, mapId, itr->second->GetGUID().ToString().c_str(), itr->second->IsAlive() ? "*" : " ");
handler->PSendSysMessage(LANG_CREATURE_LIST_CONSOLE, guid, cInfo->Name, x, y, z, mapId, itr->second->GetGUID().ToString(), itr->second->IsAlive() ? "*" : " ");
++itr;
}
liveFound = true;
@@ -136,9 +136,9 @@ public:
if (!liveFound)
{
if (handler->GetSession())
handler->PSendSysMessage(LANG_CREATURE_LIST_CHAT, guid, cInfo->Entry, guid, cInfo->Name.c_str(), x, y, z, mapId, "", "");
handler->PSendSysMessage(LANG_CREATURE_LIST_CHAT, guid, cInfo->Entry, guid, cInfo->Name, x, y, z, mapId, "", "");
else
handler->PSendSysMessage(LANG_CREATURE_LIST_CONSOLE, guid, cInfo->Name.c_str(), x, y, z, mapId, "", "");
handler->PSendSysMessage(LANG_CREATURE_LIST_CONSOLE, guid, cInfo->Name, x, y, z, mapId, "", "");
}
}
while (result->NextRow());
@@ -205,7 +205,7 @@ public:
else
itemPos = "";
handler->PSendSysMessage(LANG_ITEMLIST_SLOT, itemGuid, ownerName.c_str(), ownerGuid, ownerAccountId, itemPos);
handler->PSendSysMessage(LANG_ITEMLIST_SLOT, itemGuid, ownerName, ownerGuid, ownerAccountId, itemPos);
}
while (result->NextRow());
@@ -252,7 +252,7 @@ public:
char const* itemPos = "[in mail]";
handler->PSendSysMessage(LANG_ITEMLIST_MAIL, itemGuid, itemSenderName.c_str(), itemSender, itemSenderAccountId, itemReceiverName.c_str(), itemReceiver, itemReceiverAccount, itemPos);
handler->PSendSysMessage(LANG_ITEMLIST_MAIL, itemGuid, itemSenderName, itemSender, itemSenderAccountId, itemReceiverName, itemReceiver, itemReceiverAccount, itemPos);
}
while (result->NextRow());
@@ -296,7 +296,7 @@ public:
char const* itemPos = "[in auction]";
handler->PSendSysMessage(LANG_ITEMLIST_AUCTION, itemGuid, ownerName.c_str(), owner, ownerAccountId, itemPos);
handler->PSendSysMessage(LANG_ITEMLIST_AUCTION, itemGuid, ownerName, owner, ownerAccountId, itemPos);
}
while (result->NextRow());
}
@@ -327,7 +327,7 @@ public:
char const* itemPos = "[in guild bank]";
handler->PSendSysMessage(LANG_ITEMLIST_GUILD, itemGuid, guildName.c_str(), guildGuid, itemPos);
handler->PSendSysMessage(LANG_ITEMLIST_GUILD, itemGuid, guildName, guildGuid, itemPos);
}
while (result->NextRow());
@@ -410,9 +410,9 @@ public:
for (std::unordered_multimap<uint32, GameObject*>::const_iterator itr = goBounds.first; itr != goBounds.second;)
{
if (handler->GetSession())
handler->PSendSysMessage(LANG_GO_LIST_CHAT, guid, entry, guid, gInfo->name.c_str(), x, y, z, mapId, itr->second->GetGUID().ToString().c_str(), itr->second->isSpawned() ? "*" : " ");
handler->PSendSysMessage(LANG_GO_LIST_CHAT, guid, entry, guid, gInfo->name, x, y, z, mapId, itr->second->GetGUID().ToString(), itr->second->isSpawned() ? "*" : " ");
else
handler->PSendSysMessage(LANG_GO_LIST_CONSOLE, guid, gInfo->name.c_str(), x, y, z, mapId, itr->second->GetGUID().ToString().c_str(), itr->second->isSpawned() ? "*" : " ");
handler->PSendSysMessage(LANG_GO_LIST_CONSOLE, guid, gInfo->name, x, y, z, mapId, itr->second->GetGUID().ToString(), itr->second->isSpawned() ? "*" : " ");
++itr;
}
liveFound = true;
@@ -422,9 +422,9 @@ public:
if (!liveFound)
{
if (handler->GetSession())
handler->PSendSysMessage(LANG_GO_LIST_CHAT, guid, entry, guid, gInfo->name.c_str(), x, y, z, mapId, "", "");
handler->PSendSysMessage(LANG_GO_LIST_CHAT, guid, entry, guid, gInfo->name, x, y, z, mapId, "", "");
else
handler->PSendSysMessage(LANG_GO_LIST_CONSOLE, guid, gInfo->name.c_str(), x, y, z, mapId, "", "");
handler->PSendSysMessage(LANG_GO_LIST_CONSOLE, guid, gInfo->name, x, y, z, mapId, "", "");
}
}
while (result->NextRow());
@@ -479,11 +479,11 @@ public:
std::ostringstream ss_name;
ss_name << "|cffffffff|Hspell:" << aura->GetId() << "|h[" << name << "]|h|r";
handler->PSendSysMessage(LANG_COMMAND_TARGET_AURADETAIL, aura->GetId(), (handler->GetSession() ? ss_name.str().c_str() : name),
handler->PSendSysMessage(LANG_COMMAND_TARGET_AURADETAIL, aura->GetId(), (handler->GetSession() ? ss_name.str() : name),
aurApp->GetEffectMask(), aura->GetCharges(), aura->GetStackAmount(), aurApp->GetSlot(),
aura->GetDuration(), aura->GetMaxDuration(), (aura->IsPassive() ? passiveStr : ""),
(talent ? talentStr : ""), aura->GetCasterGUID().IsPlayer() ? "player" : "creature",
aura->GetCasterGUID().GetCounter());
aura->GetCasterGUID().ToString());
}
for (uint16 i = 0; i < TOTAL_AURAS; ++i)
+32 -28
View File
@@ -211,11 +211,11 @@ public:
if (handler->GetSession())
{
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CHAT, id, id, name.c_str());
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CHAT, id, id, name);
}
else
{
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CONSOLE, id, name.c_str());
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CONSOLE, id, name);
}
if (!found)
@@ -244,11 +244,11 @@ public:
if (handler->GetSession())
{
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CHAT, id, id, name.c_str());
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CHAT, id, id, name);
}
else
{
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CONSOLE, id, name.c_str());
handler->PSendSysMessage(LANG_CREATURE_ENTRY_LIST_CONSOLE, id, name);
}
if (!found)
@@ -312,11 +312,11 @@ public:
if (handler->GetSession())
{
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT, id, id, eventData.description.c_str(), active);
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT, id, id, eventData.description, active);
}
else
{
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CONSOLE, id, eventData.description.c_str(), active);
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CONSOLE, id, eventData.description, active);
}
if (!found)
@@ -516,11 +516,13 @@ public:
if (handler->GetSession())
{
handler->PSendSysMessage(LANG_ITEM_LIST_CHAT, itemTemplate.ItemId, ItemQualityColors[itemTemplate.Quality], itemTemplate.ItemId, name.c_str());
std::ostringstream color;
color << std::hex << ItemQualityColors[itemTemplate.Quality];
handler->PSendSysMessage(LANG_ITEM_LIST_CHAT, itemTemplate.ItemId, color.str(), itemTemplate.ItemId, name);
}
else
{
handler->PSendSysMessage(LANG_ITEM_LIST_CONSOLE, itemTemplate.ItemId, name.c_str());
handler->PSendSysMessage(LANG_ITEM_LIST_CONSOLE, itemTemplate.ItemId, name);
}
if (!found)
@@ -550,11 +552,13 @@ public:
if (handler->GetSession())
{
handler->PSendSysMessage(LANG_ITEM_LIST_CHAT, itemTemplate.ItemId, ItemQualityColors[itemTemplate.Quality], itemTemplate.ItemId, name.c_str());
std::ostringstream color;
color << std::hex << ItemQualityColors[itemTemplate.Quality];
handler->PSendSysMessage(LANG_ITEM_LIST_CHAT, itemTemplate.ItemId, color.str(), itemTemplate.ItemId, name);
}
else
{
handler->PSendSysMessage(LANG_ITEM_LIST_CONSOLE, itemTemplate.ItemId, name.c_str());
handler->PSendSysMessage(LANG_ITEM_LIST_CONSOLE, itemTemplate.ItemId, name);
}
if (!found)
@@ -640,11 +644,11 @@ public:
// send item set in "id - [namedlink locale]" format
if (handler->GetSession())
{
handler->PSendSysMessage(LANG_ITEMSET_LIST_CHAT, id, id, name.c_str(), localeNames[locale]);
handler->PSendSysMessage(LANG_ITEMSET_LIST_CHAT, id, id, name, localeNames[locale]);
}
else
{
handler->PSendSysMessage(LANG_ITEMSET_LIST_CONSOLE, id, name.c_str(), localeNames[locale]);
handler->PSendSysMessage(LANG_ITEMSET_LIST_CONSOLE, id, name, localeNames[locale]);
}
if (!found)
@@ -703,11 +707,11 @@ public:
if (handler->GetSession())
{
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CHAT, gameObjectTemplate.entry, gameObjectTemplate.entry, name.c_str());
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CHAT, gameObjectTemplate.entry, gameObjectTemplate.entry, name);
}
else
{
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CONSOLE, gameObjectTemplate.entry, name.c_str());
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CONSOLE, gameObjectTemplate.entry, name);
}
if (!found)
@@ -736,11 +740,11 @@ public:
if (handler->GetSession())
{
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CHAT, gameObjectTemplate.entry, gameObjectTemplate.entry, name.c_str());
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CHAT, gameObjectTemplate.entry, gameObjectTemplate.entry, name);
}
else
{
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CONSOLE, gameObjectTemplate.entry, name.c_str());
handler->PSendSysMessage(LANG_GO_ENTRY_LIST_CONSOLE, gameObjectTemplate.entry, name);
}
if (!found)
@@ -826,11 +830,11 @@ public:
if (handler->GetSession())
{
handler->PSendSysMessage(LANG_QUEST_LIST_CHAT, qInfo->GetQuestId(), qInfo->GetQuestId(), qInfo->GetQuestLevel(), title.c_str(), statusStr);
handler->PSendSysMessage(LANG_QUEST_LIST_CHAT, qInfo->GetQuestId(), qInfo->GetQuestId(), qInfo->GetQuestLevel(), title, statusStr);
}
else
{
handler->PSendSysMessage(LANG_QUEST_LIST_CONSOLE, qInfo->GetQuestId(), title.c_str(), statusStr);
handler->PSendSysMessage(LANG_QUEST_LIST_CONSOLE, qInfo->GetQuestId(), title, statusStr);
}
if (!found)
@@ -882,11 +886,11 @@ public:
if (handler->GetSession())
{
handler->PSendSysMessage(LANG_QUEST_LIST_CHAT, qInfo->GetQuestId(), qInfo->GetQuestId(), qInfo->GetQuestLevel(), title.c_str(), statusStr);
handler->PSendSysMessage(LANG_QUEST_LIST_CHAT, qInfo->GetQuestId(), qInfo->GetQuestId(), qInfo->GetQuestLevel(), title, statusStr);
}
else
{
handler->PSendSysMessage(LANG_QUEST_LIST_CONSOLE, qInfo->GetQuestId(), title.c_str(), statusStr);
handler->PSendSysMessage(LANG_QUEST_LIST_CONSOLE, qInfo->GetQuestId(), title, statusStr);
}
if (!found)
@@ -987,11 +991,11 @@ public:
// send skill in "id - [namedlink locale]" format
if (handler->GetSession())
{
handler->PSendSysMessage(LANG_SKILL_LIST_CHAT, skillInfo->id, skillInfo->id, name.c_str(), localeNames[locale], knownStr.c_str(), valStr.c_str());
handler->PSendSysMessage(LANG_SKILL_LIST_CHAT, skillInfo->id, skillInfo->id, name, localeNames[locale], knownStr, valStr);
}
else
{
handler->PSendSysMessage(LANG_SKILL_LIST_CONSOLE, skillInfo->id, name.c_str(), localeNames[locale], knownStr.c_str(), valStr.c_str());
handler->PSendSysMessage(LANG_SKILL_LIST_CONSOLE, skillInfo->id, name, localeNames[locale], knownStr, valStr);
}
if (!found)
@@ -1341,12 +1345,12 @@ public:
// send taxinode in "id - [name] (Map:m X:x Y:y Z:z)" format
if (handler->GetSession())
{
handler->PSendSysMessage(LANG_TAXINODE_ENTRY_LIST_CHAT, nodeEntry->ID, nodeEntry->ID, name.c_str(), localeNames[locale],
handler->PSendSysMessage(LANG_TAXINODE_ENTRY_LIST_CHAT, nodeEntry->ID, nodeEntry->ID, name, localeNames[locale],
nodeEntry->map_id, nodeEntry->x, nodeEntry->y, nodeEntry->z);
}
else
{
handler->PSendSysMessage(LANG_TAXINODE_ENTRY_LIST_CONSOLE, nodeEntry->ID, name.c_str(), localeNames[locale],
handler->PSendSysMessage(LANG_TAXINODE_ENTRY_LIST_CONSOLE, nodeEntry->ID, name, localeNames[locale],
nodeEntry->map_id, nodeEntry->x, nodeEntry->y, nodeEntry->z);
}
@@ -1416,7 +1420,7 @@ public:
}
else
{
handler->PSendSysMessage(LANG_COMMAND_TELE_LOCATION, reply.str().c_str());
handler->PSendSysMessage(LANG_COMMAND_TELE_LOCATION, reply.str());
}
if (limitReached)
@@ -1675,7 +1679,7 @@ public:
if (result2)
{
handler->PSendSysMessage(LANG_LOOKUP_PLAYER_ACCOUNT, accountName.c_str(), accountId);
handler->PSendSysMessage(LANG_LOOKUP_PLAYER_ACCOUNT, accountName, accountId);
do
{
@@ -1694,11 +1698,11 @@ public:
if (plevel > 0 && prace > 0 && prace <= RACE_DRAENEI && pclass > 0 && pclass <= CLASS_DRUID)
{
handler->PSendSysMessage(" %s (GUID %u) - %s - %s - %u%s", name.c_str(), guid, EnumUtils::ToTitle(Races(prace)), EnumUtils::ToTitle(Classes(pclass)), plevel, (online ? " - [ONLINE]" : ""));
handler->PSendSysMessage(" {} (GUID {}) - {} - {} - {}{}", name, guid, EnumUtils::ToTitle(Races(prace)), EnumUtils::ToTitle(Classes(pclass)), plevel, (online ? " - [ONLINE]" : ""));
}
else
{
handler->PSendSysMessage(LANG_LOOKUP_PLAYER_CHARACTER, name.c_str(), guid);
handler->PSendSysMessage(LANG_LOOKUP_PLAYER_CHARACTER, name, guid);
}
++counter;
+1 -1
View File
@@ -87,7 +87,7 @@ public:
if (message.empty())
return false;
sWorld->SendServerMessage(SERVER_MSG_STRING, Acore::StringFormat(handler->GetAcoreString(LANG_SYSTEMMESSAGE), message.data()).c_str());
sWorld->SendServerMessage(SERVER_MSG_STRING, Acore::StringFormatFmt(handler->GetAcoreString(LANG_SYSTEMMESSAGE), message.data()));
return true;
}
+70 -70
View File
@@ -357,43 +357,43 @@ public:
switch (error)
{
case 1:
handler->PSendSysMessage("Player %s not found.", last_name.c_str());
handler->PSendSysMessage("Player {} not found.", last_name);
break;
case 2:
handler->PSendSysMessage("Player %s is being teleported.", last_name.c_str());
handler->PSendSysMessage("Player {} is being teleported.", last_name);
break;
case 3:
handler->PSendSysMessage("Player %s is in instance/battleground/arena.", last_name.c_str());
handler->PSendSysMessage("Player {} is in instance/battleground/arena.", last_name);
break;
case 4:
handler->PSendSysMessage("Player %s is in LFG system.", last_name.c_str());
handler->PSendSysMessage("Player {} is in LFG system.", last_name);
break;
case 5:
handler->PSendSysMessage("Player %s is queued for battleground/arena.", last_name.c_str());
handler->PSendSysMessage("Player {} is queued for battleground/arena.", last_name);
break;
case 6:
handler->PSendSysMessage("Player %s is not in group.", last_name.c_str());
handler->PSendSysMessage("Player {} is not in group.", last_name);
break;
case 7:
handler->PSendSysMessage("Player %s is not in normal group.", last_name.c_str());
handler->PSendSysMessage("Player {} is not in normal group.", last_name);
break;
case 8:
handler->PSendSysMessage("Group of player %s has invalid member count.", last_name.c_str());
handler->PSendSysMessage("Group of player {} has invalid member count.", last_name);
break;
case 9:
handler->PSendSysMessage("Players %s are not in the same group.", last_name.c_str());
handler->PSendSysMessage("Players {} are not in the same group.", last_name);
break;
case 10:
handler->PSendSysMessage("Player %s is in flight.", last_name.c_str());
handler->PSendSysMessage("Player {} is in flight.", last_name);
break;
case 11:
handler->PSendSysMessage("Player %s is dead.", last_name.c_str());
handler->PSendSysMessage("Player {} is dead.", last_name);
break;
case 12:
handler->PSendSysMessage("Player %s is in a group.", last_name.c_str());
handler->PSendSysMessage("Player {} is in a group.", last_name);
break;
case 13:
handler->PSendSysMessage("Player %s occurs more than once.", last_name.c_str());
handler->PSendSysMessage("Player {} occurs more than once.", last_name);
break;
}
@@ -724,7 +724,7 @@ public:
// only allow if gm mode is on
if (!_player->IsGameMaster())
{
handler->SendErrorMessage(LANG_CANNOT_GO_TO_BG_GM, nameLink.c_str());
handler->SendErrorMessage(LANG_CANNOT_GO_TO_BG_GM, nameLink);
return false;
}
@@ -745,7 +745,7 @@ public:
// we are in group, we can go only if we are in the player group
if (_player->GetGroup() != targetPlayer->GetGroup())
{
handler->SendErrorMessage(LANG_CANNOT_GO_TO_INST_PARTY, nameLink.c_str());
handler->SendErrorMessage(LANG_CANNOT_GO_TO_INST_PARTY, nameLink);
return false;
}
}
@@ -754,7 +754,7 @@ public:
// we are not in group, let's verify our GM mode
if (!_player->IsGameMaster())
{
handler->SendErrorMessage(LANG_CANNOT_GO_TO_INST_GM, nameLink.c_str());
handler->SendErrorMessage(LANG_CANNOT_GO_TO_INST_GM, nameLink);
return false;
}
}
@@ -779,7 +779,7 @@ public:
}
}
handler->PSendSysMessage(LANG_APPEARING_AT, nameLink.c_str());
handler->PSendSysMessage(LANG_APPEARING_AT, nameLink);
// stop flight if need
if (_player->IsInFlight())
@@ -805,7 +805,7 @@ public:
return false;
}
handler->PSendSysMessage(LANG_APPEARING_AT, nameLink.c_str());
handler->PSendSysMessage(LANG_APPEARING_AT, nameLink);
// to point where player stay (if loaded)
float x, y, z, o;
@@ -869,7 +869,7 @@ public:
if (targetPlayer->IsBeingTeleported())
{
handler->SendErrorMessage(LANG_IS_TELEPORTED, nameLink.c_str());
handler->SendErrorMessage(LANG_IS_TELEPORTED, nameLink);
return false;
}
@@ -906,15 +906,15 @@ public:
(handler->GetSession()->GetPlayer()->GetGroup()->GetLeaderGUID() != handler->GetSession()->GetPlayer()->GetGUID()))
// the last check is a bit excessive, but let it be, just in case
{
handler->SendErrorMessage(LANG_CANNOT_SUMMON_TO_INST, nameLink.c_str());
handler->SendErrorMessage(LANG_CANNOT_SUMMON_TO_INST, nameLink);
return false;
}
}
handler->PSendSysMessage(LANG_SUMMONING, nameLink.c_str(), "");
handler->PSendSysMessage(LANG_SUMMONING, nameLink, "");
if (handler->needReportToTarget(targetPlayer))
{
ChatHandler(targetPlayer->GetSession()).PSendSysMessage(LANG_SUMMONED_BY, handler->playerLink(_player->GetName()).c_str());
ChatHandler(targetPlayer->GetSession()).PSendSysMessage(LANG_SUMMONED_BY, handler->playerLink(_player->GetName()));
}
// stop flight if need
@@ -942,7 +942,7 @@ public:
return false;
}
handler->PSendSysMessage(LANG_SUMMONING, nameLink.c_str(), handler->GetAcoreString(LANG_OFFLINE));
handler->PSendSysMessage(LANG_SUMMONING, nameLink, handler->GetAcoreString(LANG_OFFLINE));
// in point where GM stay
Player::SavePositionInDB(handler->GetSession()->GetPlayer()->GetMapId(),
@@ -984,7 +984,7 @@ public:
if (!group)
{
handler->SendErrorMessage(LANG_NOT_IN_GROUP, nameLink.c_str());
handler->SendErrorMessage(LANG_NOT_IN_GROUP, nameLink);
return false;
}
@@ -1020,7 +1020,7 @@ public:
if (player->IsBeingTeleported())
{
handler->SendErrorMessage(LANG_IS_TELEPORTED, plNameLink.c_str());
handler->SendErrorMessage(LANG_IS_TELEPORTED, plNameLink);
return false;
}
@@ -1031,15 +1031,15 @@ public:
if (playerMap->Instanceable() && playerMap->GetInstanceId() != gmMap->GetInstanceId())
{
// cannot summon from instance to instance
handler->SendErrorMessage(LANG_CANNOT_SUMMON_TO_INST, plNameLink.c_str());
handler->SendErrorMessage(LANG_CANNOT_SUMMON_TO_INST, plNameLink);
return false;
}
}
handler->PSendSysMessage(LANG_SUMMONING, plNameLink.c_str(), "");
handler->PSendSysMessage(LANG_SUMMONING, plNameLink, "");
if (handler->needReportToTarget(player))
{
ChatHandler(player->GetSession()).PSendSysMessage(LANG_SUMMONED_BY, handler->GetNameLink().c_str());
ChatHandler(player->GetSession()).PSendSysMessage(LANG_SUMMONED_BY, handler->GetNameLink());
}
// stop flight if need
@@ -1169,7 +1169,7 @@ public:
return false;
}
handler->PSendSysMessage(LANG_OBJECT_GUID, guid.ToString().c_str());
handler->PSendSysMessage(LANG_OBJECT_GUID, guid.ToString());
return true;
}
@@ -1199,7 +1199,7 @@ public:
if (!spell)
{
target->RemoveAllSpellCooldown();
handler->PSendSysMessage(LANG_REMOVEALL_COOLDOWN, nameLink.c_str());
handler->PSendSysMessage(LANG_REMOVEALL_COOLDOWN, nameLink);
}
else
{
@@ -1210,7 +1210,7 @@ public:
}
target->RemoveSpellCooldown(spell.value()->Id, true);
handler->PSendSysMessage(LANG_REMOVE_COOLDOWN, spell.value()->Id, target == handler->GetSession()->GetPlayer() ? handler->GetAcoreString(LANG_YOU) : nameLink.c_str());
handler->PSendSysMessage(LANG_REMOVE_COOLDOWN, spell.value()->Id, target == handler->GetSession()->GetPlayer() ? handler->GetAcoreString(LANG_YOU) : nameLink);
}
return true;
}
@@ -1265,7 +1265,7 @@ public:
if (targetPlayer->IsBeingTeleported())
{
handler->SendErrorMessage(LANG_IS_TELEPORTED, handler->playerLink(target->GetName()).c_str());
handler->SendErrorMessage(LANG_IS_TELEPORTED, handler->playerLink(target->GetName()));
return false;
}
@@ -1357,7 +1357,7 @@ public:
}
else
{
handler->PSendSysMessage(LANG_COMMAND_KICKMESSAGE, target->GetName().c_str());
handler->PSendSysMessage(LANG_COMMAND_KICKMESSAGE, target->GetName());
}
targetPlayer->GetSession()->KickPlayer("HandleKickPlayerCommand");
@@ -1550,7 +1550,7 @@ public:
team_name = handler->GetAcoreString(LANG_COMMAND_GRAVEYARD_ALLIANCE);
}
handler->PSendSysMessage(LANG_COMMAND_GRAVEYARDNEAREST, graveyardId, team_name.c_str(), zone_id);
handler->PSendSysMessage(LANG_COMMAND_GRAVEYARDNEAREST, graveyardId, team_name, zone_id);
}
else
{
@@ -1569,7 +1569,7 @@ public:
team_name = handler->GetAcoreString(LANG_COMMAND_GRAVEYARD_ALLIANCE);
}
handler->PSendSysMessage(LANG_COMMAND_ZONENOGRAFACTION, zone_id, team_name.c_str());
handler->PSendSysMessage(LANG_COMMAND_ZONENOGRAFACTION, zone_id, team_name);
}
return true;
@@ -1674,21 +1674,21 @@ public:
if (!playerTarget->HasItemCount(itemId, 0))
{
// output that player don't have any items to destroy
handler->SendErrorMessage(LANG_REMOVEITEM_FAILURE, handler->GetNameLink(playerTarget).c_str(), itemId);
handler->SendErrorMessage(LANG_REMOVEITEM_FAILURE, handler->GetNameLink(playerTarget), itemId);
return false;
}
if (!playerTarget->HasItemCount(itemId, -count))
{
// output that player don't have as many items that you want to destroy
handler->SendErrorMessage(LANG_REMOVEITEM_ERROR, handler->GetNameLink(playerTarget).c_str(), itemId);
handler->SendErrorMessage(LANG_REMOVEITEM_ERROR, handler->GetNameLink(playerTarget), itemId);
return false;
}
}
// output successful amount of destroyed items
playerTarget->DestroyItemCount(itemId, -count, true, false);
handler->PSendSysMessage(LANG_REMOVEITEM, itemId, -count, handler->GetNameLink(playerTarget).c_str());
handler->PSendSysMessage(LANG_REMOVEITEM, itemId, -count, handler->GetNameLink(playerTarget));
return true;
}
@@ -1883,7 +1883,7 @@ public:
// add the skill to the player's book with step 1 (which is the first rank, in most cases something
// like 'Apprentice <skill>'.
target->SetSkill(skillID, targetHasSkill ? target->GetSkillStep(skillID) : 1, level, max);
handler->PSendSysMessage(LANG_SET_SKILL, skillID, skillLine->name[handler->GetSessionDbcLocale()], handler->GetNameLink(target).c_str(), level, max);
handler->PSendSysMessage(LANG_SET_SKILL, skillID, skillLine->name[handler->GetSessionDbcLocale()], handler->GetNameLink(target), level, max);
return true;
}
@@ -2131,7 +2131,7 @@ public:
// Initiate output
// Output I. LANG_PINFO_PLAYER
handler->PSendSysMessage(LANG_PINFO_PLAYER, playerTarget ? "" : handler->GetAcoreString(LANG_OFFLINE), nameLink.c_str(), target->GetGUID().GetCounter());
handler->PSendSysMessage(LANG_PINFO_PLAYER, playerTarget ? "" : handler->GetAcoreString(LANG_OFFLINE), nameLink, target->GetGUID().ToString());
// Output II. LANG_PINFO_GM_ACTIVE if character is gamemaster
if (playerTarget && playerTarget->IsGameMaster())
@@ -2142,29 +2142,29 @@ public:
// Output III. LANG_PINFO_BANNED if ban exists and is applied
if (banTime >= 0)
{
handler->PSendSysMessage(LANG_PINFO_BANNED, banType.c_str(), banReason.c_str(), banTime > 0 ? secsToTimeString(banTime - GameTime::GetGameTime().count(), true).c_str() : handler->GetAcoreString(LANG_PERMANENTLY), bannedBy.c_str());
handler->PSendSysMessage(LANG_PINFO_BANNED, banType, banReason, banTime > 0 ? secsToTimeString(banTime - GameTime::GetGameTime().count(), true) : handler->GetAcoreString(LANG_PERMANENTLY), bannedBy);
}
// Output IV. LANG_PINFO_MUTED if mute is applied
if (muteTime > 0)
{
handler->PSendSysMessage(LANG_PINFO_MUTED, muteReason.c_str(), secsToTimeString(muteTime - GameTime::GetGameTime().count(), true).c_str(), muteBy.c_str());
handler->PSendSysMessage(LANG_PINFO_MUTED, muteReason, secsToTimeString(muteTime - GameTime::GetGameTime().count(), true), muteBy);
}
// Output V. LANG_PINFO_ACC_ACCOUNT
handler->PSendSysMessage(LANG_PINFO_ACC_ACCOUNT, userName.c_str(), accId, security);
handler->PSendSysMessage(LANG_PINFO_ACC_ACCOUNT, userName, accId, security);
// Output VI. LANG_PINFO_ACC_LASTLOGIN
handler->PSendSysMessage(LANG_PINFO_ACC_LASTLOGIN, lastLogin.c_str(), failedLogins);
handler->PSendSysMessage(LANG_PINFO_ACC_LASTLOGIN, lastLogin, failedLogins);
// Output VII. LANG_PINFO_ACC_OS
handler->PSendSysMessage(LANG_PINFO_ACC_OS, OS.c_str(), latency);
handler->PSendSysMessage(LANG_PINFO_ACC_OS, OS, latency);
// Output VIII. LANG_PINFO_ACC_REGMAILS
handler->PSendSysMessage(LANG_PINFO_ACC_REGMAILS, regMail.c_str(), eMail.c_str());
handler->PSendSysMessage(LANG_PINFO_ACC_REGMAILS, regMail, eMail);
// Output IX. LANG_PINFO_ACC_IP
handler->PSendSysMessage(LANG_PINFO_ACC_IP, lastIp.c_str(), locked ? handler->GetAcoreString(LANG_YES) : handler->GetAcoreString(LANG_NO));
handler->PSendSysMessage(LANG_PINFO_ACC_IP, lastIp, locked ? handler->GetAcoreString(LANG_YES) : handler->GetAcoreString(LANG_NO));
// Output X. LANG_PINFO_CHR_LEVEL
if (level != sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
@@ -2245,10 +2245,10 @@ public:
break;
}
handler->PSendSysMessage(LANG_PINFO_CHR_RACE, (gender == 0 ? handler->GetAcoreString(LANG_CHARACTER_GENDER_MALE) : handler->GetAcoreString(LANG_CHARACTER_GENDER_FEMALE)), raceStr.c_str(), classStr.c_str());
handler->PSendSysMessage(LANG_PINFO_CHR_RACE, (gender == 0 ? handler->GetAcoreString(LANG_CHARACTER_GENDER_MALE) : handler->GetAcoreString(LANG_CHARACTER_GENDER_FEMALE)), raceStr, classStr);
// Output XII. LANG_PINFO_CHR_ALIVE
handler->PSendSysMessage(LANG_PINFO_CHR_ALIVE, alive.c_str());
handler->PSendSysMessage(LANG_PINFO_CHR_ALIVE, alive);
// Output XIII. LANG_PINFO_CHR_PHASE if player is not in GM mode (GM is in every phase)
if (playerTarget && !playerTarget->IsGameMaster()) // IsInWorld() returns false on loadingscreen, so it's more
@@ -2296,22 +2296,22 @@ public:
// Output XVII. - XVIX. if they are not empty
if (!guildName.empty())
{
handler->PSendSysMessage(LANG_PINFO_CHR_GUILD, guildName.c_str(), guildId);
handler->PSendSysMessage(LANG_PINFO_CHR_GUILD_RANK, guildRank.c_str(), uint32(guildRankId));
handler->PSendSysMessage(LANG_PINFO_CHR_GUILD, guildName, guildId);
handler->PSendSysMessage(LANG_PINFO_CHR_GUILD_RANK, guildRank, uint32(guildRankId));
if (!note.empty())
{
handler->PSendSysMessage(LANG_PINFO_CHR_GUILD_NOTE, note.c_str());
handler->PSendSysMessage(LANG_PINFO_CHR_GUILD_NOTE, note);
}
if (!officeNote.empty())
{
handler->PSendSysMessage(LANG_PINFO_CHR_GUILD_ONOTE, officeNote.c_str());
handler->PSendSysMessage(LANG_PINFO_CHR_GUILD_ONOTE, officeNote);
}
}
// Output XX. LANG_PINFO_CHR_PLAYEDTIME
handler->PSendSysMessage(LANG_PINFO_CHR_PLAYEDTIME, (secsToTimeString(totalPlayerTime, true)).c_str());
handler->PSendSysMessage(LANG_PINFO_CHR_PLAYEDTIME, (secsToTimeString(totalPlayerTime, true)));
// Mail Data - an own query, because it may or may not be useful.
// SQL: "SELECT SUM(CASE WHEN (checked & 1) THEN 1 ELSE 0 END) AS 'readmail', COUNT(*) AS 'totalmail' FROM mail WHERE `receiver` = ?"
@@ -2458,7 +2458,7 @@ public:
sWorld->SendWorldText(LANG_COMMAND_MUTEMESSAGE_WORLD, muteBy.c_str(), nameLink.c_str(), secsToTimeString(muteDuration, true).c_str(), muteReasonStr.c_str());
}
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_CHAT_DISABLED, secsToTimeString(muteDuration, true).c_str(), muteBy.c_str(), muteReasonStr.c_str());
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_CHAT_DISABLED, secsToTimeString(muteDuration, true), muteBy, muteReasonStr);
}
else
{
@@ -2492,7 +2492,7 @@ public:
for (HashMapHolder<Player>::MapType::const_iterator itr = m.begin(); itr != m.end(); ++itr)
if (itr->second->GetSession()->GetSecurity())
ChatHandler(itr->second->GetSession()).PSendSysMessage(target ? LANG_YOU_DISABLE_CHAT : LANG_COMMAND_DISABLE_CHAT_DELAYED,
(handler->GetSession() ? handler->GetSession()->GetPlayerName().c_str() : handler->GetAcoreString(LANG_CONSOLE)), nameLink.c_str(), secsToTimeString(muteDuration, true).c_str(), muteReasonStr.c_str());
(handler->GetSession() ? handler->GetSession()->GetPlayerName() : handler->GetAcoreString(LANG_CONSOLE)), nameLink, secsToTimeString(muteDuration, true), muteReasonStr);
}
return true;
@@ -2552,7 +2552,7 @@ public:
ChatHandler(playerTarget->GetSession()).PSendSysMessage(LANG_YOUR_CHAT_ENABLED);
}
handler->PSendSysMessage(LANG_YOU_ENABLE_CHAT, handler->playerLink(target->GetName().c_str()));
handler->PSendSysMessage(LANG_YOU_ENABLE_CHAT, handler->playerLink(target->GetName()));
return true;
}
@@ -2562,14 +2562,14 @@ public:
{
if (!Utf8ToUpperOnlyLatin(accountName))
{
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
return false;
}
uint32 accountId = AccountMgr::GetId(accountName);
if (!accountId)
{
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
return false;
}
@@ -2593,7 +2593,7 @@ public:
do
{
Field* fields = result->Fetch();
handler->PSendSysMessage(LANG_COMMAND_MUTEHISTORY_OUTPUT, Acore::Time::TimeToHumanReadable(Seconds(fields[0].Get<uint32>())).c_str(), fields[1].Get<uint32>(), fields[2].Get<std::string>().c_str(), fields[3].Get<std::string>().c_str());
handler->PSendSysMessage(LANG_COMMAND_MUTEHISTORY_OUTPUT, Acore::Time::TimeToHumanReadable(Seconds(fields[0].Get<uint32>())), fields[1].Get<uint32>(), fields[2].Get<std::string>(), fields[3].Get<std::string>());
} while (result->NextRow());
return true;
@@ -2608,7 +2608,7 @@ public:
return false;
}
handler->PSendSysMessage(LANG_MOVEGENS_LIST, (unit->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), unit->GetGUID().GetCounter());
handler->PSendSysMessage(LANG_MOVEGENS_LIST, (unit->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), unit->GetGUID().ToString());
MotionMaster* motionMaster = unit->GetMotionMaster();
float x, y, z;
@@ -2658,11 +2658,11 @@ public:
}
else if (target->GetTypeId() == TYPEID_PLAYER)
{
handler->PSendSysMessage(LANG_MOVEGENS_CHASE_PLAYER, target->GetName().c_str(), target->GetGUID().GetCounter());
handler->PSendSysMessage(LANG_MOVEGENS_CHASE_PLAYER, target->GetName(), target->GetGUID().ToString());
}
else
{
handler->PSendSysMessage(LANG_MOVEGENS_CHASE_CREATURE, target->GetName().c_str(), target->GetGUID().GetCounter());
handler->PSendSysMessage(LANG_MOVEGENS_CHASE_CREATURE, target->GetName(), target->GetGUID().ToString());
}
break;
}
@@ -2684,11 +2684,11 @@ public:
}
else if (target->GetTypeId() == TYPEID_PLAYER)
{
handler->PSendSysMessage(LANG_MOVEGENS_FOLLOW_PLAYER, target->GetName().c_str(), target->GetGUID().GetCounter());
handler->PSendSysMessage(LANG_MOVEGENS_FOLLOW_PLAYER, target->GetName(), target->GetGUID().ToString());
}
else
{
handler->PSendSysMessage(LANG_MOVEGENS_FOLLOW_CREATURE, target->GetName().c_str(), target->GetGUID().GetCounter());
handler->PSendSysMessage(LANG_MOVEGENS_FOLLOW_CREATURE, target->GetName(), target->GetGUID().ToString());
}
break;
}
@@ -2841,7 +2841,7 @@ public:
Player* playerTarget = target->GetConnectedPlayer();
if (playerTarget && !creatureTarget)
{
handler->PSendSysMessage(LANG_COMMAND_FREEZE, target->GetName().c_str());
handler->PSendSysMessage(LANG_COMMAND_FREEZE, target->GetName());
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_FREEZE))
{
@@ -2852,7 +2852,7 @@ public:
}
else if (creatureTarget && creatureTarget->IsAlive())
{
handler->PSendSysMessage(LANG_COMMAND_FREEZE, GetLocalizeCreatureName(creatureTarget, handler->GetSessionDbcLocale()).c_str());
handler->PSendSysMessage(LANG_COMMAND_FREEZE, GetLocalizeCreatureName(creatureTarget, handler->GetSessionDbcLocale()));
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_FREEZE))
{
@@ -2885,13 +2885,13 @@ public:
if (!creatureTarget && playerTarget && playerTarget->HasAura(SPELL_FREEZE))
{
handler->PSendSysMessage(LANG_COMMAND_UNFREEZE, target->GetName().c_str());
handler->PSendSysMessage(LANG_COMMAND_UNFREEZE, target->GetName());
playerTarget->RemoveAurasDueToSpell(SPELL_FREEZE);
return true;
}
else if (creatureTarget && creatureTarget->HasAura(SPELL_FREEZE))
{
handler->PSendSysMessage(LANG_COMMAND_UNFREEZE, GetLocalizeCreatureName(creatureTarget, handler->GetSessionDbcLocale()).c_str());
handler->PSendSysMessage(LANG_COMMAND_UNFREEZE, GetLocalizeCreatureName(creatureTarget, handler->GetSessionDbcLocale()));
creatureTarget->RemoveAurasDueToSpell(SPELL_FREEZE);
return true;
}
@@ -2900,7 +2900,7 @@ public:
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_AURA_FROZEN);
stmt->SetData(0, target->GetGUID().GetCounter());
CharacterDatabase.Execute(stmt);
handler->PSendSysMessage(LANG_COMMAND_UNFREEZE, target->GetName().c_str());
handler->PSendSysMessage(LANG_COMMAND_UNFREEZE, target->GetName());
return true;
}
+20 -20
View File
@@ -105,17 +105,17 @@ public:
bool result = path.CalculatePath(x, y, z, false);
Movement::PointsArray const& pointPath = path.GetPath();
handler->PSendSysMessage("%s's path to %s:", target->GetName().c_str(), player->GetName().c_str());
handler->PSendSysMessage("Building: %s", useStraightPath ? "StraightPath" : useRaycast ? "Raycast" : "SmoothPath");
handler->PSendSysMessage(Acore::StringFormatFmt("Result: {} - Length: {} - Type: {}", (result ? "true" : "false"), pointPath.size(), path.GetPathType()).c_str());
handler->PSendSysMessage("{}'s path to {}:", target->GetName(), player->GetName());
handler->PSendSysMessage("Building: {}", useStraightPath ? "StraightPath" : useRaycast ? "Raycast" : "SmoothPath");
handler->PSendSysMessage("Result: {} - Length: {} - Type: {}", (result ? "true" : "false"), pointPath.size(), path.GetPathType());
G3D::Vector3 const& start = path.GetStartPosition();
G3D::Vector3 const& end = path.GetEndPosition();
G3D::Vector3 const& actualEnd = path.GetActualEndPosition();
handler->PSendSysMessage("StartPosition (%.3f, %.3f, %.3f)", start.x, start.y, start.z);
handler->PSendSysMessage("EndPosition (%.3f, %.3f, %.3f)", end.x, end.y, end.z);
handler->PSendSysMessage("ActualEndPosition (%.3f, %.3f, %.3f)", actualEnd.x, actualEnd.y, actualEnd.z);
handler->PSendSysMessage("StartPosition ({}, {}, {})", start.x, start.y, start.z);
handler->PSendSysMessage("EndPosition ({}, {}, {})", end.x, end.y, end.z);
handler->PSendSysMessage("ActualEndPosition ({}, {}, {})", actualEnd.x, actualEnd.y, actualEnd.z);
if (!player->IsGameMaster())
handler->PSendSysMessage("Enable GM mode to see the path points.");
@@ -136,8 +136,8 @@ public:
int32 gx = 32 - player->GetPositionX() / SIZE_OF_GRIDS;
int32 gy = 32 - player->GetPositionY() / SIZE_OF_GRIDS;
handler->PSendSysMessage("%03u%02i%02i.mmtile", player->GetMapId(), gx, gy);
handler->PSendSysMessage("gridloc [%i, %i]", gy, gx);
handler->PSendSysMessage("{}{}{}.mmtile", player->GetMapId(), gx, gy);
handler->PSendSysMessage("gridloc [{}, {}]", gy, gx);
// calculate navmesh tile location
dtNavMesh const* navmesh = MMAP::MMapFactory::createOrGetMMapMgr()->GetNavMesh(handler->GetSession()->GetPlayer()->GetMapId());
@@ -157,7 +157,7 @@ public:
int32 tilex = int32((y - min[0]) / SIZE_OF_GRIDS);
int32 tiley = int32((x - min[2]) / SIZE_OF_GRIDS);
handler->PSendSysMessage("Calc [%02i, %02i]", tilex, tiley);
handler->PSendSysMessage("Calc [{}, {}]", tilex, tiley);
// navmesh poly -> navmesh tile location
dtQueryFilterExt filter = dtQueryFilterExt();
@@ -178,7 +178,7 @@ public:
{
if (tile)
{
handler->PSendSysMessage("Dt [%02i,%02i]", tile->header->x, tile->header->y);
handler->PSendSysMessage("Dt [{},{}]", tile->header->x, tile->header->y);
return false;
}
}
@@ -208,7 +208,7 @@ public:
if (!tile || !tile->header)
continue;
handler->PSendSysMessage("[%02i, %02i]", tile->header->x, tile->header->y);
handler->PSendSysMessage("[{}, {}]", tile->header->x, tile->header->y);
}
return true;
@@ -220,7 +220,7 @@ public:
//handler->PSendSysMessage(" global mmap pathfinding is %sabled", DisableMgr::IsPathfindingEnabled(mapId) ? "en" : "dis");
MMAP::MMapMgr* manager = MMAP::MMapFactory::createOrGetMMapMgr();
handler->PSendSysMessage(" %u maps loaded with %u tiles overall", manager->getLoadedMapsCount(), manager->getLoadedTilesCount());
handler->PSendSysMessage(" {} maps loaded with {} tiles overall", manager->getLoadedMapsCount(), manager->getLoadedTilesCount());
dtNavMesh const* navmesh = manager->GetNavMesh(handler->GetSession()->GetPlayer()->GetMapId());
if (!navmesh)
@@ -252,11 +252,11 @@ public:
}
handler->PSendSysMessage("Navmesh stats:");
handler->PSendSysMessage(" %u tiles loaded", tileCount);
handler->PSendSysMessage(" %u BVTree nodes", nodeCount);
handler->PSendSysMessage(" %u polygons (%u vertices)", polyCount, vertCount);
handler->PSendSysMessage(" %u triangles (%u vertices)", triCount, triVertCount);
handler->PSendSysMessage(" %.2f MB of data (not including pointers)", ((float)dataSize / sizeof(unsigned char)) / 1048576);
handler->PSendSysMessage(" {} tiles loaded", tileCount);
handler->PSendSysMessage(" {} BVTree nodes", nodeCount);
handler->PSendSysMessage(" {} polygons ({} vertices)", polyCount, vertCount);
handler->PSendSysMessage(" {} triangles ({} vertices)", triCount, triVertCount);
handler->PSendSysMessage(" {} MB of data (not including pointers)", ((float)dataSize / sizeof(unsigned char)) / 1048576);
return true;
}
@@ -274,7 +274,7 @@ public:
if (!creatureList.empty())
{
handler->PSendSysMessage(Acore::StringFormatFmt("Found {} Creatures.", creatureList.size()).c_str());
handler->PSendSysMessage("Found {} Creatures.", creatureList.size());
uint32 paths = 0;
uint32 uStartTime = getMSTime();
@@ -289,10 +289,10 @@ public:
}
uint32 uPathLoadTime = getMSTimeDiff(uStartTime, getMSTime());
handler->PSendSysMessage("Generated %i paths in %i ms", paths, uPathLoadTime);
handler->PSendSysMessage("Generated {} paths in {} ms", paths, uPathLoadTime);
}
else
handler->PSendSysMessage("No creatures in %f yard range.", radius);
handler->PSendSysMessage("No creatures in {} yard range.", radius);
return true;
}
+29 -29
View File
@@ -94,11 +94,11 @@ public:
{
if (Player* player = target->ToPlayer())
{
handler->PSendSysMessage(resourceMessage, std::forward<Args>(args)..., handler->GetNameLink(player).c_str());
handler->PSendSysMessage(resourceMessage, std::forward<Args>(args)..., handler->GetNameLink(player));
if (handler->needReportToTarget(player))
{
ChatHandler(player->GetSession()).PSendSysMessage(resourceReportMessage, handler->GetNameLink().c_str(), std::forward<Args>(args)...);
ChatHandler(player->GetSession()).PSendSysMessage(resourceReportMessage, handler->GetNameLink(), std::forward<Args>(args)...);
}
}
}
@@ -135,11 +135,11 @@ public:
return false;
}
handler->PSendSysMessage(LANG_YOU_CHANGE_HP, handler->GetNameLink(target).c_str(), healthPoints, healthPoints);
handler->PSendSysMessage(LANG_YOU_CHANGE_HP, handler->GetNameLink(target), healthPoints, healthPoints);
if (handler->needReportToTarget(target))
{
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_HP_CHANGED, handler->GetNameLink().c_str(), healthPoints, healthPoints);
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_HP_CHANGED, handler->GetNameLink(), healthPoints, healthPoints);
}
target->SetMaxHealth(healthPoints);
@@ -158,11 +158,11 @@ public:
return false;
}
handler->PSendSysMessage(LANG_YOU_CHANGE_MANA, handler->GetNameLink(target).c_str(), manaPoints, manaPoints);
handler->PSendSysMessage(LANG_YOU_CHANGE_MANA, handler->GetNameLink(target), manaPoints, manaPoints);
if (handler->needReportToTarget(target))
{
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MANA_CHANGED, handler->GetNameLink().c_str(), manaPoints, manaPoints);
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MANA_CHANGED, handler->GetNameLink(), manaPoints, manaPoints);
}
target->SetMaxPower(POWER_MANA, manaPoints);
@@ -183,11 +183,11 @@ public:
energyPoints *= 10;
handler->PSendSysMessage(LANG_YOU_CHANGE_ENERGY, handler->GetNameLink(target).c_str(), energyPoints / 10, energyPoints / 10);
handler->PSendSysMessage(LANG_YOU_CHANGE_ENERGY, handler->GetNameLink(target), energyPoints / 10, energyPoints / 10);
if (handler->needReportToTarget(target))
{
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_ENERGY_CHANGED, handler->GetNameLink().c_str(), energyPoints / 10, energyPoints / 10);
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_ENERGY_CHANGED, handler->GetNameLink(), energyPoints / 10, energyPoints / 10);
}
target->SetMaxPower(POWER_ENERGY, energyPoints);
@@ -210,11 +210,11 @@ public:
ragePoints *= 10;
handler->PSendSysMessage(LANG_YOU_CHANGE_RAGE, handler->GetNameLink(target).c_str(), ragePoints / 10, ragePoints / 10);
handler->PSendSysMessage(LANG_YOU_CHANGE_RAGE, handler->GetNameLink(target), ragePoints / 10, ragePoints / 10);
if (handler->needReportToTarget(target))
{
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_RAGE_CHANGED, handler->GetNameLink().c_str(), ragePoints / 10, ragePoints / 10);
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_RAGE_CHANGED, handler->GetNameLink(), ragePoints / 10, ragePoints / 10);
}
target->SetMaxPower(POWER_RAGE, ragePoints);
@@ -235,11 +235,11 @@ public:
runePoints *= 10;
handler->PSendSysMessage(LANG_YOU_CHANGE_RUNIC_POWER, handler->GetNameLink(target).c_str(), runePoints / 10, runePoints / 10);
handler->PSendSysMessage(LANG_YOU_CHANGE_RUNIC_POWER, handler->GetNameLink(target), runePoints / 10, runePoints / 10);
if (handler->needReportToTarget(target))
{
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_RUNIC_POWER_CHANGED, handler->GetNameLink().c_str(), runePoints / 10, runePoints / 10);
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_RUNIC_POWER_CHANGED, handler->GetNameLink(), runePoints / 10, runePoints / 10);
}
target->SetMaxPower(POWER_RUNIC_POWER, runePoints);
@@ -264,7 +264,7 @@ public:
uint32 flag = target->GetUnitFlags();
uint32 npcflag = target->GetNpcFlags();
uint32 dyflag = target->GetDynamicFlags();
handler->PSendSysMessage(LANG_CURRENT_FACTION, target->GetGUID().GetCounter(), factionid, flag, npcflag, dyflag);
handler->PSendSysMessage(LANG_CURRENT_FACTION, target->GetGUID().ToString(), factionid, flag, npcflag, dyflag);
return true;
}
@@ -297,7 +297,7 @@ public:
return false;
}
handler->PSendSysMessage(LANG_YOU_CHANGE_FACTION, target->GetGUID().GetCounter(), factionid, flag, npcflag, dyflag);
handler->PSendSysMessage(LANG_YOU_CHANGE_FACTION, target->GetGUID().ToString(), factionid, flag, npcflag, dyflag);
target->SetFaction(factionid);
target->ReplaceAllUnitFlags(flag);
@@ -323,10 +323,10 @@ public:
return false;
}
handler->PSendSysMessage(LANG_YOU_CHANGE_SPELLFLATID, spellFlatID, val, mark ? *mark : 65535, handler->GetNameLink(target).c_str());
handler->PSendSysMessage(LANG_YOU_CHANGE_SPELLFLATID, spellFlatID, val, mark ? *mark : 65535, handler->GetNameLink(target));
if (handler->needReportToTarget(target))
{
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_SPELLFLATID_CHANGED, handler->GetNameLink().c_str(), spellFlatID, val, mark ? *mark : 65535);
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_SPELLFLATID_CHANGED, handler->GetNameLink(), spellFlatID, val, mark ? *mark : 65535);
}
WorldPacket data(SMSG_SET_FLAT_SPELL_MODIFIER, (1 + 1 + 2 + 2));
@@ -511,9 +511,9 @@ public:
if (handler->HasLowerSecurity(player))
return false;
handler->PSendSysMessage(LANG_YOU_CHANGE_SIZE, scale, handler->GetNameLink(player).c_str());
handler->PSendSysMessage(LANG_YOU_CHANGE_SIZE, scale, handler->GetNameLink(player));
if (handler->needReportToTarget(player))
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink().c_str(), scale);
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink(), scale);
}
target->SetObjectScale(scale);
@@ -617,9 +617,9 @@ public:
LOG_DEBUG("chat.system", handler->GetAcoreString(LANG_CURRENT_MONEY), targetMoney, moneyToAdd, newmoney);
if (newmoney <= 0)
{
handler->PSendSysMessage(LANG_YOU_TAKE_ALL_MONEY, handler->GetNameLink(target).c_str());
handler->PSendSysMessage(LANG_YOU_TAKE_ALL_MONEY, handler->GetNameLink(target));
if (handler->needReportToTarget(target))
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_ALL_MONEY_GONE, handler->GetNameLink().c_str());
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_ALL_MONEY_GONE, handler->GetNameLink());
target->SetMoney(0);
}
@@ -628,17 +628,17 @@ public:
if (newmoney > MAX_MONEY_AMOUNT)
newmoney = MAX_MONEY_AMOUNT;
handler->PSendSysMessage(LANG_YOU_TAKE_MONEY, std::abs(moneyToAdd), handler->GetNameLink(target).c_str());
handler->PSendSysMessage(LANG_YOU_TAKE_MONEY, std::abs(moneyToAdd), handler->GetNameLink(target));
if (handler->needReportToTarget(target))
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MONEY_TAKEN, handler->GetNameLink().c_str(), std::abs(moneyToAdd));
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MONEY_TAKEN, handler->GetNameLink(), std::abs(moneyToAdd));
target->SetMoney(newmoney);
}
}
else
{
handler->PSendSysMessage(LANG_YOU_GIVE_MONEY, moneyToAdd, handler->GetNameLink(target).c_str());
handler->PSendSysMessage(LANG_YOU_GIVE_MONEY, moneyToAdd, handler->GetNameLink(target));
if (handler->needReportToTarget(target))
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MONEY_GIVEN, handler->GetNameLink().c_str(), moneyToAdd);
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MONEY_GIVEN, handler->GetNameLink(), moneyToAdd);
if (moneyToAdd >= MAX_MONEY_AMOUNT)
moneyToAdd = MAX_MONEY_AMOUNT;
@@ -713,7 +713,7 @@ public:
target->ModifyHonorPoints(amount);
handler->PSendSysMessage(LANG_COMMAND_MODIFY_HONOR, handler->GetNameLink(target).c_str(), target->GetHonorPoints());
handler->PSendSysMessage(LANG_COMMAND_MODIFY_HONOR, handler->GetNameLink(target), target->GetHonorPoints());
return true;
}
@@ -830,7 +830,7 @@ public:
target->GetReputationMgr().SendState(target->GetReputationMgr().GetState(factionEntry));
handler->PSendSysMessage(LANG_COMMAND_MODIFY_REP, factionEntry->name[handler->GetSessionDbcLocale()], factionId,
handler->GetNameLink(target).c_str(), target->GetReputationMgr().GetReputation(factionEntry));
handler->GetNameLink(target), target->GetReputationMgr().GetReputation(factionEntry));
return true;
}
@@ -903,7 +903,7 @@ public:
target->ModifyArenaPoints(amount);
handler->PSendSysMessage(LANG_COMMAND_MODIFY_ARENA, handler->GetNameLink(target).c_str(), target->GetArenaPoints());
handler->PSendSysMessage(LANG_COMMAND_MODIFY_ARENA, handler->GetNameLink(target), target->GetArenaPoints());
return true;
}
@@ -959,11 +959,11 @@ public:
char const* gender_full = gender ? "female" : "male";
handler->PSendSysMessage(LANG_YOU_CHANGE_GENDER, handler->GetNameLink(target).c_str(), gender_full);
handler->PSendSysMessage(LANG_YOU_CHANGE_GENDER, handler->GetNameLink(target), gender_full);
if (handler->needReportToTarget(target))
{
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_GENDER_CHANGED, gender_full, handler->GetNameLink().c_str());
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_GENDER_CHANGED, gender_full, handler->GetNameLink());
}
return true;
+17 -17
View File
@@ -290,7 +290,7 @@ public:
sObjectMgr->AddVendorItem(vendor_entry, itemId, maxcount, incrtime, extendedcost);
handler->PSendSysMessage(LANG_ITEM_ADDED_TO_LIST, itemId, item->Name1.c_str(), maxcount, incrtime, extendedcost);
handler->PSendSysMessage(LANG_ITEM_ADDED_TO_LIST, itemId, item->Name1, maxcount, incrtime, extendedcost);
return true;
}
@@ -417,7 +417,7 @@ public:
return false;
}
handler->PSendSysMessage(LANG_ITEM_DELETED_FROM_LIST, itemId, item->Name1.c_str());
handler->PSendSysMessage(LANG_ITEM_DELETED_FROM_LIST, itemId, item->Name1);
return true;
}
@@ -532,7 +532,7 @@ public:
creature->AI()->SetData(data_1, data_2);
std::string AIorScript = !creature->GetAIName().empty() ? "AI type: " + creature->GetAIName() : (!creature->GetScriptName().empty() ? "Script Name: " + creature->GetScriptName() : "No AI or Script Name Set");
handler->PSendSysMessage(LANG_NPC_SETDATA, creature->GetGUID().GetCounter(), creature->GetEntry(), creature->GetName().c_str(), data_1, data_2, AIorScript.c_str());
handler->PSendSysMessage(LANG_NPC_SETDATA, creature->GetGUID().ToString(), creature->GetEntry(), creature->GetName(), data_1, data_2, AIorScript);
return true;
}
@@ -551,7 +551,7 @@ public:
// Follow player - Using pet's default dist and angle
creature->GetMotionMaster()->MoveFollow(player, PET_FOLLOW_DIST, creature->GetFollowAngle());
handler->PSendSysMessage(LANG_CREATURE_FOLLOW_YOU_NOW, creature->GetName().c_str());
handler->PSendSysMessage(LANG_CREATURE_FOLLOW_YOU_NOW, creature->GetName());
return true;
}
@@ -589,18 +589,18 @@ public:
std::string curRespawnDelayStr = secsToTimeString(uint64(curRespawnDelay), true);
std::string defRespawnDelayStr = secsToTimeString(target->GetRespawnDelay(), true);
handler->PSendSysMessage(LANG_NPCINFO_CHAR, target->GetSpawnId(), target->GetGUID().GetCounter(), entry, id1, id2, id3, displayid, nativeid, faction, npcflags);
handler->PSendSysMessage(LANG_NPCINFO_CHAR, target->GetSpawnId(), target->GetGUID().ToString(), entry, id1, id2, id3, displayid, nativeid, faction, npcflags);
handler->PSendSysMessage(LANG_NPCINFO_LEVEL, target->GetLevel());
handler->PSendSysMessage(LANG_NPCINFO_EQUIPMENT, target->GetCurrentEquipmentId(), target->GetOriginalEquipmentId());
handler->PSendSysMessage(LANG_NPCINFO_HEALTH, target->GetCreateHealth(), target->GetMaxHealth(), target->GetHealth());
handler->PSendSysMessage(LANG_NPCINFO_FLAGS, target->GetUnitFlags(), target->GetUnitFlags2(), target->GetDynamicFlags(), target->GetFaction());
handler->PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr.c_str(), curRespawnDelayStr.c_str());
handler->PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr, curRespawnDelayStr);
handler->PSendSysMessage(LANG_NPCINFO_LOOT, cInfo->lootid, cInfo->pickpocketLootId, cInfo->SkinLootId);
handler->PSendSysMessage(LANG_NPCINFO_DUNGEON_ID, target->GetInstanceId());
handler->PSendSysMessage(LANG_NPCINFO_PHASEMASK, target->GetPhaseMask());
handler->PSendSysMessage(LANG_NPCINFO_ARMOR, target->GetArmor());
handler->PSendSysMessage(LANG_NPCINFO_POSITION, float(target->GetPositionX()), float(target->GetPositionY()), float(target->GetPositionZ()));
handler->PSendSysMessage(LANG_NPCINFO_AIINFO, target->GetAIName().c_str(), target->GetScriptName().c_str());
handler->PSendSysMessage(LANG_NPCINFO_AIINFO, target->GetAIName(), target->GetScriptName());
for (uint8 i = 0; i < NPCFLAG_COUNT; i++)
{
@@ -655,7 +655,7 @@ public:
id3 = cData->id3;
}
handler->PSendSysMessage(LANG_NPCINFO_CHAR, target->GetSpawnId(), target->GetGUID().GetCounter(), entry, id1, id2, id3, displayid, nativeid, faction, npcflags);
handler->PSendSysMessage(LANG_NPCINFO_CHAR, target->GetSpawnId(), target->GetGUID().ToString(), entry, id1, id2, id3, displayid, nativeid, faction, npcflags);
return true;
}
@@ -697,7 +697,7 @@ public:
if (!creatureTemplate)
continue;
handler->PSendSysMessage(LANG_CREATURE_LIST_CHAT, guid, entry, guid, creatureTemplate->Name.c_str(), x, y, z, mapId, "", "");
handler->PSendSysMessage(LANG_CREATURE_LIST_CHAT, guid, entry, guid, creatureTemplate->Name, x, y, z, mapId, "", "");
++count;
} while (result->NextRow());
@@ -1023,7 +1023,7 @@ public:
WorldDatabase.Execute(stmt);
creature->SetRespawnDelay(spawnTime);
handler->PSendSysMessage(LANG_COMMAND_SPAWNTIME, secsToTimeString(spawnTime, true).c_str());
handler->PSendSysMessage(LANG_COMMAND_SPAWNTIME, secsToTimeString(spawnTime, true));
return true;
}
@@ -1102,7 +1102,7 @@ public:
// reset movement
creature->GetMotionMaster()->MovementExpired(true);
handler->PSendSysMessage(LANG_CREATURE_NOT_FOLLOW_YOU_NOW, creature->GetName().c_str());
handler->PSendSysMessage(LANG_CREATURE_NOT_FOLLOW_YOU_NOW, creature->GetName());
return true;
}
@@ -1167,8 +1167,8 @@ public:
Creature* creatureTarget = handler->getSelectedCreature();
if (!creatureTarget || creatureTarget->IsPet())
{
handler->PSendSysMessage (LANG_SELECT_CREATURE);
handler->SetSentErrorMessage (true);
handler->PSendSysMessage(LANG_SELECT_CREATURE);
handler->SetSentErrorMessage(true);
return false;
}
@@ -1211,7 +1211,7 @@ public:
ObjectGuid::LowType lowguid = creature->GetSpawnId();
if (creature->GetFormation())
{
handler->PSendSysMessage("Selected creature is already member of group %u", creature->GetFormation()->GetId());
handler->PSendSysMessage("Selected creature is already member of group {}", creature->GetFormation()->GetId());
return false;
}
@@ -1237,7 +1237,7 @@ public:
WorldDatabase.Execute(stmt);
handler->PSendSysMessage("Creature %u added to formation with leader %u", lowguid, leaderGUID);
handler->PSendSysMessage("Creature {} added to formation with leader {}", lowguid, leaderGUID);
return true;
}
@@ -1254,7 +1254,7 @@ public:
if (!creature->GetSpawnId())
{
handler->SendErrorMessage("Selected creature %u isn't in creature table", creature->GetGUID().GetCounter());
handler->SendErrorMessage("Selected creature {} isn't in creature table", creature->GetGUID().ToString());
return false;
}
@@ -1264,7 +1264,7 @@ public:
return false;
}
handler->PSendSysMessage("LinkGUID '%u' added to creature with DBTableGUID: '%u'", linkguid, creature->GetSpawnId());
handler->PSendSysMessage("LinkGUID '{}' added to creature with DBTableGUID: '{}'", linkguid, creature->GetSpawnId());
return true;
}
};
+3 -3
View File
@@ -108,19 +108,19 @@ public:
uint32 spellDifficultyId = sSpellMgr->GetSpellDifficultyId(spell->Id);
if (bounds.first != bounds.second || spellDifficultyId)
{
handler->SendErrorMessage("Spell %u cannot be learnt using a command!", spell->Id);
handler->SendErrorMessage("Spell {} cannot be learnt using a command!", spell->Id);
return false;
}
// Check if pet already has it
if (pet->HasSpell(spell->Id))
{
handler->SendErrorMessage("Pet already has spell: %u", spell->Id);
handler->SendErrorMessage("Pet already has spell: {}", spell->Id);
return false;
}
pet->learnSpell(spell->Id);
handler->PSendSysMessage("Pet has learned spell %u", spell->Id);
handler->PSendSysMessage("Pet has learned spell {}", spell->Id);
return true;
}
+4 -4
View File
@@ -126,7 +126,7 @@ public:
CharacterDatabase.Execute(stmt);
}
handler->PSendSysMessage(LANG_COMMAND_QUEST_ADD, quest->GetTitle().c_str(), entry);
handler->PSendSysMessage(LANG_COMMAND_QUEST_ADD, quest->GetTitle(), entry);
handler->SetSentErrorMessage(false);
return true;
}
@@ -216,7 +216,7 @@ public:
CharacterDatabase.CommitTransaction(trans);
}
handler->PSendSysMessage(LANG_COMMAND_QUEST_REMOVED, quest->GetTitle().c_str(), entry);
handler->PSendSysMessage(LANG_COMMAND_QUEST_REMOVED, quest->GetTitle(), entry);
handler->SetSentErrorMessage(false);
return true;
}
@@ -482,7 +482,7 @@ public:
CharacterDatabase.Execute(stmt);
}
handler->PSendSysMessage(LANG_COMMAND_QUEST_COMPLETE, quest->GetTitle().c_str(), entry);
handler->PSendSysMessage(LANG_COMMAND_QUEST_COMPLETE, quest->GetTitle(), entry);
handler->SetSentErrorMessage(false);
return true;
}
@@ -727,7 +727,7 @@ public:
CharacterDatabase.CommitTransaction(trans);
}
handler->PSendSysMessage(LANG_COMMAND_QUEST_REWARDED, quest->GetTitle().c_str(), entry);
handler->PSendSysMessage(LANG_COMMAND_QUEST_REWARDED, quest->GetTitle(), entry);
handler->SetSentErrorMessage(false);
return true;
}
+11 -11
View File
@@ -196,7 +196,7 @@ public:
ChatHandler(playerTarget->GetSession()).SendSysMessage(LANG_RESET_SPELLS);
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != playerTarget)
handler->PSendSysMessage(LANG_RESET_SPELLS_ONLINE, handler->GetNameLink(playerTarget).c_str());
handler->PSendSysMessage(LANG_RESET_SPELLS_ONLINE, handler->GetNameLink(playerTarget));
}
else
{
@@ -252,7 +252,7 @@ public:
targetPlayer->SendTalentsInfoData(false);
ChatHandler(targetPlayer->GetSession()).SendSysMessage(LANG_RESET_TALENTS);
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != targetPlayer)
handler->PSendSysMessage(LANG_RESET_TALENTS_ONLINE, handler->GetNameLink(targetPlayer).c_str());
handler->PSendSysMessage(LANG_RESET_TALENTS_ONLINE, handler->GetNameLink(targetPlayer));
Pet* pet = targetPlayer->GetPet();
Pet::resetTalentsForAllPetsOf(targetPlayer, pet);
@@ -268,7 +268,7 @@ public:
CharacterDatabase.Execute(stmt);
std::string nameLink = handler->playerLink(target->GetName());
handler->PSendSysMessage(LANG_RESET_TALENTS_OFFLINE, nameLink.c_str());
handler->PSendSysMessage(LANG_RESET_TALENTS_OFFLINE, nameLink);
return true;
}
}
@@ -320,7 +320,7 @@ public:
else
{
int16 deletedItemsCount = ResetItemsEquipped(targetPlayer);
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_EQUIPPED, deletedItemsCount, handler->GetNameLink(targetPlayer).c_str());
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_EQUIPPED, deletedItemsCount, handler->GetNameLink(targetPlayer));
}
return true;
@@ -337,7 +337,7 @@ public:
else
{
int16 deletedItemsCount = ResetItemsInBags(targetPlayer);
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_BAGS, deletedItemsCount, handler->GetNameLink(targetPlayer).c_str());
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_BAGS, deletedItemsCount, handler->GetNameLink(targetPlayer));
}
return true;
@@ -354,7 +354,7 @@ public:
else
{
int16 deletedItemsCount = ResetItemsInKeyring(targetPlayer);
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_KEYRING, deletedItemsCount, handler->GetNameLink(targetPlayer).c_str());
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_KEYRING, deletedItemsCount, handler->GetNameLink(targetPlayer));
}
return true;
@@ -371,7 +371,7 @@ public:
else
{
int16 deletedItemsCount = ResetItemsInCurrenciesList(targetPlayer);
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_CURRENCY, deletedItemsCount, handler->GetNameLink(targetPlayer).c_str());
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_CURRENCY, deletedItemsCount, handler->GetNameLink(targetPlayer));
}
return true;
@@ -388,7 +388,7 @@ public:
else
{
int16 deletedItemsCount = ResetItemsInBank(targetPlayer);
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_BANK, deletedItemsCount, handler->GetNameLink(targetPlayer).c_str());
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_BANK, deletedItemsCount, handler->GetNameLink(targetPlayer));
}
return true;
@@ -405,7 +405,7 @@ public:
else
{
int16 deletedItemsCount = ResetItemsInVendorBuyBackTab(targetPlayer);
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_BUYBACK, deletedItemsCount, handler->GetNameLink(targetPlayer).c_str());
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_BUYBACK, deletedItemsCount, handler->GetNameLink(targetPlayer));
}
return true;
@@ -430,7 +430,7 @@ public:
int16 deletedItemsInCurrenciesListCount = ResetItemsInCurrenciesList(targetPlayer);
int16 deletedItemsInVendorBuyBackTabCount = ResetItemsInVendorBuyBackTab(targetPlayer);
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_ALL, handler->GetNameLink(targetPlayer).c_str(),
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_ALL, handler->GetNameLink(targetPlayer),
deletedItemsEquippedCount,
deletedItemsInBagsCount,
deletedItemsInBankCount,
@@ -463,7 +463,7 @@ public:
int16 deletedItemsStandardBagsCount = ResetItemsDeleteStandardBags(targetPlayer);
int16 deletedItemsBankBagsCount = ResetItemsDeleteBankBags(targetPlayer);
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_ALL_BAGS, handler->GetNameLink(targetPlayer).c_str(),
handler->PSendSysMessage(LANG_COMMAND_RESET_ITEMS_ALL_BAGS, handler->GetNameLink(targetPlayer),
deletedItemsEquippedCount,
deletedItemsInBagsCount,
deletedItemsInBankCount,
+4 -4
View File
@@ -133,7 +133,7 @@ public:
draft.SendMailTo(trans, MailReceiver(target->GetConnectedPlayer(), target->GetGUID().GetCounter()), sender);
CharacterDatabase.CommitTransaction(trans);
handler->PSendSysMessage(LANG_MAIL_SENT, handler->playerLink(target->GetName()).c_str());
handler->PSendSysMessage(LANG_MAIL_SENT, handler->playerLink(target->GetName()));
return true;
}
@@ -158,7 +158,7 @@ public:
draft.SendMailTo(trans, MailReceiver(target->GetConnectedPlayer(), target->GetGUID().GetCounter()), sender);
CharacterDatabase.CommitTransaction(trans);
handler->PSendSysMessage(LANG_MAIL_SENT, handler->playerLink(target->GetName()).c_str());
handler->PSendSysMessage(LANG_MAIL_SENT, handler->playerLink(target->GetName()));
return true;
}
@@ -183,7 +183,7 @@ public:
player->GetSession()->SendAreaTriggerMessage("|cffff0000[Message from administrator]:|r");
// Confirmation message
handler->PSendSysMessage(LANG_SENDMESSAGE, handler->playerLink(target->GetName()).c_str(), msg.c_str());
handler->PSendSysMessage(LANG_SENDMESSAGE, handler->playerLink(target->GetName()), msg);
return true;
}
@@ -211,7 +211,7 @@ public:
CharacterDatabase.CommitTransaction(trans);
handler->PSendSysMessage(LANG_MAIL_SENT, handler->playerLink(target->GetName()).c_str());
handler->PSendSysMessage(LANG_MAIL_SENT, handler->playerLink(target->GetName()));
return true;
}
};
+37 -34
View File
@@ -123,22 +123,22 @@ public:
if (dbPort)
dbPortOutput = Acore::StringFormatFmt("Realmlist (Realm Id: {}) configured in port {}", realm.Id.Realm, dbPort);
else
dbPortOutput = Acore::StringFormat("Realm Id: %u not found in `realmlist` table. Please check your setup", realm.Id.Realm);
dbPortOutput = Acore::StringFormatFmt("Realm Id: {} not found in `realmlist` table. Please check your setup", realm.Id.Realm);
}
HandleServerInfoCommand(handler);
handler->PSendSysMessage("Using SSL version: %s (library: %s)", OPENSSL_VERSION_TEXT, OpenSSL_version(OPENSSL_VERSION));
handler->PSendSysMessage("Using Boost version: %i.%i.%i", BOOST_VERSION / 100000, BOOST_VERSION / 100 % 1000, BOOST_VERSION % 100);
handler->PSendSysMessage("Using CMake version: %s", GitRevision::GetCMakeVersion());
handler->PSendSysMessage("Using SSL version: {} (library: {})", OPENSSL_VERSION_TEXT, OpenSSL_version(OPENSSL_VERSION));
handler->PSendSysMessage("Using Boost version: {}.{}.{}", BOOST_VERSION / 100000, BOOST_VERSION / 100 % 1000, BOOST_VERSION % 100);
handler->PSendSysMessage("Using CMake version: {}", GitRevision::GetCMakeVersion());
handler->PSendSysMessage("Using MySQL version: %u", MySQL::GetLibraryVersion());
handler->PSendSysMessage("Found MySQL Executable: %s", GitRevision::GetMySQLExecutable());
handler->PSendSysMessage("Using MySQL version: {}", MySQL::GetLibraryVersion());
handler->PSendSysMessage("Found MySQL Executable: {}", GitRevision::GetMySQLExecutable());
handler->PSendSysMessage("Compiled on: %s", GitRevision::GetHostOSVersion());
handler->PSendSysMessage("Compiled on: {}", GitRevision::GetHostOSVersion());
handler->PSendSysMessage("Worldserver listening connections on port %" PRIu16, worldPort);
handler->PSendSysMessage("%s", dbPortOutput.c_str());
handler->PSendSysMessage("{}", dbPortOutput);
bool vmapIndoorCheck = sWorld->getBoolConfig(CONFIG_VMAP_INDOOR_CHECK);
bool vmapLOSCheck = VMAP::VMapFactory::createOrGetVMapMgr()->isLineOfSightCalcEnabled();
@@ -151,7 +151,7 @@ public:
subDirs.emplace_back("maps");
if (vmapIndoorCheck || vmapLOSCheck || vmapHeightCheck)
{
handler->PSendSysMessage("VMAPs status: Enabled. LineOfSight: %i, getHeight: %i, indoorCheck: %i", vmapLOSCheck, vmapHeightCheck, vmapIndoorCheck);
handler->PSendSysMessage("VMAPs status: Enabled. LineOfSight: {}, getHeight: {}, indoorCheck: {}", vmapLOSCheck, vmapHeightCheck, vmapIndoorCheck);
subDirs.emplace_back("vmaps");
}
else
@@ -172,7 +172,7 @@ public:
if (!std::filesystem::exists(mapPath))
{
handler->PSendSysMessage("%s directory doesn't exist!. Using path: %s", subDir.c_str(), mapPath.generic_string().c_str());
handler->PSendSysMessage("{} directory doesn't exist!. Using path: {}", subDir, mapPath.generic_string());
continue;
}
@@ -184,7 +184,7 @@ public:
return val;
});
handler->PSendSysMessage(Acore::StringFormatFmt("{} directory located in {}. Total size: {} bytes", subDir.c_str(), mapPath.generic_string().c_str(), folderSize).c_str());
handler->PSendSysMessage("{} directory located in {}. Total size: {} bytes", subDir, mapPath.generic_string(), folderSize);
}
LocaleConstant defaultLocale = sWorld->GetDefaultDbcLocale();
@@ -211,13 +211,14 @@ public:
availableLocales += " ";
}
handler->PSendSysMessage("Default DBC locale: %s.\nAll available DBC locales: %s", localeNames[defaultLocale], availableLocales.c_str());
handler->PSendSysMessage("Default DBC locale: {}.\nAll available DBC locales: {}", localeNames[defaultLocale], availableLocales);
handler->PSendSysMessage("Using World DB: %s", sWorld->GetDBVersion());
handler->PSendSysMessage("Using World DB: {}", sWorld->GetDBVersion());
#ifdef MOD_PLAYERBOTS
handler->PSendSysMessage("Using Playerbots DB Revision: %s", sWorld->GetPlayerbotsDBRevision());
handler->PSendSysMessage("Using Playerbots DB Revision: {}", sWorld->GetPlayerbotsDBRevision());
#endif
std::string lldb = "No updates found!";
if (QueryResult resL = LoginDatabase.Query("SELECT name FROM updates ORDER BY name DESC LIMIT 1"))
{
@@ -237,24 +238,26 @@ public:
lwdb = fields[0].Get<std::string>();
}
handler->PSendSysMessage("Latest LoginDatabase update: %s", lldb.c_str());
handler->PSendSysMessage("Latest CharacterDatabase update: %s", lcdb.c_str());
handler->PSendSysMessage("Latest WorldDatabase update: %s", lwdb.c_str());
handler->PSendSysMessage("Latest LoginDatabase update: {}", lldb);
handler->PSendSysMessage("Latest CharacterDatabase update: {}", lcdb);
handler->PSendSysMessage("Latest WorldDatabase update: {}", lwdb);
handler->PSendSysMessage("LoginDatabase queue size: %zu", LoginDatabase.QueueSize());
handler->PSendSysMessage("CharacterDatabase queue size: %zu", CharacterDatabase.QueueSize());
handler->PSendSysMessage("WorldDatabase queue size: %zu", WorldDatabase.QueueSize());
handler->PSendSysMessage("LoginDatabase queue size: {}", LoginDatabase.QueueSize());
handler->PSendSysMessage("CharacterDatabase queue size: {}", CharacterDatabase.QueueSize());
handler->PSendSysMessage("WorldDatabase queue size: {}", WorldDatabase.QueueSize());
#ifdef MOD_PLAYERBOTS
handler->PSendSysMessage("PlayerbotsDatabase queue size: %zu", PlayerbotsDatabase.QueueSize());
handler->PSendSysMessage("PlayerbotsDatabase queue size: {}", PlayerbotsDatabase.QueueSize());
#endif
if (Acore::Module::GetEnableModulesList().empty())
handler->SendSysMessage("No modules are enabled");
handler->PSendSysMessage("No modules are enabled");
else
handler->SendSysMessage("List of enabled modules:");
handler->PSendSysMessage("List of enabled modules:");
for (auto const& modName : Acore::Module::GetEnableModulesList())
{
handler->SendSysMessage(Acore::StringFormatFmt("|- {}", modName));
handler->PSendSysMessage("|- {}", modName);
}
return true;
@@ -268,25 +271,25 @@ public:
uint32 queuedSessionCount = sWorld->GetQueuedSessionCount();
uint32 connPeak = sWorld->GetMaxActiveSessionCount();
handler->PSendSysMessage("%s", GitRevision::GetFullVersion());
handler->PSendSysMessage("{}", GitRevision::GetFullVersion());
if (!queuedSessionCount)
handler->PSendSysMessage("Connected players: %u. Characters in world: %u.", activeSessionCount, playerCount);
handler->PSendSysMessage("Connected players: {}. Characters in world: {}.", activeSessionCount, playerCount);
else
handler->PSendSysMessage("Connected players: %u. Characters in world: %u. Queue: %u.", activeSessionCount, playerCount, queuedSessionCount);
handler->PSendSysMessage("Connected players: {}. Characters in world: {}. Queue: {}.", activeSessionCount, playerCount, queuedSessionCount);
handler->PSendSysMessage("Connection peak: %u.", connPeak);
handler->PSendSysMessage(LANG_UPTIME, secsToTimeString(GameTime::GetUptime().count()).c_str());
handler->PSendSysMessage("Update time diff: %ums. Last %d diffs summary:", sWorldUpdateTime.GetLastUpdateTime(), sWorldUpdateTime.GetDatasetSize());
handler->PSendSysMessage("|- Mean: %ums", sWorldUpdateTime.GetAverageUpdateTime());
handler->PSendSysMessage("|- Median: %ums", sWorldUpdateTime.GetPercentile(50));
handler->PSendSysMessage("|- Percentiles (95, 99, max): %ums, %ums, %ums",
handler->PSendSysMessage("Connection peak: {}.", connPeak);
handler->PSendSysMessage(LANG_UPTIME, secsToTimeString(GameTime::GetUptime().count()));
handler->PSendSysMessage("Update time diff: {}ms. Last %d diffs summary:", sWorldUpdateTime.GetLastUpdateTime(), sWorldUpdateTime.GetDatasetSize());
handler->PSendSysMessage("|- Mean: {}ms", sWorldUpdateTime.GetAverageUpdateTime());
handler->PSendSysMessage("|- Median: {}ms", sWorldUpdateTime.GetPercentile(50));
handler->PSendSysMessage("|- Percentiles (95, 99, max): {}ms, {}ms, {}ms",
sWorldUpdateTime.GetPercentile(95),
sWorldUpdateTime.GetPercentile(99),
sWorldUpdateTime.GetPercentile(100));
//! Can't use sWorld->ShutdownMsg here in case of console command
if (sWorld->IsShuttingDown())
handler->PSendSysMessage(LANG_SHUTDOWN_TIMELEFT, secsToTimeString(sWorld->GetShutDownTimeLeft()).append(".").c_str());
handler->PSendSysMessage(LANG_SHUTDOWN_TIMELEFT, secsToTimeString(sWorld->GetShutDownTimeLeft()).append("."));
return true;
}
+6 -6
View File
@@ -134,9 +134,9 @@ public:
return false;
}
handler->PSendSysMessage(LANG_TELEPORTING_TO, chrNameLink.c_str(), "", locationName.c_str());
handler->PSendSysMessage(LANG_TELEPORTING_TO, chrNameLink, "", locationName);
if (handler->needReportToTarget(target))
ChatHandler(target->GetSession()).PSendSysMessage(LANG_TELEPORTED_TO_BY, handler->GetNameLink().c_str());
ChatHandler(target->GetSession()).PSendSysMessage(LANG_TELEPORTED_TO_BY, handler->GetNameLink());
// stop flight if need
if (target->IsInFlight())
@@ -157,7 +157,7 @@ public:
std::string nameLink = handler->playerLink(player.GetName());
handler->PSendSysMessage(LANG_TELEPORTING_TO, nameLink.c_str(), handler->GetAcoreString(LANG_OFFLINE), locationName.c_str());
handler->PSendSysMessage(LANG_TELEPORTING_TO, nameLink, handler->GetAcoreString(LANG_OFFLINE), locationName);
Player::SavePositionInDB({ mapId, pos }, sMapMgr->GetZoneId(PHASEMASK_NORMAL, { mapId, pos }), player.GetGUID(), nullptr);
}
@@ -252,13 +252,13 @@ public:
if (player->IsBeingTeleported())
{
handler->PSendSysMessage(LANG_IS_TELEPORTED, plNameLink.c_str());
handler->PSendSysMessage(LANG_IS_TELEPORTED, plNameLink);
continue;
}
handler->PSendSysMessage(LANG_TELEPORTING_TO, plNameLink.c_str(), "", tele->name.c_str());
handler->PSendSysMessage(LANG_TELEPORTING_TO, plNameLink.c_str(), "", tele->name);
if (handler->needReportToTarget(player))
ChatHandler(player->GetSession()).PSendSysMessage(LANG_TELEPORTED_TO_BY, nameLink.c_str());
ChatHandler(player->GetSession()).PSendSysMessage(LANG_TELEPORTED_TO_BY, nameLink);
// stop flight if need
if (target->IsInFlight())
+3 -3
View File
@@ -109,7 +109,7 @@ public:
Player* player = handler->GetSession() ? handler->GetSession()->GetPlayer() : nullptr;
if (player && ticket->IsAssignedNotTo(player->GetGUID()))
{
handler->PSendSysMessage(LANG_COMMAND_TICKETALREADYASSIGNED, ticket->GetId(), target.c_str());
handler->PSendSysMessage(LANG_COMMAND_TICKETALREADYASSIGNED, ticket->GetId(), target);
return true;
}
@@ -469,7 +469,7 @@ public:
std::string msg = ticket->FormatMessageString(*handler, nullptr, nullptr, nullptr, nullptr);
msg += handler->PGetParseString(LANG_COMMAND_TICKETRESPONSEAPPENDED, response);
handler->PSendSysMessage(msg.c_str());
handler->PSendSysMessage(msg);
return true;
}
@@ -526,7 +526,7 @@ public:
std::string msg = ticket->FormatMessageString(*handler, nullptr, nullptr, nullptr, nullptr);
msg += handler->PGetParseString(LANG_COMMAND_TICKETLISTRESPONSE, ticket->GetResponse());
handler->PSendSysMessage(msg.c_str());
handler->PSendSysMessage(msg);
return true;
}
};
+34 -34
View File
@@ -101,7 +101,7 @@ public:
uint32 maxpathid = result->Fetch()->Get<int32>();
pathid = maxpathid + 1;
handler->PSendSysMessage("%s%s|r", "|cff00ff00", "New path started.");
handler->PSendSysMessage("{}{}|r", "|cff00ff00", "New path started.");
}
}
else
@@ -112,7 +112,7 @@ public:
if (!pathid)
{
handler->PSendSysMessage("%s%s|r", "|cffff33ff", "Current creature haven't loaded path.");
handler->PSendSysMessage("{}{}|r", "|cffff33ff", "Current creature haven't loaded path.");
return true;
}
@@ -136,7 +136,7 @@ public:
WorldDatabase.Execute(stmt);
handler->PSendSysMessage("%s%s%u%s%u%s|r", "|cff00ff00", "PathID: |r|cff00ffff", pathid, "|r|cff00ff00: Waypoint |r|cff00ffff", point + 1, "|r|cff00ff00 created. ");
handler->PSendSysMessage("{}{}{}{}{}{}|r", "|cff00ff00", "PathID: |r|cff00ffff", pathid, "|r|cff00ff00: Waypoint |r|cff00ffff", point + 1, "|r|cff00ff00 created. ");
return true;
} // HandleWpAddCommand
@@ -167,7 +167,7 @@ public:
if (target->GetEntry() == 1)
{
handler->SendErrorMessage("%s%s|r", "|cffff33ff", "You want to load path to a waypoint? Aren't you?");
handler->SendErrorMessage("{}{}|r", "|cffff33ff", "You want to load path to a waypoint? Aren't you?");
return false;
}
@@ -175,7 +175,7 @@ public:
if (!pathid)
{
handler->PSendSysMessage("%s%s|r", "|cffff33ff", "No valid path number provided.");
handler->PSendSysMessage("{}{}|r", "|cffff33ff", "No valid path number provided.");
return true;
}
@@ -229,7 +229,7 @@ public:
if (!id)
return false;
handler->PSendSysMessage("%s%s|r|cff00ffff%u|r", "|cff00ff00", "Loading Path: ", id);
handler->PSendSysMessage("{}{}|r|cff00ffff{}|r", "|cff00ff00", "Loading Path: ", id);
sWaypointMgr->ReloadPath(id);
return true;
}
@@ -240,7 +240,7 @@ public:
if (!target)
{
handler->PSendSysMessage("%s%s|r", "|cff33ffff", "You must select target.");
handler->PSendSysMessage("{}{}|r", "|cff33ffff", "You must select target.");
return true;
}
@@ -270,7 +270,7 @@ public:
target->Say("Path unloaded.", LANG_UNIVERSAL);
return true;
}
handler->PSendSysMessage("%s%s|r", "|cffff33ff", "Target have no loaded path.");
handler->PSendSysMessage("{}{}|r", "|cffff33ff", "Target have no loaded path.");
}
return true;
}
@@ -309,10 +309,10 @@ public:
WorldDatabase.Execute(stmt);
handler->PSendSysMessage("%s%s%u|r", "|cff00ff00", "Wp Event: New waypoint event added: ", id);
handler->PSendSysMessage("{}{}{}|r", "|cff00ff00", "Wp Event: New waypoint event added: ", id);
}
else
handler->PSendSysMessage("|cff00ff00Wp Event: You have choosed an existing waypoint script guid: %u|r", id);
handler->PSendSysMessage("|cff00ff00Wp Event: You have choosed an existing waypoint script guid: {}|r", id);
}
else
{
@@ -328,7 +328,7 @@ public:
WorldDatabase.Execute(stmt);
handler->PSendSysMessage("%s%s%u|r", "|cff00ff00", "Wp Event: New waypoint event added: |r|cff00ffff", id + 1);
handler->PSendSysMessage("{}{}{}|r", "|cff00ff00", "Wp Event: New waypoint event added: |r|cff00ffff", id + 1);
}
return true;
@@ -338,7 +338,7 @@ public:
{
if (!arg_id)
{
handler->PSendSysMessage("%s%s|r", "|cff33ffff", "Wp Event: You must provide waypoint script id.");
handler->PSendSysMessage("{}{}|r", "|cff33ffff", "Wp Event: You must provide waypoint script id.");
return true;
}
@@ -354,7 +354,7 @@ public:
if (!result)
{
handler->PSendSysMessage("%s%s%u|r", "|cff33ffff", "Wp Event: No waypoint scripts found on id: ", id);
handler->PSendSysMessage("{}{}{}|r", "|cff33ffff", "Wp Event: No waypoint scripts found on id: ", id);
return true;
}
@@ -374,7 +374,7 @@ public:
a10 = fields[8].Get<float>();
a11 = fields[9].Get<float>();
handler->PSendSysMessage("|cffff33ffid:|r|cff00ffff %u|r|cff00ff00, guid: |r|cff00ffff%u|r|cff00ff00, delay: |r|cff00ffff%u|r|cff00ff00, command: |r|cff00ffff%u|r|cff00ff00, datalong: |r|cff00ffff%u|r|cff00ff00, datalong2: |r|cff00ffff%u|r|cff00ff00, datatext: |r|cff00ffff%s|r|cff00ff00, posx: |r|cff00ffff%f|r|cff00ff00, posy: |r|cff00ffff%f|r|cff00ff00, posz: |r|cff00ffff%f|r|cff00ff00, orientation: |r|cff00ffff%f|r", id, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
handler->PSendSysMessage("|cffff33ffid:|r|cff00ffff {}|r|cff00ff00, guid: |r|cff00ffff{}|r|cff00ff00, delay: |r|cff00ffff{}|r|cff00ff00, command: |r|cff00ffff{}|r|cff00ff00, datalong: |r|cff00ffff{}|r|cff00ff00, datalong2: |r|cff00ffff{}|r|cff00ff00, datatext: |r|cff00ffff{}|r|cff00ff00, posx: |r|cff00ffff{}|r|cff00ff00, posy: |r|cff00ffff{}|r|cff00ff00, posz: |r|cff00ffff{}|r|cff00ff00, orientation: |r|cff00ffff{}|r", id, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
} while (result->NextRow());
}
@@ -402,10 +402,10 @@ public:
WorldDatabase.Execute(stmt);
handler->PSendSysMessage("%s%s%u|r", "|cff00ff00", "Wp Event: Waypoint script removed: ", id);
handler->PSendSysMessage("{}{}{}|r", "|cff00ff00", "Wp Event: Waypoint script removed: ", id);
}
else
handler->PSendSysMessage("|cffff33ffWp Event: ERROR: you have selected a non existing script: %u|r", id);
handler->PSendSysMessage("|cffff33ffWp Event: ERROR: you have selected a non existing script: {}|r", id);
return true;
}
@@ -457,7 +457,7 @@ public:
if (arg_str_2 == "setid")
{
uint32 newid = atoi(arg_3);
handler->PSendSysMessage("%s%s|r|cff00ffff%u|r|cff00ff00%s|r|cff00ffff%u|r", "|cff00ff00", "Wp Event: Wypoint scipt guid: ", newid, " id changed: ", id);
handler->PSendSysMessage("{}{}|r|cff00ffff{}|r|cff00ff00{}|r|cff00ffff{}|r", "|cff00ff00", "Wp Event: Wypoint scipt guid: ", newid, " id changed: ", id);
WorldDatabasePreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_WAYPOINT_SCRIPT_ID);
@@ -489,7 +489,7 @@ public:
WorldDatabase.Execute(stmt);
handler->PSendSysMessage("|cff00ff00Waypoint script:|r|cff00ffff %u|r|cff00ff00 position_x updated.|r", id);
handler->PSendSysMessage("|cff00ff00Waypoint script:|r|cff00ffff {}|r|cff00ff00 position_x updated.|r", id);
return true;
}
else if (arg_str_2 == "posy")
@@ -501,7 +501,7 @@ public:
WorldDatabase.Execute(stmt);
handler->PSendSysMessage("|cff00ff00Waypoint script: %u position_y updated.|r", id);
handler->PSendSysMessage("|cff00ff00Waypoint script: {} position_y updated.|r", id);
return true;
}
else if (arg_str_2 == "posz")
@@ -513,7 +513,7 @@ public:
WorldDatabase.Execute(stmt);
handler->PSendSysMessage("|cff00ff00Waypoint script: |r|cff00ffff%u|r|cff00ff00 position_z updated.|r", id);
handler->PSendSysMessage("|cff00ff00Waypoint script: |r|cff00ffff{}|r|cff00ff00 position_z updated.|r", id);
return true;
}
else if (arg_str_2 == "orientation")
@@ -525,14 +525,14 @@ public:
WorldDatabase.Execute(stmt);
handler->PSendSysMessage("|cff00ff00Waypoint script: |r|cff00ffff%u|r|cff00ff00 orientation updated.|r", id);
handler->PSendSysMessage("|cff00ff00Waypoint script: |r|cff00ffff{}|r|cff00ff00 orientation updated.|r", id);
return true;
}
else if (arg_str_2 == "dataint")
{
WorldDatabase.Execute("UPDATE waypoint_scripts SET {}='{}' WHERE guid='{}'", arg_2, atoi(arg_3), id); // Query can't be a prepared statement
handler->PSendSysMessage("|cff00ff00Waypoint script: |r|cff00ffff%u|r|cff00ff00 dataint updated.|r", id);
handler->PSendSysMessage("|cff00ff00Waypoint script: |r|cff00ffff{}|r|cff00ff00 dataint updated.|r", id);
return true;
}
else
@@ -542,7 +542,7 @@ public:
WorldDatabase.Execute("UPDATE waypoint_scripts SET {}='{}' WHERE guid='{}'", arg_2, arg_str_3, id); // Query can't be a prepared statement
}
}
handler->PSendSysMessage("%s%s|r|cff00ffff%u:|r|cff00ff00 %s %s|r", "|cff00ff00", "Waypoint script:", id, arg_2, "updated.");
handler->PSendSysMessage("{}{}|r|cff00ffff{}:|r|cff00ff00 {} {}|r", "|cff00ff00", "Waypoint script:", id, arg_2, "updated.");
}
return true;
}
@@ -642,7 +642,7 @@ public:
if (show == "del")
{
handler->PSendSysMessage("|cff00ff00DEBUG: wp modify del, PathID: |r|cff00ffff%u|r", pathid);
handler->PSendSysMessage("|cff00ff00DEBUG: wp modify del, PathID: |r|cff00ffff{}|r", pathid);
if (wpSpawnId != 0)
if (Creature* wpCreature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(target->GetGUID()))
@@ -670,7 +670,7 @@ public:
if (show == "move")
{
handler->PSendSysMessage("|cff00ff00DEBUG: wp move, PathID: |r|cff00ffff%u|r", pathid);
handler->PSendSysMessage("|cff00ff00DEBUG: wp move, PathID: |r|cff00ffff{}|r", pathid);
Player* chr = handler->GetSession()->GetPlayer();
Map* map = chr->GetMap();
@@ -787,7 +787,7 @@ public:
std::string show = show_str;
//handler->PSendSysMessage("wpshow - show: %s", show);
//handler->PSendSysMessage("wpshow - show: {}", show);
// Show info for the selected waypoint
if (show == "info")
@@ -822,11 +822,11 @@ public:
uint32 ev_id = fields[4].Get<uint32>();
uint32 ev_chance = fields[5].Get<uint32>();
handler->PSendSysMessage("|cff00ff00Show info: for current point: |r|cff00ffff%u|r|cff00ff00, Path ID: |r|cff00ffff%u|r", point, pathid);
handler->PSendSysMessage("|cff00ff00Show info: delay: |r|cff00ffff%u|r", delay);
handler->PSendSysMessage("|cff00ff00Show info: Move flag: |r|cff00ffff%u|r", flag);
handler->PSendSysMessage("|cff00ff00Show info: Waypoint event: |r|cff00ffff%u|r", ev_id);
handler->PSendSysMessage("|cff00ff00Show info: Event chance: |r|cff00ffff%u|r", ev_chance);
handler->PSendSysMessage("|cff00ff00Show info: for current point: |r|cff00ffff{}|r|cff00ff00, Path ID: |r|cff00ffff{}|r", point, pathid);
handler->PSendSysMessage("|cff00ff00Show info: delay: |r|cff00ffff{}|r", delay);
handler->PSendSysMessage("|cff00ff00Show info: Move flag: |r|cff00ffff{}|r", flag);
handler->PSendSysMessage("|cff00ff00Show info: Waypoint event: |r|cff00ffff{}|r", ev_id);
handler->PSendSysMessage("|cff00ff00Show info: Event chance: |r|cff00ffff{}|r", ev_chance);
} while (result->NextRow());
return true;
@@ -846,7 +846,7 @@ public:
return false;
}
handler->PSendSysMessage("|cff00ff00DEBUG: wp on, PathID: |cff00ffff%u|r", pathid);
handler->PSendSysMessage("|cff00ff00DEBUG: wp on, PathID: |cff00ffff{}|r", pathid);
// Delete all visuals for this NPC
stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_WAYPOINT_DATA_WPGUID_BY_ID);
@@ -943,7 +943,7 @@ public:
if (show == "first")
{
handler->PSendSysMessage("|cff00ff00DEBUG: wp first, GUID: %u|r", pathid);
handler->PSendSysMessage("|cff00ff00DEBUG: wp first, GUID: {}|r", pathid);
WorldDatabasePreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_WAYPOINT_DATA_POS_FIRST_BY_ID);
stmt->SetData(0, pathid);
@@ -992,7 +992,7 @@ public:
if (show == "last")
{
handler->PSendSysMessage("|cff00ff00DEBUG: wp last, PathID: |r|cff00ffff%u|r", pathid);
handler->PSendSysMessage("|cff00ff00DEBUG: wp last, PathID: |r|cff00ffff{}|r", pathid);
WorldDatabasePreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_WAYPOINT_DATA_POS_LAST_BY_ID);
stmt->SetData(0, pathid);
@@ -19,7 +19,6 @@
#include "GameObject.h"
#include "GameObjectAI.h"
#include "GameObjectScript.h"
#include "InstanceMapScript.h"
#include "InstanceScript.h"
#include "ScriptedCreature.h"
#include "SpellScript.h"
@@ -19,7 +19,6 @@
#include "GameObject.h"
#include "GameObjectAI.h"
#include "GameObjectScript.h"
#include "InstanceMapScript.h"
#include "InstanceScript.h"
#include "Map.h"
#include "Player.h"
@@ -16,7 +16,6 @@
*/
#include "CreatureScript.h"
#include "PassiveAI.h"
#include "ScriptedCreature.h"
#include "SpellInfo.h"
#include "karazhan.h"
@@ -23,7 +23,6 @@
#include "ScriptedEscortAI.h"
#include "ScriptedGossip.h"
#include "SpellAuraEffects.h"
#include "SpellAuras.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"
/* ScriptData
@@ -16,10 +16,12 @@
*/
#include "CreatureScript.h"
#include "Opcodes.h"
#include "ScriptedCreature.h"
#include "SpellScriptLoader.h"
#include "magisters_terrace.h"
#include "MapReference.h"
#include "Player.h"
#include "SpellScript.h"
enum Says
{
@@ -18,10 +18,7 @@
#ifndef DEF_MAGISTERS_TERRACE_H
#define DEF_MAGISTERS_TERRACE_H
#include "CreatureAI.h"
#include "CreatureAIImpl.h"
#include "Player.h"
#include "SpellScript.h"
#define DataHeader "MT"
#define MTScriptName "instance_magisters_terrace"
@@ -20,6 +20,8 @@
#include "SpellScriptLoader.h"
#include "TemporarySummon.h"
#include "shadowfang_keep.h"
#include "SpellAuraEffects.h"
#include "SpellScript.h"
enum Spells
{
@@ -19,8 +19,6 @@
#define DEF_SHADOWFANG_H
#include "CreatureAIImpl.h"
#include "SpellAuraEffects.h"
#include "SpellScript.h"
#define DataHeader "SK"
#define ShadowfangKeepScriptName "instance_shadowfang_keep"
@@ -18,8 +18,6 @@
#ifndef DEF_STRATHOLME_H
#define DEF_STRATHOLME_H
#include "SpellAuras.h"
#define DataHeader "STR"
#define StratholmeScriptName "instance_stratholme"
@@ -17,7 +17,11 @@
#include "AreaTriggerScript.h"
#include "CreatureScript.h"
#include "MapReference.h"
#include "PassiveAI.h"
#include "Player.h"
#include "ScriptedCreature.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"
#include "WorldSession.h"
#include "sunwell_plateau.h"
@@ -17,8 +17,10 @@
#include "AreaTriggerScript.h"
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
#include "SpellInfo.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"
#include "sunwell_plateau.h"
@@ -19,7 +19,9 @@
#include "CellImpl.h"
#include "CreatureScript.h"
#include "GridNotifiers.h"
#include "PassiveAI.h"
#include "ScriptedCreature.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"
#include "sunwell_plateau.h"
@@ -18,6 +18,8 @@
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
#include "SpellAuraEffects.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"
#include "WorldSession.h"
#include "sunwell_plateau.h"
@@ -18,7 +18,10 @@
#include "CreatureScript.h"
#include "CreatureTextMgr.h"
#include "MoveSplineInit.h"
#include "PassiveAI.h"
#include "ScriptedCreature.h"
#include "SpellAuraEffects.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"
#include "sunwell_plateau.h"
@@ -16,9 +16,11 @@
*/
#include "CreatureScript.h"
#include "PassiveAI.h"
#include "Player.h"
#include "ScriptedCreature.h"
#include "SpellInfo.h"
#include "SpellAuraEffects.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"
#include "sunwell_plateau.h"
@@ -18,6 +18,7 @@
#include "InstanceMapScript.h"
#include "InstanceScript.h"
#include "Player.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"
#include "sunwell_plateau.h"
@@ -19,10 +19,6 @@
#define SUNWELL_PLATEAU_H
#include "CreatureAIImpl.h"
#include "PassiveAI.h"
#include "Player.h"
#include "SpellAuraEffects.h"
#include "SpellScript.h"
#define DataHeader "SWP"
@@ -25,7 +25,6 @@ SQLUpdate:
EndScriptData */
#include "Cell.h"
#include "CellImpl.h"
#include "CreatureScript.h"
#include "GridNotifiers.h"
#include "GridNotifiersImpl.h"
@@ -17,7 +17,6 @@
#include "CreatureScript.h"
#include "ScriptedCreature.h"
#include "Spell.h"
#include "zulgurub.h"
/*
@@ -34,7 +34,6 @@ EndContentData */
#include "Player.h"
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
#include "ScriptedGossip.h"
/*######
## npc_lord_gregor_lescovar
@@ -35,7 +35,6 @@ EndContentData */
#include "ScriptedEscortAI.h"
#include "ScriptedGossip.h"
#include "SpellAuraEffects.h"
#include "SpellAuras.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"