aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/World
diff options
context:
space:
mode:
authorVincent_Michael <Vincent_Michael@gmx.de>2013-12-20 17:39:13 +0100
committerVincent_Michael <Vincent_Michael@gmx.de>2013-12-20 17:39:13 +0100
commit8658b5338c905c79daf50cb56dbe739f82d25acc (patch)
treeebb2c18b6d9618ac9fef1d2c5f8b335f34d3702c /src/server/scripts/World
parent59fd1a164fc38ddd282707b3221dcd64af284166 (diff)
parent9ac96fd702d8ed23491d13eda2238312120cf52f (diff)
Merge branch 'master' of github.com:TrinityCore/TrinityCore into mmaps_rw
Conflicts: src/server/collision/Management/MMapManager.cpp src/server/game/Maps/Map.cpp src/server/game/Movement/PathGenerator.cpp
Diffstat (limited to 'src/server/scripts/World')
-rw-r--r--src/server/scripts/World/areatrigger_scripts.cpp6
-rw-r--r--src/server/scripts/World/chat_log.cpp42
-rw-r--r--src/server/scripts/World/go_scripts.cpp2
-rw-r--r--src/server/scripts/World/npc_professions.cpp2
-rw-r--r--src/server/scripts/World/npcs_special.cpp12
5 files changed, 34 insertions, 30 deletions
diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp
index 3ab9a1511af..2f8d5fa2ce4 100644
--- a/src/server/scripts/World/areatrigger_scripts.cpp
+++ b/src/server/scripts/World/areatrigger_scripts.cpp
@@ -210,7 +210,11 @@ class AreaTrigger_at_last_rites : public AreaTriggerScript
pPosition = WorldLocation(571, 3802.38f, 3585.95f, 49.5765f, 0.0f);
break;
case 5340:
- pPosition = WorldLocation(571, 3687.91f, 3577.28f, 473.342f, 0.0f);
+ if (player->GetQuestStatus(QUEST_LAST_RITES) == QUEST_STATUS_INCOMPLETE ||
+ player->GetQuestStatus(QUEST_LAST_RITES) == QUEST_STATUS_COMPLETE)
+ pPosition = WorldLocation(571, 3687.91f, 3577.28f, 473.342f);
+ else
+ pPosition = WorldLocation(571, 3739.38f, 3567.09f, 341.58f);
break;
default:
return false;
diff --git a/src/server/scripts/World/chat_log.cpp b/src/server/scripts/World/chat_log.cpp
index 16550dc69ea..11fbeeca852 100644
--- a/src/server/scripts/World/chat_log.cpp
+++ b/src/server/scripts/World/chat_log.cpp
@@ -31,25 +31,25 @@ public:
{
case CHAT_MSG_ADDON:
if (sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[ADDON] Player %s sends: %s",
+ TC_LOG_DEBUG("chat.log", "[ADDON] Player %s sends: %s",
player->GetName().c_str(), msg.c_str());
break;
case CHAT_MSG_SAY:
if (sWorld->getBoolConfig(CONFIG_CHATLOG_PUBLIC))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[SAY] Player %s says (language %u): %s",
+ TC_LOG_DEBUG("chat.log", "[SAY] Player %s says (language %u): %s",
player->GetName().c_str(), lang, msg.c_str());
break;
case CHAT_MSG_EMOTE:
if (sWorld->getBoolConfig(CONFIG_CHATLOG_PUBLIC))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[TEXTEMOTE] Player %s emotes: %s",
+ TC_LOG_DEBUG("chat.log", "[TEXTEMOTE] Player %s emotes: %s",
player->GetName().c_str(), msg.c_str());
break;
case CHAT_MSG_YELL:
if (sWorld->getBoolConfig(CONFIG_CHATLOG_PUBLIC))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[YELL] Player %s yells (language %u): %s",
+ TC_LOG_DEBUG("chat.log", "[YELL] Player %s yells (language %u): %s",
player->GetName().c_str(), lang, msg.c_str());
break;
}
@@ -58,10 +58,10 @@ public:
void OnChat(Player* player, uint32 /*type*/, uint32 lang, std::string& msg, Player* receiver)
{
if (lang != LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_WHISPER))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[WHISPER] Player %s tells %s: %s",
+ TC_LOG_DEBUG("chat.log", "[WHISPER] Player %s tells %s: %s",
player->GetName().c_str(), receiver ? receiver->GetName().c_str() : "<unknown>", msg.c_str());
else if (lang == LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[ADDON] Player %s tells %s: %s",
+ TC_LOG_DEBUG("chat.log", "[ADDON] Player %s tells %s: %s",
player->GetName().c_str(), receiver ? receiver->GetName().c_str() : "<unknown>", msg.c_str());
}
@@ -73,52 +73,52 @@ public:
{
case CHAT_MSG_PARTY:
if (lang != LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_PARTY))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[PARTY] Player %s tells group with leader %s: %s",
+ TC_LOG_DEBUG("chat.log", "[PARTY] Player %s tells group with leader %s: %s",
player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
else if (lang == LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[ADDON] Player %s tells group with leader %s: %s",
+ TC_LOG_DEBUG("chat.log", "[ADDON] Player %s tells group with leader %s: %s",
player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
break;
case CHAT_MSG_PARTY_LEADER:
if (sWorld->getBoolConfig(CONFIG_CHATLOG_PARTY))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[PARTY] Leader %s tells group: %s",
+ TC_LOG_DEBUG("chat.log", "[PARTY] Leader %s tells group: %s",
player->GetName().c_str(), msg.c_str());
break;
case CHAT_MSG_RAID:
if (lang != LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_RAID))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[RAID] Player %s tells raid with leader %s: %s",
+ TC_LOG_DEBUG("chat.log", "[RAID] Player %s tells raid with leader %s: %s",
player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
else if (lang == LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[ADDON] Player %s tells raid with leader %s: %s",
+ TC_LOG_DEBUG("chat.log", "[ADDON] Player %s tells raid with leader %s: %s",
player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
break;
case CHAT_MSG_RAID_LEADER:
if (sWorld->getBoolConfig(CONFIG_CHATLOG_RAID))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[RAID] Leader player %s tells raid: %s",
+ TC_LOG_DEBUG("chat.log", "[RAID] Leader player %s tells raid: %s",
player->GetName().c_str(), msg.c_str());
break;
case CHAT_MSG_RAID_WARNING:
if (sWorld->getBoolConfig(CONFIG_CHATLOG_RAID))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[RAID] Leader player %s warns raid with: %s",
+ TC_LOG_DEBUG("chat.log", "[RAID] Leader player %s warns raid with: %s",
player->GetName().c_str(), msg.c_str());
break;
case CHAT_MSG_BATTLEGROUND:
if (lang != LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_BGROUND))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[BATTLEGROUND] Player %s tells battleground with leader %s: %s",
+ TC_LOG_DEBUG("chat.log", "[BATTLEGROUND] Player %s tells battleground with leader %s: %s",
player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
else if (lang == LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[ADDON] Player %s tells battleground with leader %s: %s",
+ TC_LOG_DEBUG("chat.log", "[ADDON] Player %s tells battleground with leader %s: %s",
player->GetName().c_str(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
break;
case CHAT_MSG_BATTLEGROUND_LEADER:
if (sWorld->getBoolConfig(CONFIG_CHATLOG_BGROUND))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[BATTLEGROUND] Leader player %s tells battleground: %s",
+ TC_LOG_DEBUG("chat.log", "[BATTLEGROUND] Leader player %s tells battleground: %s",
player->GetName().c_str(), msg.c_str());
break;
}
@@ -130,16 +130,16 @@ public:
{
case CHAT_MSG_GUILD:
if (lang != LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_GUILD))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[GUILD] Player %s tells guild %s: %s",
+ TC_LOG_DEBUG("chat.log", "[GUILD] Player %s tells guild %s: %s",
player->GetName().c_str(), guild ? guild->GetName().c_str() : "<unknown>", msg.c_str());
else if (lang == LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[ADDON] Player %s sends to guild %s: %s",
+ TC_LOG_DEBUG("chat.log", "[ADDON] Player %s sends to guild %s: %s",
player->GetName().c_str(), guild ? guild->GetName().c_str() : "<unknown>", msg.c_str());
break;
case CHAT_MSG_OFFICER:
if (sWorld->getBoolConfig(CONFIG_CHATLOG_GUILD))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[OFFICER] Player %s tells guild %s officers: %s",
+ TC_LOG_DEBUG("chat.log", "[OFFICER] Player %s tells guild %s officers: %s",
player->GetName().c_str(), guild ? guild->GetName().c_str() : "<unknown>", msg.c_str());
break;
}
@@ -154,10 +154,10 @@ public:
channel->HasFlag(CHANNEL_FLAG_LFG));
if (sWorld->getBoolConfig(CONFIG_CHATLOG_SYSCHAN) && isSystem)
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[SYSCHAN] Player %s tells channel %s: %s",
+ TC_LOG_DEBUG("chat.log", "[SYSCHAN] Player %s tells channel %s: %s",
player->GetName().c_str(), channel->GetName().c_str(), msg.c_str());
else if (sWorld->getBoolConfig(CONFIG_CHATLOG_CHANNEL))
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_CHATLOG, "[CHANNEL] Player %s tells channel %s: %s",
+ TC_LOG_DEBUG("chat.log", "[CHANNEL] Player %s tells channel %s: %s",
player->GetName().c_str(), channel ? channel->GetName().c_str() : "<unknown>", msg.c_str());
}
};
diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp
index 84ef56eb413..3a0c5b0dfd2 100644
--- a/src/server/scripts/World/go_scripts.cpp
+++ b/src/server/scripts/World/go_scripts.cpp
@@ -268,7 +268,7 @@ public:
if (Spell)
creature->CastSpell(player, Spell, false);
else
- TC_LOG_ERROR(LOG_FILTER_TSCR, "go_ethereum_prison summoned Creature (entry %u) but faction (%u) are not expected by script.", creature->GetEntry(), creature->getFaction());
+ TC_LOG_ERROR("scripts", "go_ethereum_prison summoned Creature (entry %u) but faction (%u) are not expected by script.", creature->GetEntry(), creature->getFaction());
}
}
}
diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp
index fb36dbefa1f..8d0f917eb2f 100644
--- a/src/server/scripts/World/npc_professions.cpp
+++ b/src/server/scripts/World/npc_professions.cpp
@@ -247,7 +247,7 @@ bool EquippedOk(Player* player, uint32 spellId)
if (item && item->GetTemplate()->RequiredSpell == reqSpell)
{
//player has item equipped that require specialty. Not allow to unlearn, player has to unequip first
- TC_LOG_DEBUG(LOG_FILTER_TSCR, "player attempt to unlearn spell %u, but item %u is equipped.", reqSpell, item->GetEntry());
+ TC_LOG_DEBUG("scripts", "player attempt to unlearn spell %u, but item %u is equipped.", reqSpell, item->GetEntry());
return false;
}
}
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index f2bc4debff5..d7d18d5d36a 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -140,14 +140,14 @@ public:
}
if (!SpawnAssoc)
- TC_LOG_ERROR(LOG_FILTER_SQL, "TCSR: Creature template entry %u has ScriptName npc_air_force_bots, but it's not handled by that script", creature->GetEntry());
+ TC_LOG_ERROR("sql.sql", "TCSR: Creature template entry %u has ScriptName npc_air_force_bots, but it's not handled by that script", creature->GetEntry());
else
{
CreatureTemplate const* spawnedTemplate = sObjectMgr->GetCreatureTemplate(SpawnAssoc->spawnedCreatureEntry);
if (!spawnedTemplate)
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "TCSR: Creature template entry %u does not exist in DB, which is required by npc_air_force_bots", SpawnAssoc->spawnedCreatureEntry);
+ TC_LOG_ERROR("sql.sql", "TCSR: Creature template entry %u does not exist in DB, which is required by npc_air_force_bots", SpawnAssoc->spawnedCreatureEntry);
SpawnAssoc = NULL;
return;
}
@@ -167,7 +167,7 @@ public:
SpawnedGUID = summoned->GetGUID();
else
{
- TC_LOG_ERROR(LOG_FILTER_SQL, "TCSR: npc_air_force_bots: wasn't able to spawn Creature %u", SpawnAssoc->spawnedCreatureEntry);
+ TC_LOG_ERROR("sql.sql", "TCSR: npc_air_force_bots: wasn't able to spawn Creature %u", SpawnAssoc->spawnedCreatureEntry);
SpawnAssoc = NULL;
}
@@ -461,7 +461,7 @@ public:
}
}
- void EnterCombat(Unit* /*who*/)OVERRIDE { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void ReceiveEmote(Player* player, uint32 emote) OVERRIDE
{
@@ -759,7 +759,7 @@ public:
}
}
- void EnterCombat(Unit* /*who*/)OVERRIDE { }
+ void EnterCombat(Unit* /*who*/) OVERRIDE { }
void SpellHit(Unit* caster, SpellInfo const* spell) OVERRIDE
{
@@ -854,7 +854,7 @@ void npc_doctor::npc_doctorAI::UpdateAI(uint32 diff)
patientEntry = HordeSoldierId[rand() % 3];
break;
default:
- TC_LOG_ERROR(LOG_FILTER_TSCR, "Invalid entry for Triage doctor. Please check your database");
+ TC_LOG_ERROR("scripts", "Invalid entry for Triage doctor. Please check your database");
return;
}