Merge branch 'master' into 4.3.4
Conflicts: src/server/game/Server/WorldSession.cpp src/server/game/Server/WorldSocket.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h
This commit is contained in:
@@ -0,0 +1 @@
|
||||
DELETE FROM `creature_addon` WHERE guid=49286;
|
||||
@@ -0,0 +1,3 @@
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id`=24314;
|
||||
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
(24314, 'spell_threatening_gaze');
|
||||
@@ -134,8 +134,6 @@ extern int main(int argc, char **argv)
|
||||
if (!StartDB())
|
||||
return 1;
|
||||
|
||||
sLog->SetRealmID(0); // ensure we've set realm to 0 (authserver realmid)
|
||||
|
||||
// Get the list of realms for the server
|
||||
sRealmList->Initialize(ConfigMgr::GetIntDefault("RealmsStateUpdateDelay", 20));
|
||||
if (sRealmList->size() == 0)
|
||||
@@ -272,7 +270,7 @@ bool StartDB()
|
||||
}
|
||||
|
||||
sLog->outInfo(LOG_FILTER_AUTHSERVER, "Started auth database connection pool.");
|
||||
sLog->EnableDBAppenders();
|
||||
sLog->SetRealmId(0); // Enables DB appenders when realm is set.
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -2121,18 +2121,20 @@ SmartScriptHolder SmartScript::CreateEvent(SMART_EVENT e, uint32 event_flags, ui
|
||||
|
||||
ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*= NULL*/)
|
||||
{
|
||||
Unit* trigger = NULL;
|
||||
Unit* scriptTrigger = NULL;
|
||||
if (invoker)
|
||||
trigger = invoker;
|
||||
scriptTrigger = invoker;
|
||||
else if (Unit* tempLastInvoker = GetLastInvoker())
|
||||
trigger = tempLastInvoker;
|
||||
scriptTrigger = tempLastInvoker;
|
||||
|
||||
WorldObject* baseObject = GetBaseObject();
|
||||
|
||||
ObjectList* l = new ObjectList();
|
||||
switch (e.GetTargetType())
|
||||
{
|
||||
case SMART_TARGET_SELF:
|
||||
if (GetBaseObject())
|
||||
l->push_back(GetBaseObject());
|
||||
if (baseObject)
|
||||
l->push_back(baseObject);
|
||||
break;
|
||||
case SMART_TARGET_VICTIM:
|
||||
if (me && me->getVictim())
|
||||
@@ -2160,17 +2162,17 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
|
||||
break;
|
||||
case SMART_TARGET_NONE:
|
||||
case SMART_TARGET_ACTION_INVOKER:
|
||||
if (trigger)
|
||||
l->push_back(trigger);
|
||||
if (scriptTrigger)
|
||||
l->push_back(scriptTrigger);
|
||||
break;
|
||||
case SMART_TARGET_ACTION_INVOKER_VEHICLE:
|
||||
if (trigger && trigger->GetVehicle() && trigger->GetVehicle()->GetBase())
|
||||
l->push_back(trigger->GetVehicle()->GetBase());
|
||||
if (scriptTrigger && scriptTrigger->GetVehicle() && scriptTrigger->GetVehicle()->GetBase())
|
||||
l->push_back(scriptTrigger->GetVehicle()->GetBase());
|
||||
break;
|
||||
case SMART_TARGET_INVOKER_PARTY:
|
||||
if (trigger)
|
||||
if (scriptTrigger)
|
||||
{
|
||||
if (Player* player = trigger->ToPlayer())
|
||||
if (Player* player = scriptTrigger->ToPlayer())
|
||||
{
|
||||
if (Group* group = player->GetGroup())
|
||||
{
|
||||
@@ -2182,7 +2184,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
|
||||
// this even if there is a group (thus the else-check), it will add the
|
||||
// same player to the list twice. We don't want that to happen.
|
||||
else
|
||||
l->push_back(trigger);
|
||||
l->push_back(scriptTrigger);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -2198,7 +2200,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
|
||||
if (me && me == *itr)
|
||||
continue;
|
||||
|
||||
if (((e.target.unitRange.creature && (*itr)->ToCreature()->GetEntry() == e.target.unitRange.creature) || !e.target.unitRange.creature) && GetBaseObject()->IsInRange(*itr, (float)e.target.unitRange.minDist, (float)e.target.unitRange.maxDist))
|
||||
if (((e.target.unitRange.creature && (*itr)->ToCreature()->GetEntry() == e.target.unitRange.creature) || !e.target.unitRange.creature) && baseObject->IsInRange(*itr, (float)e.target.unitRange.minDist, (float)e.target.unitRange.maxDist))
|
||||
l->push_back(*itr);
|
||||
}
|
||||
|
||||
@@ -2255,7 +2257,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
|
||||
if (go && go == *itr)
|
||||
continue;
|
||||
|
||||
if (((e.target.goRange.entry && IsGameObject(*itr) && (*itr)->ToGameObject()->GetEntry() == e.target.goRange.entry) || !e.target.goRange.entry) && GetBaseObject()->IsInRange((*itr), (float)e.target.goRange.minDist, (float)e.target.goRange.maxDist))
|
||||
if (((e.target.goRange.entry && IsGameObject(*itr) && (*itr)->ToGameObject()->GetEntry() == e.target.goRange.entry) || !e.target.goRange.entry) && baseObject->IsInRange((*itr), (float)e.target.goRange.minDist, (float)e.target.goRange.maxDist))
|
||||
l->push_back(*itr);
|
||||
}
|
||||
|
||||
@@ -2265,13 +2267,13 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
|
||||
case SMART_TARGET_CREATURE_GUID:
|
||||
{
|
||||
Creature* target = NULL;
|
||||
if (!trigger && !GetBaseObject())
|
||||
if (!scriptTrigger && !baseObject)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_SQL, "SMART_TARGET_CREATURE_GUID can not be used without invoker");
|
||||
break;
|
||||
}
|
||||
|
||||
target = FindCreatureNear(trigger ? trigger : GetBaseObject(), e.target.unitGUID.dbGuid);
|
||||
target = FindCreatureNear(scriptTrigger ? scriptTrigger : baseObject, e.target.unitGUID.dbGuid);
|
||||
|
||||
if (target && (!e.target.unitGUID.entry || target->GetEntry() == e.target.unitGUID.entry))
|
||||
l->push_back(target);
|
||||
@@ -2280,13 +2282,13 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
|
||||
case SMART_TARGET_GAMEOBJECT_GUID:
|
||||
{
|
||||
GameObject* target = NULL;
|
||||
if (!trigger && !GetBaseObject())
|
||||
if (!scriptTrigger && !baseObject)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_SQL, "SMART_TARGET_GAMEOBJECT_GUID can not be used without invoker");
|
||||
break;
|
||||
}
|
||||
|
||||
target = FindGameObjectNear(trigger ? trigger : GetBaseObject(), e.target.goGUID.dbGuid);
|
||||
target = FindGameObjectNear(scriptTrigger ? scriptTrigger : baseObject, e.target.goGUID.dbGuid);
|
||||
|
||||
if (target && (!e.target.goGUID.entry || target->GetEntry() == e.target.goGUID.entry))
|
||||
l->push_back(target);
|
||||
@@ -2296,9 +2298,9 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
|
||||
{
|
||||
// will always return a valid pointer, even if empty list
|
||||
ObjectList* units = GetWorldObjectsInDist((float)e.target.playerRange.maxDist);
|
||||
if (!units->empty() && GetBaseObject())
|
||||
if (!units->empty() && baseObject)
|
||||
for (ObjectList::const_iterator itr = units->begin(); itr != units->end(); ++itr)
|
||||
if (IsPlayer(*itr) && GetBaseObject()->IsInRange(*itr, (float)e.target.playerRange.minDist, (float)e.target.playerRange.maxDist))
|
||||
if (IsPlayer(*itr) && baseObject->IsInRange(*itr, (float)e.target.playerRange.minDist, (float)e.target.playerRange.maxDist))
|
||||
l->push_back(*itr);
|
||||
|
||||
delete units;
|
||||
@@ -2325,14 +2327,14 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
|
||||
}
|
||||
case SMART_TARGET_CLOSEST_CREATURE:
|
||||
{
|
||||
Creature* target = GetClosestCreatureWithEntry(GetBaseObject(), e.target.closest.entry, (float)(e.target.closest.dist ? e.target.closest.dist : 100), e.target.closest.dead ? false : true);
|
||||
Creature* target = GetClosestCreatureWithEntry(baseObject, e.target.closest.entry, (float)(e.target.closest.dist ? e.target.closest.dist : 100), e.target.closest.dead ? false : true);
|
||||
if (target)
|
||||
l->push_back(target);
|
||||
break;
|
||||
}
|
||||
case SMART_TARGET_CLOSEST_GAMEOBJECT:
|
||||
{
|
||||
GameObject* target = GetClosestGameObjectWithEntry(GetBaseObject(), e.target.closest.entry, (float)(e.target.closest.dist ? e.target.closest.dist : 100));
|
||||
GameObject* target = GetClosestGameObjectWithEntry(baseObject, e.target.closest.entry, (float)(e.target.closest.dist ? e.target.closest.dist : 100));
|
||||
if (target)
|
||||
l->push_back(target);
|
||||
break;
|
||||
|
||||
@@ -2156,7 +2156,7 @@ bool Creature::LoadCreaturesAddon(bool reload)
|
||||
if (HasAura(*itr))
|
||||
{
|
||||
if (!reload)
|
||||
sLog->outError(LOG_FILTER_SQL, "Creature (GUID: %u Entry: %u) has duplicate aura (spell %u) in `auras` field.", GetGUIDLow(), GetEntry(), *itr);
|
||||
sLog->outError(LOG_FILTER_SQL, "Creature (GUID: %u Entry: %u) has duplicate aura (spell %u) in `auras` field.", GetDBTableGUIDLow(), GetEntry(), *itr);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -13522,7 +13522,8 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
|
||||
Unit* actionTarget = !isVictim ? target : this;
|
||||
|
||||
DamageInfo damageInfo = DamageInfo(actor, actionTarget, damage, procSpell, procSpell ? SpellSchoolMask(procSpell->SchoolMask) : SPELL_SCHOOL_MASK_NORMAL, SPELL_DIRECT_DAMAGE);
|
||||
ProcEventInfo eventInfo = ProcEventInfo(actor, actionTarget, target, procFlag, 0, 0, procExtra, NULL, &damageInfo, NULL /*HealInfo*/);
|
||||
HealInfo healInfo = HealInfo(actor, actionTarget, damage, procSpell, procSpell ? SpellSchoolMask(procSpell->SchoolMask) : SPELL_SCHOOL_MASK_NORMAL);
|
||||
ProcEventInfo eventInfo = ProcEventInfo(actor, actionTarget, target, procFlag, 0, 0, procExtra, NULL, &damageInfo, &healInfo);
|
||||
|
||||
ProcTriggeredList procTriggered;
|
||||
// Fill procTriggered list
|
||||
@@ -13553,6 +13554,10 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
|
||||
if (!sConditionMgr->IsObjectMeetToConditions(condInfo, conditions))
|
||||
continue;
|
||||
|
||||
// AuraScript Hook
|
||||
if (!triggerData.aura->CallScriptCheckProcHandlers(itr->second, eventInfo))
|
||||
continue;
|
||||
|
||||
// Triggered spells not triggering additional spells
|
||||
bool triggered = !(spellProto->AttributesEx3 & SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED) ?
|
||||
(procExtra & PROC_EX_INTERNAL_TRIGGERED && !(procFlag & PROC_FLAG_DONE_TRAP_ACTIVATION)) : false;
|
||||
@@ -13601,15 +13606,21 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
|
||||
SpellInfo const* spellInfo = i->aura->GetSpellInfo();
|
||||
uint32 Id = i->aura->GetId();
|
||||
|
||||
AuraApplication const* aurApp = i->aura->GetApplicationOfTarget(GetGUID());
|
||||
|
||||
bool prepare = i->aura->CallScriptPrepareProcHandlers(aurApp, eventInfo);
|
||||
|
||||
// For players set spell cooldown if need
|
||||
uint32 cooldown = 0;
|
||||
if (GetTypeId() == TYPEID_PLAYER && i->spellProcEvent && i->spellProcEvent->cooldown)
|
||||
if (prepare && GetTypeId() == TYPEID_PLAYER && i->spellProcEvent && i->spellProcEvent->cooldown)
|
||||
cooldown = i->spellProcEvent->cooldown;
|
||||
|
||||
// Note: must SetCantProc(false) before return
|
||||
if (spellInfo->AttributesEx3 & SPELL_ATTR3_DISABLE_PROC)
|
||||
SetCantProc(true);
|
||||
|
||||
i->aura->CallScriptProcHandlers(aurApp, eventInfo);
|
||||
|
||||
// This bool is needed till separate aura effect procs are still here
|
||||
bool handled = false;
|
||||
if (HandleAuraProc(target, damage, i->aura, procSpell, procFlag, procExtra, cooldown, &handled))
|
||||
@@ -13628,6 +13639,13 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
|
||||
AuraEffect* triggeredByAura = i->aura->GetEffect(effIndex);
|
||||
ASSERT(triggeredByAura);
|
||||
|
||||
bool prevented = i->aura->CallScriptEffectProcHandlers(triggeredByAura, aurApp, eventInfo);
|
||||
if (prevented)
|
||||
{
|
||||
takeCharges = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (triggeredByAura->GetAuraType())
|
||||
{
|
||||
case SPELL_AURA_PROC_TRIGGER_SPELL:
|
||||
@@ -13804,13 +13822,16 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
|
||||
takeCharges = true;
|
||||
break;
|
||||
} // switch (triggeredByAura->GetAuraType())
|
||||
i->aura->CallScriptAfterEffectProcHandlers(triggeredByAura, aurApp, eventInfo);
|
||||
} // for (uint8 effIndex = 0; effIndex < MAX_SPELL_EFFECTS; ++effIndex)
|
||||
} // if (!handled)
|
||||
|
||||
// Remove charge (aura can be removed by triggers)
|
||||
if (useCharges && takeCharges)
|
||||
if (prepare && useCharges && takeCharges)
|
||||
i->aura->DropCharge();
|
||||
|
||||
i->aura->CallScriptAfterProcHandlers(aurApp, eventInfo);
|
||||
|
||||
if (spellInfo->AttributesEx3 & SPELL_ATTR3_DISABLE_PROC)
|
||||
SetCantProc(false);
|
||||
}
|
||||
@@ -13831,7 +13852,7 @@ void Unit::GetProcAurasTriggeredOnEvent(std::list<AuraApplication*>& aurasTrigge
|
||||
if (!(*itr)->GetRemoveMode())
|
||||
if ((*itr)->GetBase()->IsProcTriggeredOnEvent(*itr, eventInfo))
|
||||
{
|
||||
(*itr)->GetBase()->PrepareProcToTrigger();
|
||||
(*itr)->GetBase()->PrepareProcToTrigger(*itr, eventInfo);
|
||||
aurasTriggeringProc.push_back(*itr);
|
||||
}
|
||||
}
|
||||
@@ -13843,7 +13864,7 @@ void Unit::GetProcAurasTriggeredOnEvent(std::list<AuraApplication*>& aurasTrigge
|
||||
{
|
||||
if (itr->second->GetBase()->IsProcTriggeredOnEvent(itr->second, eventInfo))
|
||||
{
|
||||
itr->second->GetBase()->PrepareProcToTrigger();
|
||||
itr->second->GetBase()->PrepareProcToTrigger(itr->second, eventInfo);
|
||||
aurasTriggeringProc.push_back(itr->second);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -789,7 +789,7 @@ void WorldSession::SetAccountData(AccountDataType type, time_t tm, std::string c
|
||||
|
||||
void WorldSession::SendAccountDataTimes(uint32 mask)
|
||||
{
|
||||
WorldPacket data(SMSG_ACCOUNT_DATA_TIMES, 4+1+4+NUM_ACCOUNT_DATA_TYPES*4);
|
||||
WorldPacket data(SMSG_ACCOUNT_DATA_TIMES, 4 + 1 + 4 + NUM_ACCOUNT_DATA_TYPES * 4);
|
||||
data << uint32(time(NULL)); // Server time
|
||||
data << uint8(1);
|
||||
data << uint32(mask); // type mask
|
||||
|
||||
@@ -188,9 +188,6 @@ class CharacterCreateInfo
|
||||
|
||||
/// Server side data
|
||||
uint8 CharCount;
|
||||
|
||||
private:
|
||||
virtual ~CharacterCreateInfo(){};
|
||||
};
|
||||
|
||||
/// Player session in the World
|
||||
|
||||
@@ -784,7 +784,8 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
||||
{
|
||||
uint8 digest[20];
|
||||
uint32 clientSeed;
|
||||
uint16 clientBuild, security;
|
||||
uint8 security;
|
||||
uint16 clientBuild;
|
||||
uint32 id;
|
||||
uint32 addonSize;
|
||||
LocaleConstant locale;
|
||||
@@ -833,12 +834,7 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
||||
|
||||
if (sWorld->IsClosed())
|
||||
{
|
||||
WorldPacket packet(SMSG_AUTH_RESPONSE, 1);
|
||||
packet.WriteBit(0); // has queue info
|
||||
packet.WriteBit(0); // has account info
|
||||
packet << uint8(AUTH_REJECT);
|
||||
SendPacket(packet);
|
||||
|
||||
SendAuthResponseError(AUTH_REJECT);
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "WorldSocket::HandleAuthSession: World closed, denying client (%s).", GetRemoteAddress().c_str());
|
||||
return -1;
|
||||
}
|
||||
@@ -853,13 +849,7 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
||||
// Stop if the account is not found
|
||||
if (!result)
|
||||
{
|
||||
WorldPacket packet(SMSG_AUTH_RESPONSE, 1);
|
||||
packet.WriteBit(0); // has queue info
|
||||
packet.WriteBit(0); // has account info
|
||||
packet << uint8(AUTH_UNKNOWN_ACCOUNT);
|
||||
|
||||
SendPacket(packet);
|
||||
|
||||
SendAuthResponseError(AUTH_UNKNOWN_ACCOUNT);
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "WorldSocket::HandleAuthSession: Sent Auth Response (unknown account).");
|
||||
return -1;
|
||||
}
|
||||
@@ -880,22 +870,13 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
||||
{
|
||||
if (strcmp (fields[2].GetCString(), GetRemoteAddress().c_str()))
|
||||
{
|
||||
WorldPacket packet(SMSG_AUTH_RESPONSE, 1);
|
||||
packet.WriteBit(0); // has queue info
|
||||
packet.WriteBit(0); // has account info
|
||||
packet << uint8(AUTH_FAILED);
|
||||
SendPacket(packet);
|
||||
|
||||
SendAuthResponseError(AUTH_FAILED);
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WorldSocket::HandleAuthSession: Sent Auth Response (Account IP differs).");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
id = fields[0].GetUInt32();
|
||||
/*
|
||||
if (security > SEC_ADMINISTRATOR) // prevent invalid security settings in DB
|
||||
security = SEC_ADMINISTRATOR;
|
||||
*/
|
||||
|
||||
k.SetHexStr(fields[1].GetCString());
|
||||
|
||||
@@ -923,10 +904,7 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
||||
// Must be done before WorldSession is created
|
||||
if (sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED) && os != "Win" && os != "OSX")
|
||||
{
|
||||
WorldPacket packet(SMSG_AUTH_RESPONSE, 1);
|
||||
packet << uint8(AUTH_REJECT);
|
||||
SendPacket(packet);
|
||||
|
||||
SendAuthResponseError(AUTH_REJECT);
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "WorldSocket::HandleAuthSession: Client %s attempted to log in using invalid client OS (%s).", GetRemoteAddress().c_str(), os.c_str());
|
||||
return -1;
|
||||
}
|
||||
@@ -957,12 +935,7 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
||||
|
||||
if (banresult) // if account banned
|
||||
{
|
||||
WorldPacket packet(SMSG_AUTH_RESPONSE, 1);
|
||||
packet.WriteBit(0); // has queue info
|
||||
packet.WriteBit(0); // has account info
|
||||
packet << uint8(AUTH_BANNED);
|
||||
SendPacket(packet);
|
||||
|
||||
SendAuthResponseError(AUTH_BANNED);
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "WorldSocket::HandleAuthSession: Sent Auth Response (Account banned).");
|
||||
return -1;
|
||||
}
|
||||
@@ -972,13 +945,7 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Allowed Level: %u Player Level %u", allowedAccountType, AccountTypes(security));
|
||||
if (allowedAccountType > SEC_PLAYER && AccountTypes(security) < allowedAccountType)
|
||||
{
|
||||
WorldPacket packet(SMSG_AUTH_RESPONSE, 1);
|
||||
packet.WriteBit(0); // has queue info
|
||||
packet.WriteBit(0); // has account info
|
||||
packet << uint8(AUTH_UNAVAILABLE);
|
||||
|
||||
SendPacket(packet);
|
||||
|
||||
SendAuthResponseError(AUTH_UNAVAILABLE);
|
||||
sLog->outInfo(LOG_FILTER_NETWORKIO, "WorldSocket::HandleAuthSession: User tries to login but his security level is not enough");
|
||||
return -1;
|
||||
}
|
||||
@@ -998,12 +965,7 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
||||
|
||||
if (memcmp(sha.GetDigest(), digest, 20))
|
||||
{
|
||||
WorldPacket packet(SMSG_AUTH_RESPONSE, 1);
|
||||
packet.WriteBit(0); // has queue info
|
||||
packet.WriteBit(0); // has account info
|
||||
packet << uint8(AUTH_FAILED);
|
||||
SendPacket(packet);
|
||||
|
||||
SendAuthResponseError(AUTH_FAILED);
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "WorldSocket::HandleAuthSession: Authentication failed for account: %u ('%s') address: %s", id, account.c_str(), address.c_str());
|
||||
return -1;
|
||||
}
|
||||
@@ -1114,3 +1076,12 @@ int WorldSocket::HandlePing (WorldPacket& recvPacket)
|
||||
packet << ping;
|
||||
return SendPacket(packet);
|
||||
}
|
||||
|
||||
void WorldSocket::SendAuthResponseError(uint8 code)
|
||||
{
|
||||
WorldPacket packet(SMSG_AUTH_RESPONSE, 1);
|
||||
packet.WriteBit(0); // has queue info
|
||||
packet.WriteBit(0); // has account info
|
||||
packet << uint8(code);
|
||||
SendPacket(packet);
|
||||
}
|
||||
|
||||
@@ -97,13 +97,13 @@ class WorldSocket : public WorldHandler
|
||||
typedef ACE_Guard<LockType> GuardType;
|
||||
|
||||
/// Check if socket is closed.
|
||||
bool IsClosed (void) const;
|
||||
bool IsClosed(void) const;
|
||||
|
||||
/// Close the socket.
|
||||
void CloseSocket (void);
|
||||
void CloseSocket(void);
|
||||
|
||||
/// Get address of connected peer.
|
||||
const std::string& GetRemoteAddress (void) const;
|
||||
const std::string& GetRemoteAddress(void) const;
|
||||
|
||||
/// Send A packet on the socket, this function is reentrant.
|
||||
/// @param pct packet to send
|
||||
@@ -111,60 +111,61 @@ class WorldSocket : public WorldHandler
|
||||
int SendPacket(const WorldPacket& pct);
|
||||
|
||||
/// Add reference to this object.
|
||||
long AddReference (void);
|
||||
long AddReference(void);
|
||||
|
||||
/// Remove reference to this object.
|
||||
long RemoveReference (void);
|
||||
long RemoveReference(void);
|
||||
|
||||
/// things called by ACE framework.
|
||||
|
||||
/// Called on open, the void* is the acceptor.
|
||||
virtual int open (void *);
|
||||
virtual int open(void *);
|
||||
|
||||
/// Called on failures inside of the acceptor, don't call from your code.
|
||||
virtual int close (u_long);
|
||||
virtual int close(u_long);
|
||||
|
||||
/// Called when we can read from the socket.
|
||||
virtual int handle_input (ACE_HANDLE = ACE_INVALID_HANDLE);
|
||||
virtual int handle_input(ACE_HANDLE = ACE_INVALID_HANDLE);
|
||||
|
||||
/// Called when the socket can write.
|
||||
virtual int handle_output (ACE_HANDLE = ACE_INVALID_HANDLE);
|
||||
virtual int handle_output(ACE_HANDLE = ACE_INVALID_HANDLE);
|
||||
|
||||
/// Called when connection is closed or error happens.
|
||||
virtual int handle_close (ACE_HANDLE = ACE_INVALID_HANDLE,
|
||||
virtual int handle_close(ACE_HANDLE = ACE_INVALID_HANDLE,
|
||||
ACE_Reactor_Mask = ACE_Event_Handler::ALL_EVENTS_MASK);
|
||||
|
||||
/// Called by WorldSocketMgr/ReactorRunnable.
|
||||
int Update (void);
|
||||
int Update(void);
|
||||
|
||||
private:
|
||||
/// Helper functions for processing incoming data.
|
||||
int handle_input_header (void);
|
||||
int handle_input_payload (void);
|
||||
int handle_input_missing_data (void);
|
||||
int handle_input_header(void);
|
||||
int handle_input_payload(void);
|
||||
int handle_input_missing_data(void);
|
||||
|
||||
/// Help functions to mark/unmark the socket for output.
|
||||
/// @param g the guard is for m_OutBufferLock, the function will release it
|
||||
int cancel_wakeup_output (GuardType& g);
|
||||
int schedule_wakeup_output (GuardType& g);
|
||||
int cancel_wakeup_output(GuardType& g);
|
||||
int schedule_wakeup_output(GuardType& g);
|
||||
|
||||
/// Drain the queue if its not empty.
|
||||
int handle_output_queue (GuardType& g);
|
||||
int handle_output_queue(GuardType& g);
|
||||
|
||||
/// process one incoming packet.
|
||||
/// @param new_pct received packet, note that you need to delete it.
|
||||
int ProcessIncoming (WorldPacket* new_pct);
|
||||
int ProcessIncoming(WorldPacket* new_pct);
|
||||
|
||||
/// Called by ProcessIncoming() on CMSG_AUTH_SESSION.
|
||||
int HandleAuthSession (WorldPacket& recvPacket);
|
||||
int HandleAuthSession(WorldPacket& recvPacket);
|
||||
|
||||
/// Called by ProcessIncoming() on CMSG_PING.
|
||||
int HandlePing (WorldPacket& recvPacket);
|
||||
int HandlePing(WorldPacket& recvPacket);
|
||||
|
||||
/// Called by CMSG_VERIFY_CONNECTIVITY_RESPONSE
|
||||
int HandleSendAuthSession();
|
||||
|
||||
private:
|
||||
void SendAuthResponseError(uint8);
|
||||
/// Time in which the last ping was received
|
||||
ACE_Time_Value m_LastPingTime;
|
||||
|
||||
|
||||
@@ -1260,7 +1260,10 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit* caster) const
|
||||
|
||||
void AuraEffect::HandleProc(AuraApplication* aurApp, ProcEventInfo& eventInfo)
|
||||
{
|
||||
// TODO: effect script handlers here
|
||||
bool prevented = GetBase()->CallScriptEffectProcHandlers(const_cast<AuraEffect const*>(this), const_cast<AuraApplication const*>(aurApp), eventInfo);
|
||||
if (prevented)
|
||||
return;
|
||||
|
||||
switch (GetAuraType())
|
||||
{
|
||||
case SPELL_AURA_PROC_TRIGGER_SPELL:
|
||||
@@ -1281,6 +1284,8 @@ void AuraEffect::HandleProc(AuraApplication* aurApp, ProcEventInfo& eventInfo)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
GetBase()->CallScriptAfterEffectProcHandlers(const_cast<AuraEffect const*>(this), const_cast<AuraApplication const*>(aurApp), eventInfo);
|
||||
}
|
||||
|
||||
void AuraEffect::CleanupTriggeredSpells(Unit* target)
|
||||
|
||||
@@ -1662,9 +1662,12 @@ void Aura::AddProcCooldown(uint32 /*msec*/)
|
||||
//m_procCooldown = time(NULL) + msec;
|
||||
}
|
||||
|
||||
void Aura::PrepareProcToTrigger()
|
||||
void Aura::PrepareProcToTrigger(AuraApplication* aurApp, ProcEventInfo& eventInfo)
|
||||
{
|
||||
// TODO: allow scripts to prevent charge drop/cooldown
|
||||
bool prepare = CallScriptPrepareProcHandlers(aurApp, eventInfo);
|
||||
if (!prepare)
|
||||
return;
|
||||
|
||||
// take one charge, aura expiration will be handled in Aura::TriggerProcOnEvent (if needed)
|
||||
if (IsUsingCharges())
|
||||
{
|
||||
@@ -1703,14 +1706,18 @@ bool Aura::IsProcTriggeredOnEvent(AuraApplication* aurApp, ProcEventInfo& eventI
|
||||
return false;
|
||||
|
||||
// do checks using conditions table
|
||||
ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_SPELL_PROC, GetSpellInfo()->Id);
|
||||
ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_SPELL_PROC, GetId());
|
||||
ConditionSourceInfo condInfo = ConditionSourceInfo(eventInfo.GetActor(), eventInfo.GetActionTarget());
|
||||
if (!sConditionMgr->IsObjectMeetToConditions(condInfo, conditions))
|
||||
return false;
|
||||
|
||||
// AuraScript Hook
|
||||
bool check = const_cast<Aura*>(this)->CallScriptCheckProcHandlers(aurApp, eventInfo);
|
||||
if (!check)
|
||||
return false;
|
||||
|
||||
// TODO:
|
||||
// - add DoCheckProc() AuraScript hook
|
||||
// to allow additional requirements for procs
|
||||
// do allow additional requirements for procs
|
||||
// this is needed because this is the last moment in which you can prevent aura charge drop on proc
|
||||
// and possibly a way to prevent default checks (if there're going to be any)
|
||||
|
||||
@@ -1774,14 +1781,14 @@ float Aura::CalcProcChance(SpellProcEntry const& procEntry, ProcEventInfo& event
|
||||
|
||||
void Aura::TriggerProcOnEvent(AuraApplication* aurApp, ProcEventInfo& eventInfo)
|
||||
{
|
||||
// TODO: OnProc hook here
|
||||
CallScriptProcHandlers(const_cast<AuraApplication const*>(aurApp), eventInfo);
|
||||
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
if (aurApp->HasEffect(i))
|
||||
// TODO: OnEffectProc hook here (allowing prevention of selected effects)
|
||||
// OnEffectProc / AfterEffectProc hooks handled in AuraEffect::HandleProc()
|
||||
GetEffect(i)->HandleProc(aurApp, eventInfo);
|
||||
// TODO: AfterEffectProc hook here
|
||||
|
||||
// TODO: AfterProc hook here
|
||||
CallScriptAfterProcHandlers(const_cast<AuraApplication const*>(aurApp), eventInfo);
|
||||
|
||||
// Remove aura if we've used last charge to proc
|
||||
if (IsUsingCharges() && !GetCharges())
|
||||
@@ -2077,6 +2084,95 @@ void Aura::CallScriptEffectSplitHandlers(AuraEffect* aurEff, AuraApplication con
|
||||
}
|
||||
}
|
||||
|
||||
bool Aura::CallScriptCheckProcHandlers(AuraApplication const* aurApp, ProcEventInfo& eventInfo)
|
||||
{
|
||||
for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end(); ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_CHECK_PROC, aurApp);
|
||||
std::list<AuraScript::CheckProcHandler>::iterator hookItrEnd = (*scritr)->DoCheckProc.end(), hookItr = (*scritr)->DoCheckProc.begin();
|
||||
for (; hookItr != hookItrEnd; ++hookItr)
|
||||
if (!(*hookItr).Call(*scritr, eventInfo))
|
||||
return false;
|
||||
(*scritr)->_FinishScriptCall();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Aura::CallScriptPrepareProcHandlers(AuraApplication const* aurApp, ProcEventInfo& eventInfo)
|
||||
{
|
||||
bool prepare = true;
|
||||
for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end(); ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_PREPARE_PROC, aurApp);
|
||||
std::list<AuraScript::AuraProcHandler>::iterator effEndItr = (*scritr)->DoPrepareProc.end(), effItr = (*scritr)->DoPrepareProc.begin();
|
||||
for (; effItr != effEndItr; ++effItr)
|
||||
(*effItr).Call(*scritr, eventInfo);
|
||||
|
||||
if (prepare && (*scritr)->_IsDefaultActionPrevented())
|
||||
prepare = false;
|
||||
(*scritr)->_FinishScriptCall();
|
||||
}
|
||||
return prepare;
|
||||
}
|
||||
|
||||
void Aura::CallScriptProcHandlers(AuraApplication const* aurApp, ProcEventInfo& eventInfo)
|
||||
{
|
||||
for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end(); ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_PROC, aurApp);
|
||||
std::list<AuraScript::AuraProcHandler>::iterator hookItrEnd = (*scritr)->OnProc.end(), hookItr = (*scritr)->OnProc.begin();
|
||||
for (; hookItr != hookItrEnd; ++hookItr)
|
||||
(*hookItr).Call(*scritr, eventInfo);
|
||||
(*scritr)->_FinishScriptCall();
|
||||
}
|
||||
}
|
||||
|
||||
void Aura::CallScriptAfterProcHandlers(AuraApplication const* aurApp, ProcEventInfo& eventInfo)
|
||||
{
|
||||
for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end(); ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_AFTER_PROC, aurApp);
|
||||
std::list<AuraScript::AuraProcHandler>::iterator hookItrEnd = (*scritr)->AfterProc.end(), hookItr = (*scritr)->AfterProc.begin();
|
||||
for (; hookItr != hookItrEnd; ++hookItr)
|
||||
(*hookItr).Call(*scritr, eventInfo);
|
||||
(*scritr)->_FinishScriptCall();
|
||||
}
|
||||
}
|
||||
|
||||
bool Aura::CallScriptEffectProcHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, ProcEventInfo& eventInfo)
|
||||
{
|
||||
bool preventDefault = false;
|
||||
for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end(); ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_PROC, aurApp);
|
||||
std::list<AuraScript::EffectProcHandler>::iterator effEndItr = (*scritr)->OnEffectProc.end(), effItr = (*scritr)->OnEffectProc.begin();
|
||||
for (; effItr != effEndItr; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellInfo, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, eventInfo);
|
||||
}
|
||||
if (!preventDefault)
|
||||
preventDefault = (*scritr)->_IsDefaultActionPrevented();
|
||||
(*scritr)->_FinishScriptCall();
|
||||
}
|
||||
return preventDefault;
|
||||
}
|
||||
|
||||
void Aura::CallScriptAfterEffectProcHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, ProcEventInfo& eventInfo)
|
||||
{
|
||||
for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end(); ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_AFTER_PROC, aurApp);
|
||||
std::list<AuraScript::EffectProcHandler>::iterator effEndItr = (*scritr)->AfterEffectProc.end(), effItr = (*scritr)->AfterEffectProc.begin();
|
||||
for (; effItr != effEndItr; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellInfo, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, eventInfo);
|
||||
}
|
||||
(*scritr)->_FinishScriptCall();
|
||||
}
|
||||
}
|
||||
|
||||
UnitAura::UnitAura(SpellInfo const* spellproto, uint8 effMask, WorldObject* owner, Unit* caster, int32 *baseAmount, Item* castItem, uint64 casterGUID)
|
||||
: Aura(spellproto, owner, caster, castItem, casterGUID)
|
||||
{
|
||||
|
||||
@@ -194,7 +194,7 @@ class Aura
|
||||
void AddProcCooldown(uint32 msec);
|
||||
bool IsUsingCharges() const { return m_isUsingCharges; }
|
||||
void SetUsingCharges(bool val) { m_isUsingCharges = val; }
|
||||
void PrepareProcToTrigger();
|
||||
void PrepareProcToTrigger(AuraApplication* aurApp, ProcEventInfo& eventInfo);
|
||||
bool IsProcTriggeredOnEvent(AuraApplication* aurApp, ProcEventInfo& eventInfo) const;
|
||||
float CalcProcChance(SpellProcEntry const& procEntry, ProcEventInfo& eventInfo) const;
|
||||
void TriggerProcOnEvent(AuraApplication* aurApp, ProcEventInfo& eventInfo);
|
||||
@@ -218,6 +218,13 @@ class Aura
|
||||
void CallScriptEffectManaShieldHandlers(AuraEffect* aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount, bool & defaultPrevented);
|
||||
void CallScriptEffectAfterManaShieldHandlers(AuraEffect* aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount);
|
||||
void CallScriptEffectSplitHandlers(AuraEffect* aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & splitAmount);
|
||||
// Spell Proc Hooks
|
||||
bool CallScriptCheckProcHandlers(AuraApplication const* aurApp, ProcEventInfo& eventInfo);
|
||||
bool CallScriptPrepareProcHandlers(AuraApplication const* aurApp, ProcEventInfo& eventInfo);
|
||||
void CallScriptProcHandlers(AuraApplication const* aurApp, ProcEventInfo& eventInfo);
|
||||
void CallScriptAfterProcHandlers(AuraApplication const* aurApp, ProcEventInfo& eventInfo);
|
||||
bool CallScriptEffectProcHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, ProcEventInfo& eventInfo);
|
||||
void CallScriptAfterEffectProcHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, ProcEventInfo& eventInfo);
|
||||
|
||||
std::list<AuraScript*> m_loadedScripts;
|
||||
private:
|
||||
|
||||
@@ -3624,6 +3624,8 @@ void SpellMgr::LoadSpellInfoCorrections()
|
||||
// Aura is refreshed at 3 seconds, and the tick should happen at the fourth.
|
||||
spellInfo->AttributesEx8 |= SPELL_ATTR8_DONT_RESET_PERIODIC_TIMER;
|
||||
break;
|
||||
case 24314: // Threatening Gaze
|
||||
spellInfo->AuraInterruptFlags |= AURA_INTERRUPT_FLAG_CAST | AURA_INTERRUPT_FLAG_MOVE | AURA_INTERRUPT_FLAG_JUMP;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -470,7 +470,7 @@ WorldLocation* SpellScript::GetHitDest()
|
||||
{
|
||||
if (!IsInEffectHook())
|
||||
{
|
||||
sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u`: function SpellScript::GetHitDest was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return NULL;
|
||||
}
|
||||
return m_spell->destTarget;
|
||||
@@ -679,6 +679,30 @@ bool AuraScript::_Validate(SpellInfo const* entry)
|
||||
if (!(*itr).GetAffectedEffectsMask(entry))
|
||||
sLog->outError(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectSplit` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
for (std::list<CheckProcHandler>::iterator itr = DoCheckProc.begin(); itr != DoCheckProc.end(); ++itr)
|
||||
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
|
||||
sLog->outError(LOG_FILTER_TSCR, "Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `DoCheckProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
|
||||
|
||||
for (std::list<AuraProcHandler>::iterator itr = DoPrepareProc.begin(); itr != DoPrepareProc.end(); ++itr)
|
||||
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
|
||||
sLog->outError(LOG_FILTER_TSCR, "Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `DoPrepareProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
|
||||
|
||||
for (std::list<AuraProcHandler>::iterator itr = OnProc.begin(); itr != OnProc.end(); ++itr)
|
||||
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
|
||||
sLog->outError(LOG_FILTER_TSCR, "Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `OnProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
|
||||
|
||||
for (std::list<AuraProcHandler>::iterator itr = AfterProc.begin(); itr != AfterProc.end(); ++itr)
|
||||
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
|
||||
sLog->outError(LOG_FILTER_TSCR, "Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `AfterProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
|
||||
|
||||
for (std::list<EffectProcHandler>::iterator itr = OnEffectProc.begin(); itr != OnEffectProc.end(); ++itr)
|
||||
if (!(*itr).GetAffectedEffectsMask(entry))
|
||||
sLog->outError(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectProc` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
for (std::list<EffectProcHandler>::iterator itr = AfterEffectProc.begin(); itr != AfterEffectProc.end(); ++itr)
|
||||
if (!(*itr).GetAffectedEffectsMask(entry))
|
||||
sLog->outError(LOG_FILTER_TSCR, "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectProc` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
return _SpellScript::_Validate(entry);
|
||||
}
|
||||
|
||||
@@ -818,6 +842,37 @@ void AuraScript::EffectSplitHandler::Call(AuraScript* auraScript, AuraEffect* au
|
||||
(auraScript->*pEffectHandlerScript)(aurEff, dmgInfo, splitAmount);
|
||||
}
|
||||
|
||||
AuraScript::CheckProcHandler::CheckProcHandler(AuraCheckProcFnType handlerScript)
|
||||
{
|
||||
_HandlerScript = handlerScript;
|
||||
}
|
||||
|
||||
bool AuraScript::CheckProcHandler::Call(AuraScript* auraScript, ProcEventInfo& eventInfo)
|
||||
{
|
||||
return (auraScript->*_HandlerScript)(eventInfo);
|
||||
}
|
||||
|
||||
AuraScript::AuraProcHandler::AuraProcHandler(AuraProcFnType handlerScript)
|
||||
{
|
||||
_HandlerScript = handlerScript;
|
||||
}
|
||||
|
||||
void AuraScript::AuraProcHandler::Call(AuraScript* auraScript, ProcEventInfo& eventInfo)
|
||||
{
|
||||
(auraScript->*_HandlerScript)(eventInfo);
|
||||
}
|
||||
|
||||
AuraScript::EffectProcHandler::EffectProcHandler(AuraEffectProcFnType effectHandlerScript, uint8 effIndex, uint16 effName)
|
||||
: AuraScript::EffectBase(effIndex, effName)
|
||||
{
|
||||
_EffectHandlerScript = effectHandlerScript;
|
||||
}
|
||||
|
||||
void AuraScript::EffectProcHandler::Call(AuraScript* auraScript, AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
(auraScript->*_EffectHandlerScript)(aurEff, eventInfo);
|
||||
}
|
||||
|
||||
bool AuraScript::_Load(Aura* aura)
|
||||
{
|
||||
m_aura = aura;
|
||||
@@ -853,6 +908,8 @@ bool AuraScript::_IsDefaultActionPrevented()
|
||||
case AURA_SCRIPT_HOOK_EFFECT_PERIODIC:
|
||||
case AURA_SCRIPT_HOOK_EFFECT_ABSORB:
|
||||
case AURA_SCRIPT_HOOK_EFFECT_SPLIT:
|
||||
case AURA_SCRIPT_HOOK_PREPARE_PROC:
|
||||
case AURA_SCRIPT_HOOK_EFFECT_PROC:
|
||||
return m_defaultActionPrevented;
|
||||
default:
|
||||
ASSERT(false && "AuraScript::_IsDefaultActionPrevented is called in a wrong place");
|
||||
@@ -869,6 +926,8 @@ void AuraScript::PreventDefaultAction()
|
||||
case AURA_SCRIPT_HOOK_EFFECT_PERIODIC:
|
||||
case AURA_SCRIPT_HOOK_EFFECT_ABSORB:
|
||||
case AURA_SCRIPT_HOOK_EFFECT_SPLIT:
|
||||
case AURA_SCRIPT_HOOK_PREPARE_PROC:
|
||||
case AURA_SCRIPT_HOOK_EFFECT_PROC:
|
||||
m_defaultActionPrevented = true;
|
||||
break;
|
||||
default:
|
||||
@@ -1051,6 +1110,12 @@ Unit* AuraScript::GetTarget() const
|
||||
case AURA_SCRIPT_HOOK_EFFECT_MANASHIELD:
|
||||
case AURA_SCRIPT_HOOK_EFFECT_AFTER_MANASHIELD:
|
||||
case AURA_SCRIPT_HOOK_EFFECT_SPLIT:
|
||||
case AURA_SCRIPT_HOOK_CHECK_PROC:
|
||||
case AURA_SCRIPT_HOOK_PREPARE_PROC:
|
||||
case AURA_SCRIPT_HOOK_PROC:
|
||||
case AURA_SCRIPT_HOOK_AFTER_PROC:
|
||||
case AURA_SCRIPT_HOOK_EFFECT_PROC:
|
||||
case AURA_SCRIPT_HOOK_EFFECT_AFTER_PROC:
|
||||
return m_auraApplication->GetTarget();
|
||||
default:
|
||||
sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u` AuraScript::GetTarget called in a hook in which the call won't have effect!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
|
||||
@@ -428,14 +428,22 @@ enum AuraScriptHookType
|
||||
AURA_SCRIPT_HOOK_EFFECT_SPLIT,
|
||||
AURA_SCRIPT_HOOK_CHECK_AREA_TARGET,
|
||||
AURA_SCRIPT_HOOK_DISPEL,
|
||||
AURA_SCRIPT_HOOK_AFTER_DISPEL
|
||||
AURA_SCRIPT_HOOK_AFTER_DISPEL,
|
||||
// Spell Proc Hooks
|
||||
AURA_SCRIPT_HOOK_CHECK_PROC,
|
||||
AURA_SCRIPT_HOOK_PREPARE_PROC,
|
||||
AURA_SCRIPT_HOOK_PROC,
|
||||
AURA_SCRIPT_HOOK_EFFECT_PROC,
|
||||
AURA_SCRIPT_HOOK_EFFECT_AFTER_PROC,
|
||||
AURA_SCRIPT_HOOK_AFTER_PROC,
|
||||
/*AURA_SCRIPT_HOOK_APPLY,
|
||||
AURA_SCRIPT_HOOK_REMOVE, */
|
||||
};
|
||||
/*
|
||||
#define HOOK_AURA_EFFECT_START HOOK_AURA_EFFECT_APPLY
|
||||
#define HOOK_AURA_EFFECT_END HOOK_AURA_EFFECT_CALC_SPELLMOD + 1
|
||||
#define HOOK_AURA_EFFECT_COUNT HOOK_AURA_EFFECT_END - HOOK_AURA_EFFECT_START
|
||||
|
||||
*/
|
||||
class AuraScript : public _SpellScript
|
||||
{
|
||||
// internal use classes & functions
|
||||
@@ -453,6 +461,9 @@ class AuraScript : public _SpellScript
|
||||
typedef void(CLASSNAME::*AuraEffectCalcSpellModFnType)(AuraEffect const*, SpellModifier* &); \
|
||||
typedef void(CLASSNAME::*AuraEffectAbsorbFnType)(AuraEffect*, DamageInfo &, uint32 &); \
|
||||
typedef void(CLASSNAME::*AuraEffectSplitFnType)(AuraEffect*, DamageInfo &, uint32 &); \
|
||||
typedef bool(CLASSNAME::*AuraCheckProcFnType)(ProcEventInfo&); \
|
||||
typedef void(CLASSNAME::*AuraProcFnType)(ProcEventInfo&); \
|
||||
typedef void(CLASSNAME::*AuraEffectProcFnType)(AuraEffect const*, ProcEventInfo&); \
|
||||
|
||||
AURASCRIPT_FUNCTION_TYPE_DEFINES(AuraScript)
|
||||
|
||||
@@ -552,6 +563,30 @@ class AuraScript : public _SpellScript
|
||||
private:
|
||||
AuraEffectSplitFnType pEffectHandlerScript;
|
||||
};
|
||||
class CheckProcHandler
|
||||
{
|
||||
public:
|
||||
CheckProcHandler(AuraCheckProcFnType handlerScript);
|
||||
bool Call(AuraScript* auraScript, ProcEventInfo& eventInfo);
|
||||
private:
|
||||
AuraCheckProcFnType _HandlerScript;
|
||||
};
|
||||
class AuraProcHandler
|
||||
{
|
||||
public:
|
||||
AuraProcHandler(AuraProcFnType handlerScript);
|
||||
void Call(AuraScript* auraScript, ProcEventInfo& eventInfo);
|
||||
private:
|
||||
AuraProcFnType _HandlerScript;
|
||||
};
|
||||
class EffectProcHandler : public EffectBase
|
||||
{
|
||||
public:
|
||||
EffectProcHandler(AuraEffectProcFnType effectHandlerScript, uint8 effIndex, uint16 effName);
|
||||
void Call(AuraScript* auraScript, AuraEffect const* aurEff, ProcEventInfo& eventInfo);
|
||||
private:
|
||||
AuraEffectProcFnType _EffectHandlerScript;
|
||||
};
|
||||
|
||||
#define AURASCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME) \
|
||||
class CheckAreaTargetFunction : public AuraScript::CheckAreaTargetHandler { public: CheckAreaTargetFunction(AuraCheckAreaTargetFnType _pHandlerScript) : AuraScript::CheckAreaTargetHandler((AuraScript::AuraCheckAreaTargetFnType)_pHandlerScript) {} }; \
|
||||
@@ -565,6 +600,9 @@ class AuraScript : public _SpellScript
|
||||
class EffectAbsorbFunction : public AuraScript::EffectAbsorbHandler { public: EffectAbsorbFunction(AuraEffectAbsorbFnType _pEffectHandlerScript, uint8 _effIndex) : AuraScript::EffectAbsorbHandler((AuraScript::AuraEffectAbsorbFnType)_pEffectHandlerScript, _effIndex) {} }; \
|
||||
class EffectManaShieldFunction : public AuraScript::EffectManaShieldHandler { public: EffectManaShieldFunction(AuraEffectAbsorbFnType _pEffectHandlerScript, uint8 _effIndex) : AuraScript::EffectManaShieldHandler((AuraScript::AuraEffectAbsorbFnType)_pEffectHandlerScript, _effIndex) {} }; \
|
||||
class EffectSplitFunction : public AuraScript::EffectSplitHandler { public: EffectSplitFunction(AuraEffectSplitFnType _pEffectHandlerScript, uint8 _effIndex) : AuraScript::EffectSplitHandler((AuraScript::AuraEffectSplitFnType)_pEffectHandlerScript, _effIndex) {} }; \
|
||||
class CheckProcHandlerFunction : public AuraScript::CheckProcHandler { public: CheckProcHandlerFunction(AuraCheckProcFnType handlerScript) : AuraScript::CheckProcHandler((AuraScript::AuraCheckProcFnType)handlerScript) {} }; \
|
||||
class AuraProcHandlerFunction : public AuraScript::AuraProcHandler { public: AuraProcHandlerFunction(AuraProcFnType handlerScript) : AuraScript::AuraProcHandler((AuraScript::AuraProcFnType)handlerScript) {} }; \
|
||||
class EffectProcHandlerFunction : public AuraScript::EffectProcHandler { public: EffectProcHandlerFunction(AuraEffectProcFnType effectHandlerScript, uint8 effIndex, uint16 effName) : AuraScript::EffectProcHandler((AuraScript::AuraEffectProcFnType)effectHandlerScript, effIndex, effName) {} }; \
|
||||
|
||||
#define PrepareAuraScript(CLASSNAME) AURASCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME) AURASCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME)
|
||||
|
||||
@@ -695,6 +733,36 @@ class AuraScript : public _SpellScript
|
||||
HookList<EffectSplitHandler> OnEffectSplit;
|
||||
#define AuraEffectSplitFn(F, I) EffectSplitFunction(&F, I)
|
||||
|
||||
// executed when aura checks if it can proc
|
||||
// example: DoCheckProc += AuraCheckProcFn(class::function);
|
||||
// where function is: bool function (ProcEventInfo& eventInfo);
|
||||
HookList<CheckProcHandler> DoCheckProc;
|
||||
#define AuraCheckProcFn(F) CheckProcHandlerFunction(&F)
|
||||
|
||||
// executed before aura procs (possibility to prevent charge drop/cooldown)
|
||||
// example: DoPrepareProc += AuraProcFn(class::function);
|
||||
// where function is: void function (ProcEventInfo& eventInfo);
|
||||
HookList<AuraProcHandler> DoPrepareProc;
|
||||
// executed when aura procs
|
||||
// example: OnProc += AuraProcFn(class::function);
|
||||
// where function is: void function (ProcEventInfo& eventInfo);
|
||||
HookList<AuraProcHandler> OnProc;
|
||||
// executed after aura proced
|
||||
// example: AfterProc += AuraProcFn(class::function);
|
||||
// where function is: void function (ProcEventInfo& eventInfo);
|
||||
HookList<AuraProcHandler> AfterProc;
|
||||
#define AuraProcFn(F) AuraProcHandlerFunction(&F)
|
||||
|
||||
// executed when aura effect procs
|
||||
// example: OnEffectProc += AuraEffectProcFn(class::function, EffectIndexSpecifier, EffectAuraNameSpecifier);
|
||||
// where function is: void function (AuraEffect const* aurEff, ProcEventInfo& procInfo);
|
||||
HookList<EffectProcHandler> OnEffectProc;
|
||||
// executed after aura effect proced
|
||||
// example: AfterEffectProc += AuraEffectProcFn(class::function, EffectIndexSpecifier, EffectAuraNameSpecifier);
|
||||
// where function is: void function (AuraEffect const* aurEff, ProcEventInfo& procInfo);
|
||||
HookList<EffectProcHandler> AfterEffectProc;
|
||||
#define AuraEffectProcFn(F, I, N) EffectProcHandlerFunction(&F, I, N)
|
||||
|
||||
// AuraScript interface - hook/effect execution manipulators
|
||||
|
||||
// prevents default action of a hook from being executed (works only while called in a hook which default action can be prevented)
|
||||
|
||||
@@ -1831,7 +1831,9 @@ void World::SetInitialWorldSettings()
|
||||
uint32 startupDuration = GetMSTimeDiffToNow(startupBegin);
|
||||
|
||||
sLog->outInfo(LOG_FILTER_WORLDSERVER, "World initialized in %u minutes %u seconds", (startupDuration / 60000), ((startupDuration % 60000) / 1000));
|
||||
sLog->EnableDBAppenders();
|
||||
|
||||
if (uint32 realmId = ConfigMgr::GetIntDefault("RealmID", 0)) // 0 reserved for auth
|
||||
sLog->SetRealmId(realmId);
|
||||
}
|
||||
|
||||
void World::DetectDBCLang()
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
uint32 const EncounterCount = 5;
|
||||
|
||||
#define ZGScriptName "instance_zulgurub"
|
||||
|
||||
enum DataTypes
|
||||
{
|
||||
DATA_VENOXIS = 0,
|
||||
|
||||
@@ -73,10 +73,7 @@ void Appender::setLogLevel(LogLevel _level)
|
||||
void Appender::write(LogMessage& message)
|
||||
{
|
||||
if (!level || level > message.level)
|
||||
{
|
||||
//fprintf(stderr, "Appender::write: Appender %s, Level %s. Msg %s Level %s Type %s WRONG LEVEL MASK\n", getName().c_str(), getLogLevelString(level), message.text.c_str(), getLogLevelString(message.level), getLogFilterTypeString(message.type)); // DEBUG - RemoveMe
|
||||
return;
|
||||
}
|
||||
|
||||
message.prefix.clear();
|
||||
if (flags & APPENDER_FLAGS_PREFIX_TIMESTAMP)
|
||||
@@ -222,5 +219,6 @@ char const* Appender::getLogFilterTypeString(LogFilterType type)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return "???";
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ class Appender
|
||||
static const char* getLogFilterTypeString(LogFilterType type);
|
||||
|
||||
private:
|
||||
virtual void _write(LogMessage& /*message*/) = 0;
|
||||
virtual void _write(LogMessage const& /*message*/) = 0;
|
||||
|
||||
uint8 id;
|
||||
std::string name;
|
||||
|
||||
@@ -154,7 +154,7 @@ void AppenderConsole::ResetColor(bool stdout_stream)
|
||||
#endif
|
||||
}
|
||||
|
||||
void AppenderConsole::_write(LogMessage& message)
|
||||
void AppenderConsole::_write(LogMessage const& message)
|
||||
{
|
||||
bool stdout_stream = message.level == LOG_LEVEL_ERROR || message.level == LOG_LEVEL_FATAL;
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ class AppenderConsole: public Appender
|
||||
private:
|
||||
void SetColor(bool stdout_stream, ColorTypes color);
|
||||
void ResetColor(bool stdout_stream);
|
||||
void _write(LogMessage& message);
|
||||
void _write(LogMessage const& message);
|
||||
bool _colored;
|
||||
ColorTypes _colors[MaxLogLevels];
|
||||
};
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
#include "AppenderDB.h"
|
||||
#include "Database/DatabaseEnv.h"
|
||||
|
||||
AppenderDB::AppenderDB(uint8 id, std::string const& name, LogLevel level, uint32 realmId)
|
||||
: Appender(id, name, APPENDER_DB, level), realm(realmId), enable(false)
|
||||
AppenderDB::AppenderDB(uint8 id, std::string const& name, LogLevel level)
|
||||
: Appender(id, name, APPENDER_DB, level), realmId(0), enabled(false)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -27,10 +27,11 @@ AppenderDB::~AppenderDB()
|
||||
{
|
||||
}
|
||||
|
||||
void AppenderDB::_write(LogMessage& message)
|
||||
void AppenderDB::_write(LogMessage const& message)
|
||||
{
|
||||
if (!enable)
|
||||
if (!enabled)
|
||||
return;
|
||||
|
||||
switch (message.type)
|
||||
{
|
||||
case LOG_FILTER_SQL:
|
||||
@@ -40,7 +41,7 @@ void AppenderDB::_write(LogMessage& message)
|
||||
default:
|
||||
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_LOG);
|
||||
stmt->setUInt64(0, message.mtime);
|
||||
stmt->setUInt32(1, realm);
|
||||
stmt->setUInt32(1, realmId);
|
||||
stmt->setUInt8(2, uint8(message.type));
|
||||
stmt->setUInt8(3, uint8(message.level));
|
||||
stmt->setString(4, message.text);
|
||||
@@ -49,7 +50,8 @@ void AppenderDB::_write(LogMessage& message)
|
||||
}
|
||||
}
|
||||
|
||||
void AppenderDB::setEnable(bool _enable)
|
||||
void AppenderDB::setRealmId(uint32 _realmId)
|
||||
{
|
||||
enable = _enable;
|
||||
enabled = true;
|
||||
realmId = _realmId;
|
||||
}
|
||||
|
||||
@@ -23,14 +23,15 @@
|
||||
class AppenderDB: public Appender
|
||||
{
|
||||
public:
|
||||
AppenderDB(uint8 _id, std::string const& _name, LogLevel level, uint32 realmId);
|
||||
AppenderDB(uint8 _id, std::string const& _name, LogLevel level);
|
||||
~AppenderDB();
|
||||
void setEnable(bool enable);
|
||||
|
||||
void setRealmId(uint32 realmId);
|
||||
|
||||
private:
|
||||
uint32 realm;
|
||||
bool enable;
|
||||
void _write(LogMessage& message);
|
||||
uint32 realmId;
|
||||
bool enabled;
|
||||
void _write(LogMessage const& message);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -39,7 +39,7 @@ AppenderFile::~AppenderFile()
|
||||
}
|
||||
}
|
||||
|
||||
void AppenderFile::_write(LogMessage& message)
|
||||
void AppenderFile::_write(LogMessage const& message)
|
||||
{
|
||||
if (dynamicName)
|
||||
{
|
||||
@@ -70,5 +70,6 @@ FILE* AppenderFile::OpenFile(std::string const &filename, std::string const &mod
|
||||
newName.append(LogMessage::getTimeStr(time(NULL)));
|
||||
rename(filename.c_str(), newName.c_str()); // no error handling... if we couldn't make a backup, just ignore
|
||||
}
|
||||
|
||||
return fopen((logDir + filename).c_str(), mode.c_str());
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class AppenderFile: public Appender
|
||||
FILE* OpenFile(std::string const& _name, std::string const& _mode, bool _backup);
|
||||
|
||||
private:
|
||||
void _write(LogMessage& message);
|
||||
void _write(LogMessage const& message);
|
||||
FILE* logfile;
|
||||
std::string filename;
|
||||
std::string logDir;
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
|
||||
Log::Log() : worker(NULL)
|
||||
{
|
||||
SetRealmID(0);
|
||||
m_logsTimestamp = "_" + GetTimestampStr();
|
||||
LoadFromConfig();
|
||||
}
|
||||
@@ -154,7 +153,7 @@ void Log::CreateAppenderFromConfig(const char* name)
|
||||
case APPENDER_DB:
|
||||
{
|
||||
uint8 id = NextAppenderId();
|
||||
appenders[id] = new AppenderDB(id, name, level, realm);
|
||||
appenders[id] = new AppenderDB(id, name, level);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -265,13 +264,6 @@ void Log::ReadLoggersFromConfig()
|
||||
loggers[LOG_FILTER_GENERAL].Create("root", LOG_FILTER_GENERAL, LOG_LEVEL_DISABLED);
|
||||
}
|
||||
|
||||
void Log::EnableDBAppenders()
|
||||
{
|
||||
for (AppenderMap::iterator it = appenders.begin(); it != appenders.end(); ++it)
|
||||
if (it->second && it->second->getType() == APPENDER_DB)
|
||||
((AppenderDB *)it->second)->setEnable(true);
|
||||
}
|
||||
|
||||
void Log::vlog(LogFilterType filter, LogLevel level, char const* str, va_list argptr)
|
||||
{
|
||||
char text[MAX_QUERY_LEN];
|
||||
@@ -281,12 +273,16 @@ void Log::vlog(LogFilterType filter, LogLevel level, char const* str, va_list ar
|
||||
|
||||
void Log::write(LogMessage* msg)
|
||||
{
|
||||
if (loggers.empty())
|
||||
return;
|
||||
|
||||
msg->text.append("\n");
|
||||
Logger* logger = GetLoggerByType(msg->type);
|
||||
|
||||
if (worker)
|
||||
{
|
||||
msg->text.append("\n");
|
||||
Logger* logger = GetLoggerByType(msg->type);
|
||||
worker->enqueue(new LogOperation(logger, msg));
|
||||
}
|
||||
else
|
||||
logger->write(*msg);
|
||||
}
|
||||
|
||||
std::string Log::GetTimestampStr()
|
||||
@@ -463,9 +459,11 @@ void Log::outCommand(uint32 account, const char * str, ...)
|
||||
write(msg);
|
||||
}
|
||||
|
||||
void Log::SetRealmID(uint32 id)
|
||||
void Log::SetRealmId(uint32 id)
|
||||
{
|
||||
realm = id;
|
||||
for (AppenderMap::iterator it = appenders.begin(); it != appenders.end(); ++it)
|
||||
if (it->second && it->second->getType() == APPENDER_DB)
|
||||
((AppenderDB *)it->second)->setRealmId(id);
|
||||
}
|
||||
|
||||
void Log::Close()
|
||||
@@ -484,7 +482,10 @@ void Log::Close()
|
||||
void Log::LoadFromConfig()
|
||||
{
|
||||
Close();
|
||||
worker = new LogWorker();
|
||||
|
||||
if (ConfigMgr::GetBoolDefault("Log.Async.Enable", false))
|
||||
worker = new LogWorker();
|
||||
|
||||
AppenderId = 0;
|
||||
m_logsDir = ConfigMgr::GetStringDefault("LogsDir", "");
|
||||
if (!m_logsDir.empty())
|
||||
|
||||
@@ -52,12 +52,11 @@ class Log
|
||||
void outError(LogFilterType f, char const* str, ...) ATTR_PRINTF(3, 4);
|
||||
void outFatal(LogFilterType f, char const* str, ...) ATTR_PRINTF(3, 4);
|
||||
|
||||
void EnableDBAppenders();
|
||||
void outCommand(uint32 account, 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);
|
||||
void SetRealmId(uint32 id);
|
||||
|
||||
private:
|
||||
void vlog(LogFilterType f, LogLevel level, char const* str, va_list argptr);
|
||||
@@ -78,7 +77,6 @@ class Log
|
||||
std::string m_logsDir;
|
||||
std::string m_logsTimestamp;
|
||||
|
||||
uint32 realm;
|
||||
LogWorker* worker;
|
||||
};
|
||||
|
||||
|
||||
@@ -438,8 +438,6 @@ bool Master::_StartDB()
|
||||
}
|
||||
sLog->outInfo(LOG_FILTER_WORLDSERVER, "Realm running as realm ID %d", realmID);
|
||||
|
||||
sLog->SetRealmID(realmID);
|
||||
|
||||
///- Clean the database before starting
|
||||
ClearOnlineAccounts();
|
||||
|
||||
|
||||
@@ -2791,6 +2791,14 @@ Logger.Opcodes=41,6,Console Server
|
||||
|
||||
Loggers=Root Chat DBErrors GM RA Warden Character Load WorldServer Opcodes
|
||||
|
||||
#
|
||||
# Log.Async.Enable
|
||||
# Description: Enables asyncronous message logging.
|
||||
# Default: 0 - (Disabled)
|
||||
# 1 - (Enabled)
|
||||
|
||||
Log.Async.Enable = 0
|
||||
|
||||
#
|
||||
###################################################################################################
|
||||
|
||||
|
||||
Reference in New Issue
Block a user