mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
Merge remote-tracking branch 'origin/master' into mmaps
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
-- Unlocking zuluhed chains
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id`=38790;
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(38790, 'spell_unlocking_zuluheds_chains');
|
||||
@@ -9,6 +9,7 @@
|
||||
# EXAMPLE CONFIG
|
||||
# AUTH SERVER SETTINGS
|
||||
# MYSQL SETTINGS
|
||||
# LOGGING SYSTEM SETTINGS
|
||||
#
|
||||
###################################################################################################
|
||||
|
||||
@@ -148,7 +149,7 @@ LoginDatabase.WorkerThreads = 1
|
||||
|
||||
###################################################################################################
|
||||
#
|
||||
# Logging system options.
|
||||
# LOGGING SYSTEM SETTINGS
|
||||
#
|
||||
# Appender config values: Given a appender "name"
|
||||
# Appender.name
|
||||
@@ -247,3 +248,6 @@ Logger.Root=0,3,Console Auth
|
||||
# Default: "root"
|
||||
|
||||
Loggers=Root
|
||||
|
||||
#
|
||||
###################################################################################################
|
||||
@@ -541,6 +541,10 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam
|
||||
if (IsAIEnabled)
|
||||
GetAI()->DamageDealt(victim, damage, damagetype);
|
||||
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
if (victim->ToPlayer()->GetCommandStatus(CHEAT_GOD))
|
||||
return 0;
|
||||
|
||||
// Signal to pets that their owner was attacked
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
|
||||
@@ -723,11 +723,7 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
std::string dump;
|
||||
if (PlayerDumpWriter().GetDump(GUID_LOPART(guid), dump))
|
||||
{
|
||||
std::ostringstream ss;
|
||||
ss << GetAccountId() << '_' << name.c_str();
|
||||
sLog->outCharDump(ss.str().c_str(), dump.c_str(), GetAccountId(), GUID_LOPART(guid), name.c_str());
|
||||
}
|
||||
sLog->outCharDump(dump.c_str(), GetAccountId(), GUID_LOPART(guid), name.c_str());
|
||||
}
|
||||
|
||||
Player::DeleteFromDB(guid, GetAccountId());
|
||||
|
||||
@@ -277,6 +277,10 @@ void Spell::EffectInstaKill(SpellEffIndex /*effIndex*/)
|
||||
if (!unitTarget || !unitTarget->isAlive())
|
||||
return;
|
||||
|
||||
if (unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
if (unitTarget->ToPlayer()->GetCommandStatus(CHEAT_GOD))
|
||||
return;
|
||||
|
||||
if (m_caster == unitTarget) // prevent interrupt message
|
||||
finish();
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ EndContentData */
|
||||
#include "ScriptedGossip.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "Group.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
/*#####
|
||||
# mob_mature_netherwing_drake
|
||||
@@ -1868,9 +1869,41 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
/*#####
|
||||
#
|
||||
######*/
|
||||
enum ZuluhedChains
|
||||
{
|
||||
QUEST_ZULUHED = 10866,
|
||||
NPC_KARYNAKU = 22112,
|
||||
};
|
||||
|
||||
class spell_unlocking_zuluheds_chains : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_unlocking_zuluheds_chains() : SpellScriptLoader("spell_unlocking_zuluheds_chains") { }
|
||||
|
||||
class spell_unlocking_zuluheds_chains_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_unlocking_zuluheds_chains_SpellScript);
|
||||
|
||||
void HandleOnCast()
|
||||
{
|
||||
// FIXME: Hackish solution, a better way to reward killcredit should be found
|
||||
if (Unit* caster = GetCaster())
|
||||
if(Player* player = caster->ToPlayer())
|
||||
if (player->GetQuestStatus(QUEST_ZULUHED) == QUEST_STATUS_INCOMPLETE)
|
||||
player->CastedCreatureOrGO(NPC_KARYNAKU, MAKE_NEW_GUID(0, NPC_KARYNAKU, HIGHGUID_UNIT), 0);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnCast += SpellCastFn(spell_unlocking_zuluheds_chains_SpellScript::HandleOnCast);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_unlocking_zuluheds_chains_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_shadowmoon_valley()
|
||||
{
|
||||
@@ -1889,4 +1922,5 @@ void AddSC_shadowmoon_valley()
|
||||
new mob_illidari_spawn();
|
||||
new mob_torloth_the_magnificent();
|
||||
new npc_enraged_spirit();
|
||||
new spell_unlocking_zuluheds_chains();
|
||||
}
|
||||
|
||||
@@ -435,19 +435,20 @@ void Log::outFatal(LogFilterType filter, const char * str, ...)
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
void Log::outCharDump(const char* param, const char * str, ...)
|
||||
void Log::outCharDump(char const* str, uint32 accountId, uint32 guid, char const* name)
|
||||
{
|
||||
if (!str || !ShouldLog(LOG_FILTER_PLAYER_DUMP, LOG_LEVEL_INFO))
|
||||
return;
|
||||
|
||||
va_list ap;
|
||||
va_start(ap, str);
|
||||
char text[MAX_QUERY_LEN];
|
||||
vsnprintf(text, MAX_QUERY_LEN, str, ap);
|
||||
va_end(ap);
|
||||
std::ostringstream ss;
|
||||
ss << "== START DUMP == (account: " << accountId << " guid: " << guid << " name: " << name
|
||||
<< ")\n" << str << "\n== END DUMP ==\n";
|
||||
|
||||
LogMessage* msg = new LogMessage(LOG_LEVEL_INFO, LOG_FILTER_PLAYER_DUMP, text);
|
||||
msg->param1 = param;
|
||||
LogMessage* msg = new LogMessage(LOG_LEVEL_INFO, LOG_FILTER_PLAYER_DUMP, ss.str());
|
||||
ss.clear();
|
||||
ss << guid << '_' << name;
|
||||
|
||||
msg->param1 = ss.str();
|
||||
|
||||
write(msg);
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ class Log
|
||||
|
||||
void EnableDBAppenders();
|
||||
void outCommand(uint32 account, const char * str, ...) ATTR_PRINTF(3, 4);
|
||||
void outCharDump(const char* param, const char* str, ...) ATTR_PRINTF(3, 4);
|
||||
void outCharDump(char const* str, uint32 account_id, uint32 guid, char const* name);
|
||||
static std::string GetTimestampStr();
|
||||
|
||||
void SetRealmID(uint32 id);
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
# CONSOLE AND REMOTE ACCESS
|
||||
# CHARACTER DELETE OPTIONS
|
||||
# CUSTOM SERVER OPTIONS
|
||||
# LOGGING SYSTEM SETTINGS
|
||||
#
|
||||
###################################################################################################
|
||||
|
||||
@@ -2660,7 +2661,7 @@ PlayerDump.DisallowOverwrite = 1
|
||||
|
||||
###################################################################################################
|
||||
#
|
||||
# Logging system options.
|
||||
# LOGGING SYSTEM SETTINGS
|
||||
#
|
||||
# Appender config values: Given a appender "name"
|
||||
# Appender.name
|
||||
@@ -2803,7 +2804,7 @@ Appenders=Console Server GM DBErrors Char RA Warden Chat
|
||||
#
|
||||
|
||||
Logger.Root=0,5,Console Server
|
||||
Logger.Chat=22,3,Chat
|
||||
Logger.Chat=22,2,Chat
|
||||
Logger.DBErrors=26,5,Console Server DBErrors
|
||||
Logger.GM=27,3,Console Server GM
|
||||
Logger.RA=28,3,RA
|
||||
@@ -2825,3 +2826,5 @@ Logger.Opcodes=41,6,Console Server
|
||||
|
||||
Loggers=Root Chat DBErrors GM RA Warden Character Load WorldServer Opcodes
|
||||
|
||||
#
|
||||
###################################################################################################
|
||||
|
||||
Reference in New Issue
Block a user