--HG--
branch : trunk
This commit is contained in:
n0n4m3
2009-12-20 17:39:36 +01:00
52 changed files with 288 additions and 226 deletions
+1
View File
@@ -41,6 +41,7 @@ UPDATE `gameobject_template` SET `ScriptName`='go_orb_of_the_blue_flight' WHERE
UPDATE `gameobject_template` SET `ScriptName`='go_acherus_soul_prison' WHERE `entry` IN (191577,191580,191581,191582,191583,191584,191585,191586,191587,191588,191589,191590); UPDATE `gameobject_template` SET `ScriptName`='go_acherus_soul_prison' WHERE `entry` IN (191577,191580,191581,191582,191583,191584,191585,191586,191587,191588,191589,191590);
UPDATE `gameobject_template` SET `ScriptName`='go_shrine_of_the_birds' WHERE `entry` IN (185547,185553,185551); UPDATE `gameobject_template` SET `ScriptName`='go_shrine_of_the_birds' WHERE `entry` IN (185547,185553,185551);
UPDATE `gameobject_template` SET `ScriptName`='go_matrix_punchograph' WHERE `entry` IN (142345,142475,142476,142696); UPDATE `gameobject_template` SET `ScriptName`='go_matrix_punchograph' WHERE `entry` IN (142345,142475,142476,142696);
UPDATE `gameobject_template` SET `ScriptName`='go_jotunheim_cage' WHERE `entry`=192135;
/* GUARD */ /* GUARD */
@@ -0,0 +1 @@
UPDATE `gameobject_template` SET `ScriptName`='go_jotunheim_cage' WHERE `entry`=192135;
@@ -50,7 +50,7 @@ enum eOOX
FACTION_ESCORTEE_H = 775 FACTION_ESCORTEE_H = 775
}; };
struct MANGOS_DLL_DECL npc_00x09hlAI : public npc_escortAI struct TRINITY_DLL_DECL npc_00x09hlAI : public npc_escortAI
{ {
npc_00x09hlAI(Creature* pCreature) : npc_escortAI(pCreature) { } npc_00x09hlAI(Creature* pCreature) : npc_escortAI(pCreature) { }
@@ -49,7 +49,7 @@ enum Creatures
#define NPC_POISONOUS_MUSHROOM 30435 #define NPC_POISONOUS_MUSHROOM 30435
}; };
struct MANGOS_DLL_DECL boss_amanitarAI : public ScriptedAI struct TRINITY_DLL_DECL boss_amanitarAI : public ScriptedAI
{ {
boss_amanitarAI(Creature *c) : ScriptedAI(c) boss_amanitarAI(Creature *c) : ScriptedAI(c)
{ {
@@ -158,7 +158,7 @@ struct MANGOS_DLL_DECL boss_amanitarAI : public ScriptedAI
} }
}; };
struct MANGOS_DLL_DECL mob_amanitar_mushroomsAI : public Scripted_NoMovementAI struct TRINITY_DLL_DECL mob_amanitar_mushroomsAI : public Scripted_NoMovementAI
{ {
mob_amanitar_mushroomsAI(Creature* c) : Scripted_NoMovementAI(c) mob_amanitar_mushroomsAI(Creature* c) : Scripted_NoMovementAI(c)
{ {
@@ -242,7 +242,7 @@ struct TRINITY_DLL_DECL mob_ahnkahar_nerubianAI : public ScriptedAI
} }
}; };
struct MANGOS_DLL_DECL mob_nadox_eggsAI : public Scripted_NoMovementAI struct TRINITY_DLL_DECL mob_nadox_eggsAI : public Scripted_NoMovementAI
{ {
mob_nadox_eggsAI(Creature* c) : Scripted_NoMovementAI(c) mob_nadox_eggsAI(Creature* c) : Scripted_NoMovementAI(c)
{ {
@@ -63,7 +63,7 @@ float JEDOGA_POS[2][4] =
{372.330994f, -705.278015f, -16.179716f, 5.427970f} {372.330994f, -705.278015f, -16.179716f, 5.427970f}
}; };
struct MANGOS_DLL_DECL boss_jedoga_shadowseekerAI : public ScriptedAI struct TRINITY_DLL_DECL boss_jedoga_shadowseekerAI : public ScriptedAI
{ {
boss_jedoga_shadowseekerAI(Creature* c) : ScriptedAI(c) boss_jedoga_shadowseekerAI(Creature* c) : ScriptedAI(c)
{ {
@@ -333,7 +333,7 @@ struct MANGOS_DLL_DECL boss_jedoga_shadowseekerAI : public ScriptedAI
} }
}; };
struct MANGOS_DLL_DECL mob_jedoga_initiandAI : public ScriptedAI struct TRINITY_DLL_DECL mob_jedoga_initiandAI : public ScriptedAI
{ {
mob_jedoga_initiandAI(Creature* c) : ScriptedAI(c) mob_jedoga_initiandAI(Creature* c) : ScriptedAI(c)
{ {
@@ -487,7 +487,7 @@ enum AufseherSpell
SPELL_BEAM_VISUAL_JEDOGAS_AUFSEHER_2 = 56312 SPELL_BEAM_VISUAL_JEDOGAS_AUFSEHER_2 = 56312
}; };
struct MANGOS_DLL_DECL npc_jedogas_aufseher_triggerAI : public Scripted_NoMovementAI struct TRINITY_DLL_DECL npc_jedogas_aufseher_triggerAI : public Scripted_NoMovementAI
{ {
npc_jedogas_aufseher_triggerAI(Creature* c) : Scripted_NoMovementAI(c) npc_jedogas_aufseher_triggerAI(Creature* c) : Scripted_NoMovementAI(c)
{ {
@@ -50,7 +50,7 @@ This is the timed gauntlet - waves of non-elite spiders
#define SPELL_LEECH_POISON_H 59417 #define SPELL_LEECH_POISON_H 59417
#define SPELL_WEB_GRAB_H 59421 #define SPELL_WEB_GRAB_H 59421
struct MANGOS_DLL_DECL boss_hadronoxAI : public ScriptedAI struct TRINITY_DLL_DECL boss_hadronoxAI : public ScriptedAI
{ {
boss_hadronoxAI(Creature* c) : ScriptedAI(c) boss_hadronoxAI(Creature* c) : ScriptedAI(c)
{ {
@@ -17,7 +17,7 @@
/* ScriptData /* ScriptData
SDName: GO_Scripts SDName: GO_Scripts
SD%Complete: 100 SD%Complete: 100
SDComment: Quest support: 4285,4287,4288(crystal pylons), 4296, 6481, 10990, 10991, 10992, Field_Repair_Bot->Teaches spell 22704. Barov_journal->Teaches spell 26089,12843 SDComment: Quest support: 4285,4287,4288(crystal pylons), 4296, 6481, 10990, 10991, 10992, Field_Repair_Bot->Teaches spell 22704. Barov_journal->Teaches spell 26089,12843,12982
SDCategory: Game Objects SDCategory: Game Objects
EndScriptData */ EndScriptData */
@@ -41,6 +41,7 @@ go_tele_to_dalaran_crystal
go_tele_to_violet_stand go_tele_to_violet_stand
go_rusty_cage go_rusty_cage
go_scourge_cage go_scourge_cage
go_jotunheim_cage
EndContentData */ EndContentData */
#include "precompiled.h" #include "precompiled.h"
@@ -607,6 +608,57 @@ bool GOHello_go_blood_filled_orb(Player *pPlayer, GameObject *pGO)
return true; return true;
} }
/*######
## go_jotunheim_cage
######*/
enum eJotunheimCage
{
NPC_EBON_BLADE_PRISONER_HUMAN = 30186,
NPC_EBON_BLADE_PRISONER_NE = 30194,
NPC_EBON_BLADE_PRISONER_TROLL = 30196,
NPC_EBON_BLADE_PRISONER_ORC = 30195,
SPELL_SUMMON_BLADE_KNIGHT_H = 56207,
SPELL_SUMMON_BLADE_KNIGHT_NE = 56209,
SPELL_SUMMON_BLADE_KNIGHT_ORC = 56212,
SPELL_SUMMON_BLADE_KNIGHT_TROLL = 56214
};
bool GOHello_go_jotunheim_cage(Player* pPlayer, GameObject* pGO)
{
Creature* pPrisoner;
pPrisoner = NULL;
if ((pPrisoner = pGO->FindNearestCreature(NPC_EBON_BLADE_PRISONER_HUMAN, 5.0f, true)) ||
(pPrisoner = pGO->FindNearestCreature(NPC_EBON_BLADE_PRISONER_TROLL, 5.0f, true)) ||
(pPrisoner = pGO->FindNearestCreature(NPC_EBON_BLADE_PRISONER_ORC, 5.0f, true)) ||
(pPrisoner = pGO->FindNearestCreature(NPC_EBON_BLADE_PRISONER_NE, 5.0f, true)))
{
if (pPrisoner && pPrisoner->isAlive())
{
pPrisoner->DisappearAndDie();
pPlayer->KilledMonsterCredit(NPC_EBON_BLADE_PRISONER_HUMAN, 0);
switch(pPrisoner->GetEntry())
{
case NPC_EBON_BLADE_PRISONER_HUMAN:
pPlayer->CastSpell(pPlayer,SPELL_SUMMON_BLADE_KNIGHT_H,true);
break;
case NPC_EBON_BLADE_PRISONER_NE:
pPlayer->CastSpell(pPlayer,SPELL_SUMMON_BLADE_KNIGHT_NE,true);
break;
case NPC_EBON_BLADE_PRISONER_TROLL:
pPlayer->CastSpell(pPlayer,SPELL_SUMMON_BLADE_KNIGHT_TROLL,true);
break;
case NPC_EBON_BLADE_PRISONER_ORC:
pPlayer->CastSpell(pPlayer,SPELL_SUMMON_BLADE_KNIGHT_ORC,true);
break;
}
}
}
return true;
}
void AddSC_go_scripts() void AddSC_go_scripts()
{ {
Script *newscript; Script *newscript;
@@ -741,5 +793,9 @@ void AddSC_go_scripts()
newscript->Name = "go_blood_filled_orb"; newscript->Name = "go_blood_filled_orb";
newscript->pGOHello = &GOHello_go_blood_filled_orb; newscript->pGOHello = &GOHello_go_blood_filled_orb;
newscript->RegisterSelf(); newscript->RegisterSelf();
}
newscript = new Script;
newscript->Name = "go_jotunheim_cage";
newscript->pGOHello = &GOHello_go_jotunheim_cage;
newscript->RegisterSelf();
}
+8 -4
View File
@@ -137,10 +137,14 @@ typedef uint32 DWORD;
typedef uint64 OBJECT_HANDLE; typedef uint64 OBJECT_HANDLE;
#define MaNGOS Trinity //commented out
#define MANGOS_DLL_DECL TRINITY_DLL_DECL //so all future merges with invalid style will drop build errors
#define MANGOS_DLL_SPEC TRINITY_DLL_SPEC //this way devs will at least read thru what they merge to find the error
#define GetMangosString GetTrinityString
//#define MaNGOS Trinity
//#define MANGOS_DLL_DECL TRINITY_DLL_DECL
//#define MANGOS_DLL_SPEC TRINITY_DLL_SPEC
//#define GetMangosString GetTrinityString
#if defined(MANGOS_DEBUG) || defined(TRINITY_DEBUG) #if defined(MANGOS_DEBUG) || defined(TRINITY_DEBUG)
# ifndef TRINITY_DEBUG # ifndef TRINITY_DEBUG
+10 -10
View File
@@ -41,7 +41,7 @@
INSTANTIATE_SINGLETON_1(AchievementGlobalMgr); INSTANTIATE_SINGLETON_1(AchievementGlobalMgr);
namespace MaNGOS namespace Trinity
{ {
class AchievementChatBuilder class AchievementChatBuilder
{ {
@@ -50,7 +50,7 @@ namespace MaNGOS
: i_player(pl), i_msgtype(msgtype), i_textId(textId), i_achievementId(ach_id) {} : i_player(pl), i_msgtype(msgtype), i_textId(textId), i_achievementId(ach_id) {}
void operator()(WorldPacket& data, int32 loc_idx) void operator()(WorldPacket& data, int32 loc_idx)
{ {
char const* text = objmgr.GetMangosString(i_textId,loc_idx); char const* text = objmgr.GetTrinityString(i_textId,loc_idx);
data << uint8(i_msgtype); data << uint8(i_msgtype);
data << uint32(LANG_UNIVERSAL); data << uint32(LANG_UNIVERSAL);
@@ -69,7 +69,7 @@ namespace MaNGOS
int32 i_textId; int32 i_textId;
uint32 i_achievementId; uint32 i_achievementId;
}; };
} // namespace MaNGOS } // namespace Trinity
bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria) bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
{ {
@@ -577,8 +577,8 @@ void AchievementMgr::SendAchievementEarned(AchievementEntry const* achievement)
if(Guild* guild = objmgr.GetGuildById(GetPlayer()->GetGuildId())) if(Guild* guild = objmgr.GetGuildById(GetPlayer()->GetGuildId()))
{ {
MaNGOS::AchievementChatBuilder say_builder(*GetPlayer(), CHAT_MSG_GUILD_ACHIEVEMENT, LANG_ACHIEVEMENT_EARNED,achievement->ID); Trinity::AchievementChatBuilder say_builder(*GetPlayer(), CHAT_MSG_GUILD_ACHIEVEMENT, LANG_ACHIEVEMENT_EARNED,achievement->ID);
MaNGOS::LocalizedPacketDo<MaNGOS::AchievementChatBuilder> say_do(say_builder); Trinity::LocalizedPacketDo<Trinity::AchievementChatBuilder> say_do(say_builder);
guild->BroadcastWorker(say_do,GetPlayer()); guild->BroadcastWorker(say_do,GetPlayer());
} }
@@ -595,16 +595,16 @@ void AchievementMgr::SendAchievementEarned(AchievementEntry const* achievement)
// if player is in world he can tell his friends about new achievement // if player is in world he can tell his friends about new achievement
else if (GetPlayer()->IsInWorld()) else if (GetPlayer()->IsInWorld())
{ {
CellPair p = MaNGOS::ComputeCellPair(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY()); CellPair p = Trinity::ComputeCellPair(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY());
Cell cell(p); Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate(); cell.SetNoCreate();
MaNGOS::AchievementChatBuilder say_builder(*GetPlayer(), CHAT_MSG_ACHIEVEMENT, LANG_ACHIEVEMENT_EARNED,achievement->ID); Trinity::AchievementChatBuilder say_builder(*GetPlayer(), CHAT_MSG_ACHIEVEMENT, LANG_ACHIEVEMENT_EARNED,achievement->ID);
MaNGOS::LocalizedPacketDo<MaNGOS::AchievementChatBuilder> say_do(say_builder); Trinity::LocalizedPacketDo<Trinity::AchievementChatBuilder> say_do(say_builder);
MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::AchievementChatBuilder> > say_worker(GetPlayer(),sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY),say_do); Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::AchievementChatBuilder> > say_worker(GetPlayer(),sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY),say_do);
TypeContainerVisitor<MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::AchievementChatBuilder> >, WorldTypeMapContainer > message(say_worker); TypeContainerVisitor<Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::AchievementChatBuilder> >, WorldTypeMapContainer > message(say_worker);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, message, *GetPlayer()->GetMap(), *GetPlayer(), sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY)); cell_lock->Visit(cell_lock, message, *GetPlayer()->GetMap(), *GetPlayer(), sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY));
} }
+13 -13
View File
@@ -36,7 +36,7 @@
#include "SpellAuras.h" #include "SpellAuras.h"
#include "Util.h" #include "Util.h"
namespace MaNGOS namespace Trinity
{ {
class BattleGroundChatBuilder class BattleGroundChatBuilder
{ {
@@ -45,7 +45,7 @@ namespace MaNGOS
: i_msgtype(msgtype), i_textId(textId), i_source(source), i_args(args) {} : i_msgtype(msgtype), i_textId(textId), i_source(source), i_args(args) {}
void operator()(WorldPacket& data, int32 loc_idx) void operator()(WorldPacket& data, int32 loc_idx)
{ {
char const* text = objmgr.GetMangosString(i_textId,loc_idx); char const* text = objmgr.GetTrinityString(i_textId,loc_idx);
if (i_args) if (i_args)
{ {
@@ -90,9 +90,9 @@ namespace MaNGOS
: i_msgtype(msgtype), i_textId(textId), i_source(source), i_arg1(arg1), i_arg2(arg2) {} : i_msgtype(msgtype), i_textId(textId), i_source(source), i_arg1(arg1), i_arg2(arg2) {}
void operator()(WorldPacket& data, int32 loc_idx) void operator()(WorldPacket& data, int32 loc_idx)
{ {
char const* text = objmgr.GetMangosString(i_textId,loc_idx); char const* text = objmgr.GetTrinityString(i_textId,loc_idx);
char const* arg1str = i_arg1 ? objmgr.GetMangosString(i_arg1,loc_idx) : ""; char const* arg1str = i_arg1 ? objmgr.GetTrinityString(i_arg1,loc_idx) : "";
char const* arg2str = i_arg2 ? objmgr.GetMangosString(i_arg2,loc_idx) : ""; char const* arg2str = i_arg2 ? objmgr.GetTrinityString(i_arg2,loc_idx) : "";
char str [2048]; char str [2048];
snprintf(str,2048,text, arg1str, arg2str ); snprintf(str,2048,text, arg1str, arg2str );
@@ -116,7 +116,7 @@ namespace MaNGOS
int32 i_arg1; int32 i_arg1;
int32 i_arg2; int32 i_arg2;
}; };
} // namespace MaNGOS } // namespace Trinity
template<class Do> template<class Do>
void BattleGround::BroadcastWorker(Do& _do) void BattleGround::BroadcastWorker(Do& _do)
@@ -820,7 +820,7 @@ void BattleGround::EndBattleGround(uint32 winner)
uint32 BattleGround::GetBonusHonorFromKill(uint32 kills) const uint32 BattleGround::GetBonusHonorFromKill(uint32 kills) const
{ {
//variable kills means how many honorable kills you scored (so we need kills * honor_for_one_kill) //variable kills means how many honorable kills you scored (so we need kills * honor_for_one_kill)
return MaNGOS::Honor::hk_honor_at_level(GetMaxLevel(), kills); return Trinity::Honor::hk_honor_at_level(GetMaxLevel(), kills);
} }
uint32 BattleGround::GetBattlemasterEntry() const uint32 BattleGround::GetBattlemasterEntry() const
@@ -1692,8 +1692,8 @@ bool BattleGround::AddSpiritGuide(uint32 type, float x, float y, float z, float
void BattleGround::SendMessageToAll(int32 entry, ChatMsg type, Player const* source) void BattleGround::SendMessageToAll(int32 entry, ChatMsg type, Player const* source)
{ {
MaNGOS::BattleGroundChatBuilder bg_builder(type, entry, source); Trinity::BattleGroundChatBuilder bg_builder(type, entry, source);
MaNGOS::LocalizedPacketDo<MaNGOS::BattleGroundChatBuilder> bg_do(bg_builder); Trinity::LocalizedPacketDo<Trinity::BattleGroundChatBuilder> bg_do(bg_builder);
BroadcastWorker(bg_do); BroadcastWorker(bg_do);
} }
@@ -1702,8 +1702,8 @@ void BattleGround::PSendMessageToAll(int32 entry, ChatMsg type, Player const* so
va_list ap; va_list ap;
va_start(ap, source); va_start(ap, source);
MaNGOS::BattleGroundChatBuilder bg_builder(type, entry, source, &ap); Trinity::BattleGroundChatBuilder bg_builder(type, entry, source, &ap);
MaNGOS::LocalizedPacketDo<MaNGOS::BattleGroundChatBuilder> bg_do(bg_builder); Trinity::LocalizedPacketDo<Trinity::BattleGroundChatBuilder> bg_do(bg_builder);
BroadcastWorker(bg_do); BroadcastWorker(bg_do);
va_end(ap); va_end(ap);
@@ -1711,8 +1711,8 @@ void BattleGround::PSendMessageToAll(int32 entry, ChatMsg type, Player const* so
void BattleGround::SendMessage2ToAll(int32 entry, ChatMsg type, Player const* source, int32 arg1, int32 arg2) void BattleGround::SendMessage2ToAll(int32 entry, ChatMsg type, Player const* source, int32 arg1, int32 arg2)
{ {
MaNGOS::BattleGround2ChatBuilder bg_builder(type, entry, source, arg1, arg2); Trinity::BattleGround2ChatBuilder bg_builder(type, entry, source, arg1, arg2);
MaNGOS::LocalizedPacketDo<MaNGOS::BattleGround2ChatBuilder> bg_do(bg_builder); Trinity::LocalizedPacketDo<Trinity::BattleGround2ChatBuilder> bg_do(bg_builder);
BroadcastWorker(bg_do); BroadcastWorker(bg_do);
} }
+3 -3
View File
@@ -26,12 +26,12 @@ INSTANTIATE_SINGLETON_1( HordeChannelMgr );
ChannelMgr* channelMgr(uint32 team) ChannelMgr* channelMgr(uint32 team)
{ {
if (sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL)) if (sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
return &MaNGOS::Singleton<AllianceChannelMgr>::Instance(); // cross-faction return &Trinity::Singleton<AllianceChannelMgr>::Instance(); // cross-faction
if(team == ALLIANCE) if(team == ALLIANCE)
return &MaNGOS::Singleton<AllianceChannelMgr>::Instance(); return &Trinity::Singleton<AllianceChannelMgr>::Instance();
if(team == HORDE) if(team == HORDE)
return &MaNGOS::Singleton<HordeChannelMgr>::Instance(); return &Trinity::Singleton<HordeChannelMgr>::Instance();
return NULL; return NULL;
} }
+3 -3
View File
@@ -2081,8 +2081,8 @@ GameObject* ChatHandler::GetObjectGlobalyWithGuidOrNearWithDbGuid(uint32 lowguid
Cell cell(p); Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
MaNGOS::GameObjectWithDbGUIDCheck go_check(*pl,lowguid); Trinity::GameObjectWithDbGUIDCheck go_check(*pl,lowguid);
MaNGOS::GameObjectSearcher<MaNGOS::GameObjectWithDbGUIDCheck> checker(pl,obj,go_check); Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck> checker(pl,obj,go_check);
TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > object_checker(checker); TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > object_checker(checker);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
@@ -2363,7 +2363,7 @@ int ChatHandler::GetSessionDbLocaleIndex() const
return m_session->GetSessionDbLocaleIndex(); return m_session->GetSessionDbLocaleIndex();
} }
const char *CliHandler::GetMangosString(int32 entry) const const char *CliHandler::GetTrinityString(int32 entry) const
{ {
return objmgr.GetTrinityStringForDBCLocale(entry); return objmgr.GetTrinityStringForDBCLocale(entry);
} }
+1 -1
View File
@@ -63,7 +63,7 @@ class TRINITY_DLL_SPEC ChatHandler
static char* LineFromMessage(char*& pos) { char* start = strtok(pos,"\n"); pos = NULL; return start; } static char* LineFromMessage(char*& pos) { char* start = strtok(pos,"\n"); pos = NULL; return start; }
// function with different implementation for chat/console // function with different implementation for chat/console
virtual const char *GetMangosString(int32 entry) const; virtual const char *GetTrinityString(int32 entry) const;
virtual void SendSysMessage( const char *str); virtual void SendSysMessage( const char *str);
void SendSysMessage( int32 entry); void SendSysMessage( int32 entry);
+7 -7
View File
@@ -588,7 +588,7 @@ void WorldSession::HandleEmoteOpcode( WorldPacket & recv_data )
GetPlayer()->HandleEmoteCommand(emote); GetPlayer()->HandleEmoteCommand(emote);
} }
namespace MaNGOS namespace Trinity
{ {
class EmoteChatBuilder class EmoteChatBuilder
{ {
@@ -618,7 +618,7 @@ namespace MaNGOS
uint32 i_emote_num; uint32 i_emote_num;
Unit const* i_target; Unit const* i_target;
}; };
} // namespace MaNGOS } // namespace Trinity
void WorldSession::HandleTextEmoteOpcode( WorldPacket & recv_data ) void WorldSession::HandleTextEmoteOpcode( WorldPacket & recv_data )
{ {
@@ -659,16 +659,16 @@ void WorldSession::HandleTextEmoteOpcode( WorldPacket & recv_data )
Unit* unit = ObjectAccessor::GetUnit(*_player, guid); Unit* unit = ObjectAccessor::GetUnit(*_player, guid);
CellPair p = MaNGOS::ComputeCellPair(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY()); CellPair p = Trinity::ComputeCellPair(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY());
Cell cell(p); Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate(); cell.SetNoCreate();
MaNGOS::EmoteChatBuilder emote_builder(*GetPlayer(), text_emote, emoteNum, unit); Trinity::EmoteChatBuilder emote_builder(*GetPlayer(), text_emote, emoteNum, unit);
MaNGOS::LocalizedPacketDo<MaNGOS::EmoteChatBuilder > emote_do(emote_builder); Trinity::LocalizedPacketDo<Trinity::EmoteChatBuilder > emote_do(emote_builder);
MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::EmoteChatBuilder > > emote_worker(GetPlayer(),sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE),emote_do); Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::EmoteChatBuilder > > emote_worker(GetPlayer(),sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE),emote_do);
TypeContainerVisitor<MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::EmoteChatBuilder > >, WorldTypeMapContainer > message(emote_worker); TypeContainerVisitor<Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::EmoteChatBuilder > >, WorldTypeMapContainer > message(emote_worker);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, message, *GetPlayer()->GetMap(), *GetPlayer(), sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE)); cell_lock->Visit(cell_lock, message, *GetPlayer()->GetMap(), *GetPlayer(), sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE));
+10 -10
View File
@@ -654,14 +654,14 @@ void Creature::DoFleeToGetAssistance()
{ {
Creature* pCreature = NULL; Creature* pCreature = NULL;
CellPair p(MaNGOS::ComputeCellPair(GetPositionX(), GetPositionY())); CellPair p(Trinity::ComputeCellPair(GetPositionX(), GetPositionY()));
Cell cell(p); Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate(); cell.SetNoCreate();
MaNGOS::NearestAssistCreatureInCreatureRangeCheck u_check(this, getVictim(), radius); Trinity::NearestAssistCreatureInCreatureRangeCheck u_check(this, getVictim(), radius);
MaNGOS::CreatureLastSearcher<MaNGOS::NearestAssistCreatureInCreatureRangeCheck> searcher(this, pCreature, u_check); Trinity::CreatureLastSearcher<Trinity::NearestAssistCreatureInCreatureRangeCheck> searcher(this, pCreature, u_check);
TypeContainerVisitor<MaNGOS::CreatureLastSearcher<MaNGOS::NearestAssistCreatureInCreatureRangeCheck>, GridTypeMapContainer > grid_creature_searcher(searcher); TypeContainerVisitor<Trinity::CreatureLastSearcher<Trinity::NearestAssistCreatureInCreatureRangeCheck>, GridTypeMapContainer > grid_creature_searcher(searcher);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, grid_creature_searcher, *GetMap(), *this, radius); cell_lock->Visit(cell_lock, grid_creature_searcher, *GetMap(), *this, radius);
@@ -1756,8 +1756,8 @@ void Creature::CallAssistance()
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate(); cell.SetNoCreate();
MaNGOS::AnyAssistCreatureInRangeCheck u_check(this, getVictim(), radius); Trinity::AnyAssistCreatureInRangeCheck u_check(this, getVictim(), radius);
MaNGOS::CreatureListSearcher<MaNGOS::AnyAssistCreatureInRangeCheck> searcher(this, assistList, u_check); Trinity::CreatureListSearcher<Trinity::AnyAssistCreatureInRangeCheck> searcher(this, assistList, u_check);
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AnyAssistCreatureInRangeCheck>, GridTypeMapContainer > grid_creature_searcher(searcher); TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AnyAssistCreatureInRangeCheck>, GridTypeMapContainer > grid_creature_searcher(searcher);
@@ -1785,15 +1785,15 @@ void Creature::CallForHelp(float fRadius)
if (fRadius <= 0.0f || !getVictim() || isPet() || isCharmed()) if (fRadius <= 0.0f || !getVictim() || isPet() || isCharmed())
return; return;
CellPair p(MaNGOS::ComputeCellPair(GetPositionX(), GetPositionY())); CellPair p(Trinity::ComputeCellPair(GetPositionX(), GetPositionY()));
Cell cell(p); Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate(); cell.SetNoCreate();
MaNGOS::CallOfHelpCreatureInRangeDo u_do(this, getVictim(), fRadius); Trinity::CallOfHelpCreatureInRangeDo u_do(this, getVictim(), fRadius);
MaNGOS::CreatureWorker<MaNGOS::CallOfHelpCreatureInRangeDo> worker(this, u_do); Trinity::CreatureWorker<Trinity::CallOfHelpCreatureInRangeDo> worker(this, u_do);
TypeContainerVisitor<MaNGOS::CreatureWorker<MaNGOS::CallOfHelpCreatureInRangeDo>, GridTypeMapContainer > grid_creature_searcher(worker); TypeContainerVisitor<Trinity::CreatureWorker<Trinity::CallOfHelpCreatureInRangeDo>, GridTypeMapContainer > grid_creature_searcher(worker);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, grid_creature_searcher, *GetMap(), *this, fRadius); cell_lock->Visit(cell_lock, grid_creature_searcher, *GetMap(), *this, fRadius);
+12 -12
View File
@@ -1171,21 +1171,21 @@ inline Unit* CreatureEventAI::GetTargetByType(uint32 Target, Unit* pActionInvoke
Unit* CreatureEventAI::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff) Unit* CreatureEventAI::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff)
{ {
CellPair p(MaNGOS::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY())); CellPair p(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
Cell cell(p); Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate(); cell.SetNoCreate();
Unit* pUnit = NULL; Unit* pUnit = NULL;
MaNGOS::MostHPMissingInRange u_check(m_creature, range, MinHPDiff); Trinity::MostHPMissingInRange u_check(m_creature, range, MinHPDiff);
MaNGOS::UnitLastSearcher<MaNGOS::MostHPMissingInRange> searcher(m_creature, pUnit, u_check); Trinity::UnitLastSearcher<Trinity::MostHPMissingInRange> searcher(m_creature, pUnit, u_check);
/* /*
typedef TYPELIST_4(GameObject, Creature*except pets*, DynamicObject, Corpse*Bones*) AllGridObjectTypes; typedef TYPELIST_4(GameObject, Creature*except pets*, DynamicObject, Corpse*Bones*) AllGridObjectTypes;
This means that if we only search grid then we cannot possibly return pets or players so this is safe This means that if we only search grid then we cannot possibly return pets or players so this is safe
*/ */
TypeContainerVisitor<MaNGOS::UnitLastSearcher<MaNGOS::MostHPMissingInRange>, GridTypeMapContainer > grid_unit_searcher(searcher); TypeContainerVisitor<Trinity::UnitLastSearcher<Trinity::MostHPMissingInRange>, GridTypeMapContainer > grid_unit_searcher(searcher);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, grid_unit_searcher, *m_creature->GetMap(), *m_creature, range); cell_lock->Visit(cell_lock, grid_unit_searcher, *m_creature->GetMap(), *m_creature, range);
@@ -1194,15 +1194,15 @@ Unit* CreatureEventAI::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff)
void CreatureEventAI::DoFindFriendlyCC(std::list<Creature*>& _list, float range) void CreatureEventAI::DoFindFriendlyCC(std::list<Creature*>& _list, float range)
{ {
CellPair p(MaNGOS::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY())); CellPair p(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
Cell cell(p); Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate(); cell.SetNoCreate();
MaNGOS::FriendlyCCedInRange u_check(m_creature, range); Trinity::FriendlyCCedInRange u_check(m_creature, range);
MaNGOS::CreatureListSearcher<MaNGOS::FriendlyCCedInRange> searcher(m_creature, _list, u_check); Trinity::CreatureListSearcher<Trinity::FriendlyCCedInRange> searcher(m_creature, _list, u_check);
TypeContainerVisitor<MaNGOS::CreatureListSearcher<MaNGOS::FriendlyCCedInRange>, GridTypeMapContainer > grid_creature_searcher(searcher); TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::FriendlyCCedInRange>, GridTypeMapContainer > grid_creature_searcher(searcher);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, grid_creature_searcher, *m_creature->GetMap()); cell_lock->Visit(cell_lock, grid_creature_searcher, *m_creature->GetMap());
@@ -1210,15 +1210,15 @@ void CreatureEventAI::DoFindFriendlyCC(std::list<Creature*>& _list, float range)
void CreatureEventAI::DoFindFriendlyMissingBuff(std::list<Creature*>& _list, float range, uint32 spellid) void CreatureEventAI::DoFindFriendlyMissingBuff(std::list<Creature*>& _list, float range, uint32 spellid)
{ {
CellPair p(MaNGOS::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY())); CellPair p(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
Cell cell(p); Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate(); cell.SetNoCreate();
MaNGOS::FriendlyMissingBuffInRange u_check(m_creature, range, spellid); Trinity::FriendlyMissingBuffInRange u_check(m_creature, range, spellid);
MaNGOS::CreatureListSearcher<MaNGOS::FriendlyMissingBuffInRange> searcher(m_creature, _list, u_check); Trinity::CreatureListSearcher<Trinity::FriendlyMissingBuffInRange> searcher(m_creature, _list, u_check);
TypeContainerVisitor<MaNGOS::CreatureListSearcher<MaNGOS::FriendlyMissingBuffInRange>, GridTypeMapContainer > grid_creature_searcher(searcher); TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::FriendlyMissingBuffInRange>, GridTypeMapContainer > grid_creature_searcher(searcher);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, grid_creature_searcher, *m_creature->GetMap()); cell_lock->Visit(cell_lock, grid_creature_searcher, *m_creature->GetMap());
+1 -1
View File
@@ -138,7 +138,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Summons()
temp.orientation = fields[4].GetFloat(); temp.orientation = fields[4].GetFloat();
temp.SpawnTimeSecs = fields[5].GetUInt32(); temp.SpawnTimeSecs = fields[5].GetUInt32();
if(!MaNGOS::IsValidMapCoord(temp.position_x,temp.position_y,temp.position_z,temp.orientation)) if(!Trinity::IsValidMapCoord(temp.position_x,temp.position_y,temp.position_z,temp.orientation))
{ {
sLog.outErrorDb("CreatureEventAI: Summon id %u have wrong coordinates (%f,%f,%f,%f), skipping.", i,temp.position_x,temp.position_y,temp.position_z,temp.orientation); sLog.outErrorDb("CreatureEventAI: Summon id %u have wrong coordinates (%f,%f,%f,%f), skipping.", i,temp.position_x,temp.position_y,temp.position_z,temp.orientation);
continue; continue;
+1 -1
View File
@@ -42,5 +42,5 @@ class CreatureEventAIMgr
CreatureEventAI_TextMap m_CreatureEventAI_TextMap; CreatureEventAI_TextMap m_CreatureEventAI_TextMap;
}; };
#define CreatureEAI_Mgr MaNGOS::Singleton<CreatureEventAIMgr>::Instance() #define CreatureEAI_Mgr Trinity::Singleton<CreatureEventAIMgr>::Instance()
#endif #endif
+4 -4
View File
@@ -128,15 +128,15 @@ void DynamicObject::Update(uint32 p_time)
if(m_radius) if(m_radius)
{ {
// TODO: make a timer and update this in larger intervals // TODO: make a timer and update this in larger intervals
CellPair p(MaNGOS::ComputeCellPair(GetPositionX(), GetPositionY())); CellPair p(Trinity::ComputeCellPair(GetPositionX(), GetPositionY()));
Cell cell(p); Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate(); cell.SetNoCreate();
MaNGOS::DynamicObjectUpdater notifier(*this, caster); Trinity::DynamicObjectUpdater notifier(*this, caster);
TypeContainerVisitor<MaNGOS::DynamicObjectUpdater, WorldTypeMapContainer > world_object_notifier(notifier); TypeContainerVisitor<Trinity::DynamicObjectUpdater, WorldTypeMapContainer > world_object_notifier(notifier);
TypeContainerVisitor<MaNGOS::DynamicObjectUpdater, GridTypeMapContainer > grid_object_notifier(notifier); TypeContainerVisitor<Trinity::DynamicObjectUpdater, GridTypeMapContainer > grid_object_notifier(notifier);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, world_object_notifier, *GetMap(), *this, m_radius); cell_lock->Visit(cell_lock, world_object_notifier, *GetMap(), *this, m_radius);
+1 -1
View File
@@ -62,7 +62,7 @@ class TRINITY_DLL_SPEC FleeingMovementGenerator
DestinationHolder< Traveller<T> > i_destinationHolder; DestinationHolder< Traveller<T> > i_destinationHolder;
}; };
class MANGOS_DLL_SPEC TimedFleeingMovementGenerator class TRINITY_DLL_SPEC TimedFleeingMovementGenerator
: public FleeingMovementGenerator<Creature> : public FleeingMovementGenerator<Creature>
{ {
public: public:
+6 -6
View File
@@ -358,8 +358,8 @@ void GameObject::Update(uint32 /*p_time*/)
// environmental damage spells already have around enemies targeting but this not help in case not existed GO casting support // environmental damage spells already have around enemies targeting but this not help in case not existed GO casting support
// affect only players // affect only players
Player* player = NULL; Player* player = NULL;
MaNGOS::AnyPlayerInObjectRangeCheck checker(this, radius); Trinity::AnyPlayerInObjectRangeCheck checker(this, radius);
MaNGOS::PlayerSearcher<MaNGOS::AnyPlayerInObjectRangeCheck> searcher(this, player, checker); Trinity::PlayerSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(this, player, checker);
VisitNearbyWorldObject(radius, searcher); VisitNearbyWorldObject(radius, searcher);
ok = player; ok = player;
} }
@@ -867,8 +867,8 @@ void GameObject::TriggeringLinkedGameObject(uint32 trapEntry, Unit* target)
Cell cell(p); Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
MaNGOS::NearestGameObjectEntryInObjectRangeCheck go_check(*target,trapEntry,range); Trinity::NearestGameObjectEntryInObjectRangeCheck go_check(*target,trapEntry,range);
MaNGOS::GameObjectLastSearcher<MaNGOS::NearestGameObjectEntryInObjectRangeCheck> checker(this, trapGO,go_check); Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectEntryInObjectRangeCheck> checker(this, trapGO,go_check);
TypeContainerVisitor<Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectEntryInObjectRangeCheck>, GridTypeMapContainer > object_checker(checker); TypeContainerVisitor<Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectEntryInObjectRangeCheck>, GridTypeMapContainer > object_checker(checker);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
@@ -888,8 +888,8 @@ GameObject* GameObject::LookupFishingHoleAround(float range)
CellPair p(Trinity::ComputeCellPair(GetPositionX(),GetPositionY())); CellPair p(Trinity::ComputeCellPair(GetPositionX(),GetPositionY()));
Cell cell(p); Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
MaNGOS::NearestGameObjectFishingHole u_check(*this, range); Trinity::NearestGameObjectFishingHole u_check(*this, range);
MaNGOS::GameObjectSearcher<MaNGOS::NearestGameObjectFishingHole> checker(this, ok, u_check); Trinity::GameObjectSearcher<Trinity::NearestGameObjectFishingHole> checker(this, ok, u_check);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
+6 -6
View File
@@ -38,7 +38,7 @@ class Player;
namespace Trinity namespace Trinity
{ {
struct MANGOS_DLL_DECL VisibleNotifier struct TRINITY_DLL_DECL VisibleNotifier
{ {
bool force; bool force;
Player &i_player; Player &i_player;
@@ -57,7 +57,7 @@ namespace Trinity
void SendToSelf(void); void SendToSelf(void);
}; };
struct MANGOS_DLL_DECL Player2PlayerNotifier : public VisibleNotifier struct TRINITY_DLL_DECL Player2PlayerNotifier : public VisibleNotifier
{ {
Player2PlayerNotifier(Player &player, bool forced = false) : Player2PlayerNotifier(Player &player, bool forced = false) :
VisibleNotifier(player, forced) {} VisibleNotifier(player, forced) {}
@@ -81,7 +81,7 @@ namespace Trinity
void Notify(void); void Notify(void);
}; };
struct MANGOS_DLL_DECL PlayerRelocationNotifier struct TRINITY_DLL_DECL PlayerRelocationNotifier
{ {
Player &i_player; Player &i_player;
PlayerRelocationNotifier(Player &pl) : i_player(pl) {} PlayerRelocationNotifier(Player &pl) : i_player(pl) {}
@@ -113,7 +113,7 @@ namespace Trinity
void Visit(DynamicObjectMapType &); void Visit(DynamicObjectMapType &);
}; };
struct MANGOS_DLL_DECL DelayedUnitRelocation struct TRINITY_DLL_DECL DelayedUnitRelocation
{ {
typedef GridReadGuard ReadGuard; typedef GridReadGuard ReadGuard;
Map &i_map; Map &i_map;
@@ -128,7 +128,7 @@ namespace Trinity
void Notify(GridRefManager<T> &); void Notify(GridRefManager<T> &);
}; };
struct MANGOS_DLL_DECL ResetNotifier struct TRINITY_DLL_DECL ResetNotifier
{ {
uint16 reset_mask; uint16 reset_mask;
ResetNotifier(uint16 notifies) : reset_mask(notifies) {} ResetNotifier(uint16 notifies) : reset_mask(notifies) {}
@@ -480,7 +480,7 @@ namespace Trinity
}; };
template<class Do> template<class Do>
struct MANGOS_DLL_DECL CreatureWorker struct TRINITY_DLL_DECL CreatureWorker
{ {
uint32 i_phaseMask; uint32 i_phaseMask;
Do& i_do; Do& i_do;
+4 -4
View File
@@ -98,7 +98,7 @@ Trinity::PlayerVisibilityNotifier::Visit(GridRefManager<T> &m)
template<class T, class VISITOR> template<class T, class VISITOR>
inline void inline void
MaNGOS::DelayedUnitRelocation::Notify(GridRefManager<T> &m) Trinity::DelayedUnitRelocation::Notify(GridRefManager<T> &m)
{ {
for(typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter) for(typename GridRefManager<T>::iterator iter = m.begin(); iter != m.end(); ++iter)
{ {
@@ -119,7 +119,7 @@ MaNGOS::DelayedUnitRelocation::Notify(GridRefManager<T> &m)
template<class T> template<class T>
inline void inline void
MaNGOS::ResetNotifier::resetNotify(GridRefManager<T> &m) Trinity::ResetNotifier::resetNotify(GridRefManager<T> &m)
{ {
for(typename GridRefManager<T>::iterator iter=m.begin(); iter != m.end(); ++iter) for(typename GridRefManager<T>::iterator iter=m.begin(); iter != m.end(); ++iter)
iter->getSource()->ResetAllNotifiesbyMask(reset_mask); iter->getSource()->ResetAllNotifiesbyMask(reset_mask);
@@ -609,7 +609,7 @@ void Trinity::PlayerSearcher<Check>::Visit(PlayerMapType &m)
} }
template<class Builder> template<class Builder>
void MaNGOS::LocalizedPacketDo<Builder>::operator()( Player* p ) void Trinity::LocalizedPacketDo<Builder>::operator()( Player* p )
{ {
int32 loc_idx = p->GetSession()->GetSessionDbLocaleIndex(); int32 loc_idx = p->GetSession()->GetSessionDbLocaleIndex();
uint32 cache_idx = loc_idx+1; uint32 cache_idx = loc_idx+1;
@@ -634,7 +634,7 @@ void MaNGOS::LocalizedPacketDo<Builder>::operator()( Player* p )
} }
template<class Builder> template<class Builder>
void MaNGOS::LocalizedPacketListDo<Builder>::operator()( Player* p ) void Trinity::LocalizedPacketListDo<Builder>::operator()( Player* p )
{ {
int32 loc_idx = p->GetSession()->GetSessionDbLocaleIndex(); int32 loc_idx = p->GetSession()->GetSessionDbLocaleIndex();
uint32 cache_idx = loc_idx+1; uint32 cache_idx = loc_idx+1;
+1 -1
View File
@@ -918,7 +918,7 @@ void Group::GetDataForXPAtKill(Unit const* victim, uint32& count,uint32& sum_lev
if(!member_with_max_level || member_with_max_level->getLevel() < member->getLevel()) if(!member_with_max_level || member_with_max_level->getLevel() < member->getLevel())
member_with_max_level = member; member_with_max_level = member;
uint32 gray_level = MaNGOS::XP::GetGrayLevel(member->getLevel()); uint32 gray_level = Trinity::XP::GetGrayLevel(member->getLevel());
if( victim->getLevel() > gray_level && (!not_gray_member_with_max_level if( victim->getLevel() > gray_level && (!not_gray_member_with_max_level
|| not_gray_member_with_max_level->getLevel() < member->getLevel())) || not_gray_member_with_max_level->getLevel() < member->getLevel()))
not_gray_member_with_max_level = member; not_gray_member_with_max_level = member;
+5 -5
View File
@@ -110,11 +110,11 @@ void Guild::CreateDefaultGuildRanks(int locale_idx)
CharacterDatabase.PExecute("DELETE FROM guild_rank WHERE guildid='%u'", m_Id); CharacterDatabase.PExecute("DELETE FROM guild_rank WHERE guildid='%u'", m_Id);
CharacterDatabase.PExecute("DELETE FROM guild_bank_right WHERE guildid = '%u'", m_Id); CharacterDatabase.PExecute("DELETE FROM guild_bank_right WHERE guildid = '%u'", m_Id);
CreateRank(objmgr.GetMangosString(LANG_GUILD_MASTER, locale_idx), GR_RIGHT_ALL); CreateRank(objmgr.GetTrinityString(LANG_GUILD_MASTER, locale_idx), GR_RIGHT_ALL);
CreateRank(objmgr.GetMangosString(LANG_GUILD_OFFICER, locale_idx), GR_RIGHT_ALL); CreateRank(objmgr.GetTrinityString(LANG_GUILD_OFFICER, locale_idx), GR_RIGHT_ALL);
CreateRank(objmgr.GetMangosString(LANG_GUILD_VETERAN, locale_idx), GR_RIGHT_GCHATLISTEN | GR_RIGHT_GCHATSPEAK); CreateRank(objmgr.GetTrinityString(LANG_GUILD_VETERAN, locale_idx), GR_RIGHT_GCHATLISTEN | GR_RIGHT_GCHATSPEAK);
CreateRank(objmgr.GetMangosString(LANG_GUILD_MEMBER, locale_idx), GR_RIGHT_GCHATLISTEN | GR_RIGHT_GCHATSPEAK); CreateRank(objmgr.GetTrinityString(LANG_GUILD_MEMBER, locale_idx), GR_RIGHT_GCHATLISTEN | GR_RIGHT_GCHATSPEAK);
CreateRank(objmgr.GetMangosString(LANG_GUILD_INITIATE, locale_idx), GR_RIGHT_GCHATLISTEN | GR_RIGHT_GCHATSPEAK); CreateRank(objmgr.GetTrinityString(LANG_GUILD_INITIATE, locale_idx), GR_RIGHT_GCHATLISTEN | GR_RIGHT_GCHATSPEAK);
} }
bool Guild::AddMember(uint64 plGuid, uint32 plRank) bool Guild::AddMember(uint64 plGuid, uint32 plRank)
+1 -1
View File
@@ -67,7 +67,7 @@ class TRINITY_DLL_SPEC DistractMovementGenerator : public MovementGenerator
uint32 m_timer; uint32 m_timer;
}; };
class MANGOS_DLL_SPEC AssistanceDistractMovementGenerator : public DistractMovementGenerator class TRINITY_DLL_SPEC AssistanceDistractMovementGenerator : public DistractMovementGenerator
{ {
public: public:
AssistanceDistractMovementGenerator(uint32 timer) : AssistanceDistractMovementGenerator(uint32 timer) :
+1 -1
View File
@@ -115,7 +115,7 @@ class InstanceSave
bool m_canReset; bool m_canReset;
}; };
class MANGOS_DLL_DECL InstanceSaveManager : public MaNGOS::Singleton<InstanceSaveManager, MaNGOS::ClassLevelLockable<InstanceSaveManager, ACE_Thread_Mutex> > class TRINITY_DLL_DECL InstanceSaveManager : public Trinity::Singleton<InstanceSaveManager, Trinity::ClassLevelLockable<InstanceSaveManager, ACE_Thread_Mutex> >
{ {
friend class InstanceSave; friend class InstanceSave;
public: public:
+2 -2
View File
@@ -745,7 +745,7 @@ bool ChatHandler::HandleGPSCommand(const char* args)
zone_x, zone_y, ground_z, floor_z, have_map, have_vmap ); zone_x, zone_y, ground_z, floor_z, have_map, have_vmap );
sLog.outDebug("Player %s GPS call for %s '%s' (%s: %u):", sLog.outDebug("Player %s GPS call for %s '%s' (%s: %u):",
m_session ? GetNameLink().c_str() : GetMangosString(LANG_CONSOLE_COMMAND), m_session ? GetNameLink().c_str() : GetTrinityString(LANG_CONSOLE_COMMAND),
(obj->GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), obj->GetName(), (obj->GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), obj->GetName(),
(obj->GetTypeId() == TYPEID_PLAYER ? "GUID" : "Entry"), (obj->GetTypeId() == TYPEID_PLAYER ? obj->GetGUIDLow(): obj->GetEntry()) ); (obj->GetTypeId() == TYPEID_PLAYER ? "GUID" : "Entry"), (obj->GetTypeId() == TYPEID_PLAYER ? obj->GetGUIDLow(): obj->GetEntry()) );
sLog.outDebug(GetTrinityString(LANG_MAP_POSITION), sLog.outDebug(GetTrinityString(LANG_MAP_POSITION),
@@ -2526,7 +2526,7 @@ bool ChatHandler::HandleTeleNameCommand(const char * args)
std::string nameLink = playerLink(target_name); std::string nameLink = playerLink(target_name);
PSendSysMessage(LANG_TELEPORTING_TO, nameLink.c_str(), GetMangosString(LANG_OFFLINE), tele->name.c_str()); PSendSysMessage(LANG_TELEPORTING_TO, nameLink.c_str(), GetTrinityString(LANG_OFFLINE), tele->name.c_str());
Player::SavePositionInDB(tele->mapId,tele->position_x,tele->position_y,tele->position_z,tele->orientation, Player::SavePositionInDB(tele->mapId,tele->position_x,tele->position_y,tele->position_z,tele->orientation,
MapManager::Instance().GetZoneId(tele->mapId,tele->position_x,tele->position_y,tele->position_z),target_guid); MapManager::Instance().GetZoneId(tele->mapId,tele->position_x,tele->position_y,tele->position_z),target_guid);
} }
+8 -8
View File
@@ -780,7 +780,7 @@ bool ChatHandler::HandleGameObjectAddCommand(const char* args)
return false; return false;
} }
sLog.outDebug(GetMangosString(LANG_GAMEOBJECT_CURRENT), gInfo->name, db_lowGUID, x, y, z, o); sLog.outDebug(GetTrinityString(LANG_GAMEOBJECT_CURRENT), gInfo->name, db_lowGUID, x, y, z, o);
map->Add(pGameObj); map->Add(pGameObj);
@@ -3289,7 +3289,7 @@ bool ChatHandler::HandleCharacterReputationCommand(const char* args)
FactionEntry const *factionEntry = sFactionStore.LookupEntry(itr->second.ID); FactionEntry const *factionEntry = sFactionStore.LookupEntry(itr->second.ID);
char const* factionName = factionEntry ? factionEntry->name[loc] : "#Not found#"; char const* factionName = factionEntry ? factionEntry->name[loc] : "#Not found#";
ReputationRank rank = target->GetReputationMgr().GetRank(factionEntry); ReputationRank rank = target->GetReputationMgr().GetRank(factionEntry);
std::string rankName = GetMangosString(ReputationRankStrIndex[rank]); std::string rankName = GetTrinityString(ReputationRankStrIndex[rank]);
std::ostringstream ss; std::ostringstream ss;
if (m_session) if (m_session)
ss << itr->second.ID << " - |cffffffff|Hfaction:" << itr->second.ID << "|h[" << factionName << " " << localeNames[loc] << "]|h|r"; ss << itr->second.ID << " - |cffffffff|Hfaction:" << itr->second.ID << "|h[" << factionName << " " << localeNames[loc] << "]|h|r";
@@ -3299,17 +3299,17 @@ bool ChatHandler::HandleCharacterReputationCommand(const char* args)
ss << " " << rankName << " (" << target->GetReputationMgr().GetReputation(factionEntry) << ")"; ss << " " << rankName << " (" << target->GetReputationMgr().GetReputation(factionEntry) << ")";
if(itr->second.Flags & FACTION_FLAG_VISIBLE) if(itr->second.Flags & FACTION_FLAG_VISIBLE)
ss << GetMangosString(LANG_FACTION_VISIBLE); ss << GetTrinityString(LANG_FACTION_VISIBLE);
if(itr->second.Flags & FACTION_FLAG_AT_WAR) if(itr->second.Flags & FACTION_FLAG_AT_WAR)
ss << GetMangosString(LANG_FACTION_ATWAR); ss << GetTrinityString(LANG_FACTION_ATWAR);
if(itr->second.Flags & FACTION_FLAG_PEACE_FORCED) if(itr->second.Flags & FACTION_FLAG_PEACE_FORCED)
ss << GetMangosString(LANG_FACTION_PEACE_FORCED); ss << GetTrinityString(LANG_FACTION_PEACE_FORCED);
if(itr->second.Flags & FACTION_FLAG_HIDDEN) if(itr->second.Flags & FACTION_FLAG_HIDDEN)
ss << GetMangosString(LANG_FACTION_HIDDEN); ss << GetTrinityString(LANG_FACTION_HIDDEN);
if(itr->second.Flags & FACTION_FLAG_INVISIBLE_FORCED) if(itr->second.Flags & FACTION_FLAG_INVISIBLE_FORCED)
ss << GetMangosString(LANG_FACTION_INVISIBLE_FORCED); ss << GetTrinityString(LANG_FACTION_INVISIBLE_FORCED);
if(itr->second.Flags & FACTION_FLAG_INACTIVE) if(itr->second.Flags & FACTION_FLAG_INACTIVE)
ss << GetMangosString(LANG_FACTION_INACTIVE); ss << GetTrinityString(LANG_FACTION_INACTIVE);
SendSysMessage(ss.str().c_str()); SendSysMessage(ss.str().c_str());
} }
+5 -5
View File
@@ -1691,13 +1691,13 @@ bool ChatHandler::HandleCooldownCommand(const char *args)
if (!sSpellStore.LookupEntry(spell_id)) if (!sSpellStore.LookupEntry(spell_id))
{ {
PSendSysMessage(LANG_UNKNOWN_SPELL, target==m_session->GetPlayer() ? GetMangosString(LANG_YOU) : tNameLink.c_str()); PSendSysMessage(LANG_UNKNOWN_SPELL, target==m_session->GetPlayer() ? GetTrinityString(LANG_YOU) : tNameLink.c_str());
SetSentErrorMessage(true); SetSentErrorMessage(true);
return false; return false;
} }
target->RemoveSpellCooldown(spell_id,true); target->RemoveSpellCooldown(spell_id,true);
PSendSysMessage(LANG_REMOVE_COOLDOWN, spell_id, target==m_session->GetPlayer() ? GetMangosString(LANG_YOU) : tNameLink.c_str()); PSendSysMessage(LANG_REMOVE_COOLDOWN, spell_id, target==m_session->GetPlayer() ? GetTrinityString(LANG_YOU) : tNameLink.c_str());
} }
return true; return true;
} }
@@ -3837,7 +3837,7 @@ bool ChatHandler::HandleLookupFactionCommand(const char *args)
if (repState) // and then target!=NULL also if (repState) // and then target!=NULL also
{ {
ReputationRank rank = target->GetReputationMgr().GetRank(factionEntry); ReputationRank rank = target->GetReputationMgr().GetRank(factionEntry);
std::string rankName = GetMangosString(ReputationRankStrIndex[rank]); std::string rankName = GetTrinityString(ReputationRankStrIndex[rank]);
ss << " " << rankName << "|h|r (" << target->GetReputationMgr().GetReputation(factionEntry) << ")"; ss << " " << rankName << "|h|r (" << target->GetReputationMgr().GetReputation(factionEntry) << ")";
@@ -6230,8 +6230,8 @@ bool ChatHandler::HandleRespawnCommand(const char* /*args*/)
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate(); cell.SetNoCreate();
MaNGOS::RespawnDo u_do; Trinity::RespawnDo u_do;
MaNGOS::WorldObjectWorker<MaNGOS::RespawnDo> worker(pl,u_do); Trinity::WorldObjectWorker<Trinity::RespawnDo> worker(pl,u_do);
TypeContainerVisitor<Trinity::WorldObjectWorker<Trinity::RespawnDo>, GridTypeMapContainer > obj_worker(worker); TypeContainerVisitor<Trinity::WorldObjectWorker<Trinity::RespawnDo>, GridTypeMapContainer > obj_worker(worker);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
+30 -30
View File
@@ -505,7 +505,7 @@ Map::Add(T *obj)
/* /*
void Map::MessageBroadcast(Player *player, WorldPacket *msg, bool to_self) void Map::MessageBroadcast(Player *player, WorldPacket *msg, bool to_self)
{ {
CellPair p = MaNGOS::ComputeCellPair(player->GetPositionX(), player->GetPositionY()); CellPair p = Trinity::ComputeCellPair(player->GetPositionX(), player->GetPositionY());
if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP ) if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP )
{ {
@@ -520,15 +520,15 @@ void Map::MessageBroadcast(Player *player, WorldPacket *msg, bool to_self)
if( !loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)) ) if( !loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)) )
return; return;
MaNGOS::MessageDeliverer post_man(*player, msg, to_self); Trinity::MessageDeliverer post_man(*player, msg, to_self);
TypeContainerVisitor<MaNGOS::MessageDeliverer, WorldTypeMapContainer > message(post_man); TypeContainerVisitor<Trinity::MessageDeliverer, WorldTypeMapContainer > message(post_man);
CellLock<ReadGuard> cell_lock(cell, p); CellLock<ReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, message, *this, *player, GetVisibilityDistance()); cell_lock->Visit(cell_lock, message, *this, *player, GetVisibilityDistance());
} }
void Map::MessageBroadcast(WorldObject *obj, WorldPacket *msg) void Map::MessageBroadcast(WorldObject *obj, WorldPacket *msg)
{ {
CellPair p = MaNGOS::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY()); CellPair p = Trinity::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY());
if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP ) if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP )
{ {
@@ -545,15 +545,15 @@ void Map::MessageBroadcast(WorldObject *obj, WorldPacket *msg)
//TODO: currently on continents when Visibility.Distance.InFlight > Visibility.Distance.Continents //TODO: currently on continents when Visibility.Distance.InFlight > Visibility.Distance.Continents
//we have alot of blinking mobs because monster move packet send is broken... //we have alot of blinking mobs because monster move packet send is broken...
MaNGOS::ObjectMessageDeliverer post_man(*obj,msg); Trinity::ObjectMessageDeliverer post_man(*obj,msg);
TypeContainerVisitor<MaNGOS::ObjectMessageDeliverer, WorldTypeMapContainer > message(post_man); TypeContainerVisitor<Trinity::ObjectMessageDeliverer, WorldTypeMapContainer > message(post_man);
CellLock<ReadGuard> cell_lock(cell, p); CellLock<ReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, message, *this, *obj, GetVisibilityDistance()); cell_lock->Visit(cell_lock, message, *this, *obj, GetVisibilityDistance());
} }
void Map::MessageDistBroadcast(Player *player, WorldPacket *msg, float dist, bool to_self, bool own_team_only) void Map::MessageDistBroadcast(Player *player, WorldPacket *msg, float dist, bool to_self, bool own_team_only)
{ {
CellPair p = MaNGOS::ComputeCellPair(player->GetPositionX(), player->GetPositionY()); CellPair p = Trinity::ComputeCellPair(player->GetPositionX(), player->GetPositionY());
if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP ) if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP )
{ {
@@ -568,15 +568,15 @@ void Map::MessageDistBroadcast(Player *player, WorldPacket *msg, float dist, boo
if( !loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)) ) if( !loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)) )
return; return;
MaNGOS::MessageDistDeliverer post_man(*player, msg, dist, to_self, own_team_only); Trinity::MessageDistDeliverer post_man(*player, msg, dist, to_self, own_team_only);
TypeContainerVisitor<MaNGOS::MessageDistDeliverer , WorldTypeMapContainer > message(post_man); TypeContainerVisitor<Trinity::MessageDistDeliverer , WorldTypeMapContainer > message(post_man);
CellLock<ReadGuard> cell_lock(cell, p); CellLock<ReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, message, *this, *player, dist); cell_lock->Visit(cell_lock, message, *this, *player, dist);
} }
void Map::MessageDistBroadcast(WorldObject *obj, WorldPacket *msg, float dist) void Map::MessageDistBroadcast(WorldObject *obj, WorldPacket *msg, float dist)
{ {
CellPair p = MaNGOS::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY()); CellPair p = Trinity::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY());
if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP ) if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP )
{ {
@@ -591,8 +591,8 @@ void Map::MessageDistBroadcast(WorldObject *obj, WorldPacket *msg, float dist)
if( !loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)) ) if( !loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)) )
return; return;
MaNGOS::ObjectMessageDistDeliverer post_man(*obj, msg, dist); Trinity::ObjectMessageDistDeliverer post_man(*obj, msg, dist);
TypeContainerVisitor<MaNGOS::ObjectMessageDistDeliverer, WorldTypeMapContainer > message(post_man); TypeContainerVisitor<Trinity::ObjectMessageDistDeliverer, WorldTypeMapContainer > message(post_man);
CellLock<ReadGuard> cell_lock(cell, p); CellLock<ReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, message, *this, *obj, dist); cell_lock->Visit(cell_lock, message, *this, *obj, dist);
} }
@@ -2349,11 +2349,11 @@ void Map::UpdateObjectsVisibilityFor( Player* player, Cell cell, CellPair cellpa
void Map::PlayerRelocationNotify( Player* player, Cell cell, CellPair cellpair ) void Map::PlayerRelocationNotify( Player* player, Cell cell, CellPair cellpair )
{ {
CellLock<ReadGuard> cell_lock(cell, cellpair); CellLock<ReadGuard> cell_lock(cell, cellpair);
MaNGOS::PlayerRelocationNotifier relocationNotifier(*player); Trinity::PlayerRelocationNotifier relocationNotifier(*player);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
TypeContainerVisitor<MaNGOS::PlayerRelocationNotifier, GridTypeMapContainer > p2grid_relocation(relocationNotifier); TypeContainerVisitor<Trinity::PlayerRelocationNotifier, GridTypeMapContainer > p2grid_relocation(relocationNotifier);
TypeContainerVisitor<MaNGOS::PlayerRelocationNotifier, WorldTypeMapContainer > p2world_relocation(relocationNotifier); TypeContainerVisitor<Trinity::PlayerRelocationNotifier, WorldTypeMapContainer > p2world_relocation(relocationNotifier);
cell_lock->Visit(cell_lock, p2grid_relocation, *this, *player, MAX_CREATURE_ATTACK_RADIUS); cell_lock->Visit(cell_lock, p2grid_relocation, *this, *player, MAX_CREATURE_ATTACK_RADIUS);
cell_lock->Visit(cell_lock, p2world_relocation, *this, *player, MAX_CREATURE_ATTACK_RADIUS); cell_lock->Visit(cell_lock, p2world_relocation, *this, *player, MAX_CREATURE_ATTACK_RADIUS);
@@ -2362,12 +2362,12 @@ void Map::PlayerRelocationNotify( Player* player, Cell cell, CellPair cellpair )
void Map::CreatureRelocationNotify(Creature *creature, Cell cell, CellPair cellpair) void Map::CreatureRelocationNotify(Creature *creature, Cell cell, CellPair cellpair)
{ {
CellLock<ReadGuard> cell_lock(cell, cellpair); CellLock<ReadGuard> cell_lock(cell, cellpair);
MaNGOS::CreatureRelocationNotifier relocationNotifier(*creature); Trinity::CreatureRelocationNotifier relocationNotifier(*creature);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate(); // not trigger load unloaded grids at notifier call cell.SetNoCreate(); // not trigger load unloaded grids at notifier call
TypeContainerVisitor<MaNGOS::CreatureRelocationNotifier, WorldTypeMapContainer > c2world_relocation(relocationNotifier); TypeContainerVisitor<Trinity::CreatureRelocationNotifier, WorldTypeMapContainer > c2world_relocation(relocationNotifier);
TypeContainerVisitor<MaNGOS::CreatureRelocationNotifier, GridTypeMapContainer > c2grid_relocation(relocationNotifier); TypeContainerVisitor<Trinity::CreatureRelocationNotifier, GridTypeMapContainer > c2grid_relocation(relocationNotifier);
cell_lock->Visit(cell_lock, c2world_relocation, *this, *creature, MAX_CREATURE_ATTACK_RADIUS); cell_lock->Visit(cell_lock, c2world_relocation, *this, *creature, MAX_CREATURE_ATTACK_RADIUS);
cell_lock->Visit(cell_lock, c2grid_relocation, *this, *creature, MAX_CREATURE_ATTACK_RADIUS); cell_lock->Visit(cell_lock, c2grid_relocation, *this, *creature, MAX_CREATURE_ATTACK_RADIUS);
@@ -3515,14 +3515,14 @@ void Map::ScriptsProcess()
GameObject *go = NULL; GameObject *go = NULL;
int32 time_to_despawn = step.script->datalong2<5 ? 5 : (int32)step.script->datalong2; int32 time_to_despawn = step.script->datalong2<5 ? 5 : (int32)step.script->datalong2;
CellPair p(MaNGOS::ComputeCellPair(summoner->GetPositionX(), summoner->GetPositionY())); CellPair p(Trinity::ComputeCellPair(summoner->GetPositionX(), summoner->GetPositionY()));
Cell cell(p); Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
MaNGOS::GameObjectWithDbGUIDCheck go_check(*summoner,step.script->datalong); Trinity::GameObjectWithDbGUIDCheck go_check(*summoner,step.script->datalong);
MaNGOS::GameObjectSearcher<MaNGOS::GameObjectWithDbGUIDCheck> checker(summoner, go,go_check); Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck> checker(summoner, go,go_check);
TypeContainerVisitor<MaNGOS::GameObjectSearcher<MaNGOS::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > object_checker(checker); TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > object_checker(checker);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, object_checker, *summoner->GetMap()); cell_lock->Visit(cell_lock, object_checker, *summoner->GetMap());
@@ -3575,14 +3575,14 @@ void Map::ScriptsProcess()
GameObject *door = NULL; GameObject *door = NULL;
int32 time_to_close = step.script->datalong2 < 15 ? 15 : (int32)step.script->datalong2; int32 time_to_close = step.script->datalong2 < 15 ? 15 : (int32)step.script->datalong2;
CellPair p(MaNGOS::ComputeCellPair(caster->GetPositionX(), caster->GetPositionY())); CellPair p(Trinity::ComputeCellPair(caster->GetPositionX(), caster->GetPositionY()));
Cell cell(p); Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
MaNGOS::GameObjectWithDbGUIDCheck go_check(*caster,step.script->datalong); Trinity::GameObjectWithDbGUIDCheck go_check(*caster,step.script->datalong);
MaNGOS::GameObjectSearcher<MaNGOS::GameObjectWithDbGUIDCheck> checker(caster,door,go_check); Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck> checker(caster,door,go_check);
TypeContainerVisitor<MaNGOS::GameObjectSearcher<MaNGOS::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > object_checker(checker); TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > object_checker(checker);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, object_checker, *caster->GetMap()); cell_lock->Visit(cell_lock, object_checker, *caster->GetMap());
@@ -3631,14 +3631,14 @@ void Map::ScriptsProcess()
GameObject *door = NULL; GameObject *door = NULL;
int32 time_to_open = step.script->datalong2 < 15 ? 15 : (int32)step.script->datalong2; int32 time_to_open = step.script->datalong2 < 15 ? 15 : (int32)step.script->datalong2;
CellPair p(MaNGOS::ComputeCellPair(caster->GetPositionX(), caster->GetPositionY())); CellPair p(Trinity::ComputeCellPair(caster->GetPositionX(), caster->GetPositionY()));
Cell cell(p); Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
MaNGOS::GameObjectWithDbGUIDCheck go_check(*caster,step.script->datalong); Trinity::GameObjectWithDbGUIDCheck go_check(*caster,step.script->datalong);
MaNGOS::GameObjectSearcher<MaNGOS::GameObjectWithDbGUIDCheck> checker(caster,door,go_check); Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck> checker(caster,door,go_check);
TypeContainerVisitor<MaNGOS::GameObjectSearcher<MaNGOS::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > object_checker(checker); TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::GameObjectWithDbGUIDCheck>, GridTypeMapContainer > object_checker(checker);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, object_checker, *caster->GetMap()); cell_lock->Visit(cell_lock, object_checker, *caster->GetMap());
+3 -3
View File
@@ -71,7 +71,7 @@ struct WGuard
typedef RGuard<GridRWLock, ACE_Thread_Mutex> GridReadGuard; typedef RGuard<GridRWLock, ACE_Thread_Mutex> GridReadGuard;
typedef WGuard<GridRWLock, ACE_Thread_Mutex> GridWriteGuard; typedef WGuard<GridRWLock, ACE_Thread_Mutex> GridWriteGuard;
typedef MaNGOS::SingleThreaded<GridRWLock>::Lock NullGuard; typedef Trinity::SingleThreaded<GridRWLock>::Lock NullGuard;
//****************************************** //******************************************
// Map file format defines // Map file format defines
@@ -257,7 +257,7 @@ typedef UNORDERED_MAP<Creature*, CreatureMover> CreatureMoveList;
typedef std::map<uint32/*leaderDBGUID*/, CreatureGroup*> CreatureGroupHolderType; typedef std::map<uint32/*leaderDBGUID*/, CreatureGroup*> CreatureGroupHolderType;
class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::ObjectLevelLockable<Map, ACE_Thread_Mutex> class TRINITY_DLL_SPEC Map : public GridRefManager<NGridType>, public Trinity::ObjectLevelLockable<Map, ACE_Thread_Mutex>
{ {
friend class MapReference; friend class MapReference;
public: public:
@@ -508,7 +508,7 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
protected: protected:
void SetUnloadReferenceLock(const GridPair &p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadReferenceLock(on); } void SetUnloadReferenceLock(const GridPair &p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadReferenceLock(on); }
typedef MaNGOS::ObjectLevelLockable<Map, ACE_Thread_Mutex>::Lock Guard; typedef Trinity::ObjectLevelLockable<Map, ACE_Thread_Mutex>::Lock Guard;
MapEntry const* i_mapEntry; MapEntry const* i_mapEntry;
uint8 i_spawnMode; uint8 i_spawnMode;
+1 -1
View File
@@ -36,7 +36,7 @@
#include "ObjectMgr.h" #include "ObjectMgr.h"
#include "Language.h" #include "Language.h"
#define CLASS_LOCK MaNGOS::ClassLevelLockable<MapManager, ACE_Thread_Mutex> #define CLASS_LOCK Trinity::ClassLevelLockable<MapManager, ACE_Thread_Mutex>
INSTANTIATE_SINGLETON_2(MapManager, CLASS_LOCK); INSTANTIATE_SINGLETON_2(MapManager, CLASS_LOCK);
INSTANTIATE_CLASS_MUTEX(MapManager, ACE_Thread_Mutex); INSTANTIATE_CLASS_MUTEX(MapManager, ACE_Thread_Mutex);
+2 -2
View File
@@ -33,7 +33,7 @@ class Transport;
#define DEFAULT_VISIBILITY_NOTIFY_PERIOD 1000 #define DEFAULT_VISIBILITY_NOTIFY_PERIOD 1000
class MANGOS_DLL_DECL MapManager : public MaNGOS::Singleton<MapManager, MaNGOS::ClassLevelLockable<MapManager, ACE_Thread_Mutex> > class TRINITY_DLL_DECL MapManager : public Trinity::Singleton<MapManager, Trinity::ClassLevelLockable<MapManager, ACE_Thread_Mutex> >
{ {
friend class Trinity::OperatorNew<MapManager>; friend class Trinity::OperatorNew<MapManager>;
@@ -149,7 +149,7 @@ class MANGOS_DLL_DECL MapManager : public MaNGOS::Singleton<MapManager, MaNGOS::
return (iter == i_maps.end() ? NULL : iter->second); return (iter == i_maps.end() ? NULL : iter->second);
} }
typedef MaNGOS::ClassLevelLockable<MapManager, ACE_Thread_Mutex>::Lock Guard; typedef Trinity::ClassLevelLockable<MapManager, ACE_Thread_Mutex>::Lock Guard;
uint32 i_gridCleanUpDelay; uint32 i_gridCleanUpDelay;
MapMapType i_maps; MapMapType i_maps;
IntervalTimer i_timer; IntervalTimer i_timer;
+22 -22
View File
@@ -1518,7 +1518,7 @@ namespace Trinity
: i_object(obj), i_msgtype(msgtype), i_textId(textId), i_language(language), i_targetGUID(targetGUID) {} : i_object(obj), i_msgtype(msgtype), i_textId(textId), i_language(language), i_targetGUID(targetGUID) {}
void operator()(WorldPacket& data, int32 loc_idx) void operator()(WorldPacket& data, int32 loc_idx)
{ {
char const* text = objmgr.GetMangosString(i_textId,loc_idx); char const* text = objmgr.GetTrinityString(i_textId,loc_idx);
// TODO: i_object.GetName() also must be localized? // TODO: i_object.GetName() also must be localized?
i_object.BuildMonsterChat(&data,i_msgtype,text,i_language,i_object.GetNameForLocaleIdx(loc_idx),i_targetGUID); i_object.BuildMonsterChat(&data,i_msgtype,text,i_language,i_object.GetNameForLocaleIdx(loc_idx),i_targetGUID);
@@ -1541,10 +1541,10 @@ void WorldObject::MonsterSay(int32 textId, uint32 language, uint64 TargetGuid)
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate(); cell.SetNoCreate();
MaNGOS::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_SAY, textId,language,TargetGuid); Trinity::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_SAY, textId,language,TargetGuid);
MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> say_do(say_build); Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> say_do(say_build);
MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> > say_worker(this,sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY),say_do); Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> > say_worker(this,sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY),say_do);
TypeContainerVisitor<MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> >, WorldTypeMapContainer > message(say_worker); TypeContainerVisitor<Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> >, WorldTypeMapContainer > message(say_worker);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, message, *GetMap(), *this, sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY)); cell_lock->Visit(cell_lock, message, *GetMap(), *this, sWorld.getConfig(CONFIG_LISTEN_RANGE_SAY));
} }
@@ -1557,18 +1557,18 @@ void WorldObject::MonsterYell(int32 textId, uint32 language, uint64 TargetGuid)
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate(); cell.SetNoCreate();
MaNGOS::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_YELL, textId,language,TargetGuid); Trinity::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_YELL, textId,language,TargetGuid);
MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> say_do(say_build); Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> say_do(say_build);
MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> > say_worker(this,sWorld.getConfig(CONFIG_LISTEN_RANGE_YELL),say_do); Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> > say_worker(this,sWorld.getConfig(CONFIG_LISTEN_RANGE_YELL),say_do);
TypeContainerVisitor<MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> >, WorldTypeMapContainer > message(say_worker); TypeContainerVisitor<Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> >, WorldTypeMapContainer > message(say_worker);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, message, *GetMap(), *this, sWorld.getConfig(CONFIG_LISTEN_RANGE_YELL)); cell_lock->Visit(cell_lock, message, *GetMap(), *this, sWorld.getConfig(CONFIG_LISTEN_RANGE_YELL));
} }
void WorldObject::MonsterYellToZone(int32 textId, uint32 language, uint64 TargetGuid) void WorldObject::MonsterYellToZone(int32 textId, uint32 language, uint64 TargetGuid)
{ {
MaNGOS::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_YELL, textId,language,TargetGuid); Trinity::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_YELL, textId,language,TargetGuid);
MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> say_do(say_build); Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> say_do(say_build);
uint32 zoneid = GetZoneId(); uint32 zoneid = GetZoneId();
@@ -1586,10 +1586,10 @@ void WorldObject::MonsterTextEmote(int32 textId, uint64 TargetGuid, bool IsBossE
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate(); cell.SetNoCreate();
MaNGOS::MonsterChatBuilder say_build(*this, IsBossEmote ? CHAT_MSG_RAID_BOSS_EMOTE : CHAT_MSG_MONSTER_EMOTE, textId,LANG_UNIVERSAL,TargetGuid); Trinity::MonsterChatBuilder say_build(*this, IsBossEmote ? CHAT_MSG_RAID_BOSS_EMOTE : CHAT_MSG_MONSTER_EMOTE, textId,LANG_UNIVERSAL,TargetGuid);
MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> say_do(say_build); Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> say_do(say_build);
MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> > say_worker(this,sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE),say_do); Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> > say_worker(this,sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE),say_do);
TypeContainerVisitor<MaNGOS::PlayerDistWorker<MaNGOS::LocalizedPacketDo<MaNGOS::MonsterChatBuilder> >, WorldTypeMapContainer > message(say_worker); TypeContainerVisitor<Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> >, WorldTypeMapContainer > message(say_worker);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, message, *GetMap(), *this, sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE)); cell_lock->Visit(cell_lock, message, *GetMap(), *this, sWorld.getConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE));
} }
@@ -2003,7 +2003,7 @@ void WorldObject::GetCreatureListWithEntryInGrid(std::list<Creature*>& lList, ui
} }
/* /*
namespace MaNGOS namespace Trinity
{ {
class NearUsedPosDo class NearUsedPosDo
{ {
@@ -2072,7 +2072,7 @@ namespace MaNGOS
float i_angle; float i_angle;
ObjectPosSelector& i_selector; ObjectPosSelector& i_selector;
}; };
} // namespace MaNGOS } // namespace Trinity
*/ */
//=================================================================================================== //===================================================================================================
@@ -2110,16 +2110,16 @@ void WorldObject::GetNearPoint(WorldObject const* searcher, float &x, float &y,
// adding used positions around object // adding used positions around object
{ {
CellPair p(MaNGOS::ComputeCellPair(GetPositionX(), GetPositionY())); CellPair p(Trinity::ComputeCellPair(GetPositionX(), GetPositionY()));
Cell cell(p); Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate(); cell.SetNoCreate();
MaNGOS::NearUsedPosDo u_do(*this,searcher,absAngle,selector); Trinity::NearUsedPosDo u_do(*this,searcher,absAngle,selector);
MaNGOS::WorldObjectWorker<MaNGOS::NearUsedPosDo> worker(this,u_do); Trinity::WorldObjectWorker<Trinity::NearUsedPosDo> worker(this,u_do);
TypeContainerVisitor<MaNGOS::WorldObjectWorker<MaNGOS::NearUsedPosDo>, GridTypeMapContainer > grid_obj_worker(worker); TypeContainerVisitor<Trinity::WorldObjectWorker<Trinity::NearUsedPosDo>, GridTypeMapContainer > grid_obj_worker(worker);
TypeContainerVisitor<MaNGOS::WorldObjectWorker<MaNGOS::NearUsedPosDo>, WorldTypeMapContainer > world_obj_worker(worker); TypeContainerVisitor<Trinity::WorldObjectWorker<Trinity::NearUsedPosDo>, WorldTypeMapContainer > world_obj_worker(worker);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, grid_obj_worker, *GetMap(), *this, distance2d); cell_lock->Visit(cell_lock, grid_obj_worker, *GetMap(), *this, distance2d);
+1 -1
View File
@@ -41,7 +41,7 @@
#include <cmath> #include <cmath>
#define CLASS_LOCK MaNGOS::ClassLevelLockable<ObjectAccessor, ACE_Thread_Mutex> #define CLASS_LOCK Trinity::ClassLevelLockable<ObjectAccessor, ACE_Thread_Mutex>
INSTANTIATE_SINGLETON_2(ObjectAccessor, CLASS_LOCK); INSTANTIATE_SINGLETON_2(ObjectAccessor, CLASS_LOCK);
INSTANTIATE_CLASS_MUTEX(ObjectAccessor, ACE_Thread_Mutex); INSTANTIATE_CLASS_MUTEX(ObjectAccessor, ACE_Thread_Mutex);
+3 -3
View File
@@ -50,7 +50,7 @@ class HashMapHolder
typedef UNORDERED_MAP< uint64, T* > MapType; typedef UNORDERED_MAP< uint64, T* > MapType;
typedef ACE_Thread_Mutex LockType; typedef ACE_Thread_Mutex LockType;
typedef MaNGOS::GeneralLock<LockType > Guard; typedef Trinity::GeneralLock<LockType > Guard;
static void Insert(T* o) static void Insert(T* o)
{ {
@@ -83,7 +83,7 @@ class HashMapHolder
static MapType m_objectMap; static MapType m_objectMap;
}; };
class MANGOS_DLL_DECL ObjectAccessor : public MaNGOS::Singleton<ObjectAccessor, MaNGOS::ClassLevelLockable<ObjectAccessor, ACE_Thread_Mutex> > class TRINITY_DLL_DECL ObjectAccessor : public Trinity::Singleton<ObjectAccessor, Trinity::ClassLevelLockable<ObjectAccessor, ACE_Thread_Mutex> >
{ {
friend class Trinity::OperatorNew<ObjectAccessor>; friend class Trinity::OperatorNew<ObjectAccessor>;
@@ -255,7 +255,7 @@ class MANGOS_DLL_DECL ObjectAccessor : public MaNGOS::Singleton<ObjectAccessor,
Player2CorpsesMapType i_player2corpse; Player2CorpsesMapType i_player2corpse;
typedef ACE_Thread_Mutex LockType; typedef ACE_Thread_Mutex LockType;
typedef MaNGOS::GeneralLock<LockType > Guard; typedef Trinity::GeneralLock<LockType > Guard;
static void _buildChangeObjectForPlayer(WorldObject *, UpdateDataMapType &); static void _buildChangeObjectForPlayer(WorldObject *, UpdateDataMapType &);
static void _buildPacket(Player *, Object *, UpdateDataMapType &); static void _buildPacket(Player *, Object *, UpdateDataMapType &);
+1 -1
View File
@@ -6725,7 +6725,7 @@ void ObjectMgr::LoadPointsOfInterest()
POI.data = fields[5].GetUInt32(); POI.data = fields[5].GetUInt32();
POI.icon_name = fields[6].GetCppString(); POI.icon_name = fields[6].GetCppString();
if (!MaNGOS::IsValidMapCoord(POI.x,POI.y)) if (!Trinity::IsValidMapCoord(POI.x,POI.y))
{ {
sLog.outErrorDb("Table `points_of_interest` (Entry: %u) have invalid coordinates (X: %f Y: %f), ignored.",point_id,POI.x,POI.y); sLog.outErrorDb("Table `points_of_interest` (Entry: %u) have invalid coordinates (X: %f Y: %f), ignored.",point_id,POI.x,POI.y);
continue; continue;
+5 -5
View File
@@ -6163,7 +6163,7 @@ int32 Player::CalculateReputationGain(uint32 creatureOrQuestLevel, int32 rep, in
float rate = for_quest ? sWorld.getRate(RATE_REPUTATION_LOWLEVEL_QUEST) : sWorld.getRate(RATE_REPUTATION_LOWLEVEL_KILL); float rate = for_quest ? sWorld.getRate(RATE_REPUTATION_LOWLEVEL_QUEST) : sWorld.getRate(RATE_REPUTATION_LOWLEVEL_KILL);
if (rate != 1.0f && creatureOrQuestLevel <= MaNGOS::XP::GetGrayLevel(getLevel())) if (rate != 1.0f && creatureOrQuestLevel <= Trinity::XP::GetGrayLevel(getLevel()))
percent *= rate; percent *= rate;
float repMod = GetTotalAuraModifier(SPELL_AURA_MOD_REPUTATION_GAIN); float repMod = GetTotalAuraModifier(SPELL_AURA_MOD_REPUTATION_GAIN);
@@ -13717,7 +13717,7 @@ void Player::RewardQuest( Quest const *pQuest, uint32 reward, Object* questGiver
// honor reward // honor reward
if (pQuest->GetRewHonorableKills()) if (pQuest->GetRewHonorableKills())
RewardHonor(NULL, 0, MaNGOS::Honor::hk_honor_at_level(getLevel(), pQuest->GetRewHonorableKills())); RewardHonor(NULL, 0, Trinity::Honor::hk_honor_at_level(getLevel(), pQuest->GetRewHonorableKills()));
// title reward // title reward
if (pQuest->GetCharTitleId()) if (pQuest->GetCharTitleId())
@@ -15351,7 +15351,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
m_movementInfo.t_z = fields[29].GetFloat(); m_movementInfo.t_z = fields[29].GetFloat();
m_movementInfo.t_o = fields[30].GetFloat(); m_movementInfo.t_o = fields[30].GetFloat();
if( !MaNGOS::IsValidMapCoord( if( !Trinity::IsValidMapCoord(
GetPositionX()+m_movementInfo.t_x,GetPositionY()+m_movementInfo.t_y, GetPositionX()+m_movementInfo.t_x,GetPositionY()+m_movementInfo.t_y,
GetPositionZ()+m_movementInfo.t_z,GetOrientation()+m_movementInfo.t_o) || GetPositionZ()+m_movementInfo.t_z,GetOrientation()+m_movementInfo.t_o) ||
// transport size limited // transport size limited
@@ -16061,7 +16061,7 @@ void Player::_LoadInventory(QueryResult *result, uint32 timediff)
// send by mail problematic items // send by mail problematic items
while (!problematicItems.empty()) while (!problematicItems.empty())
{ {
std::string subject = GetSession()->GetMangosString(LANG_NOT_EQUIPPED_ITEM); std::string subject = GetSession()->GetTrinityString(LANG_NOT_EQUIPPED_ITEM);
// fill mail // fill mail
MailDraft draft(subject); MailDraft draft(subject);
@@ -20569,7 +20569,7 @@ void Player::AutoUnequipOffhandIfNeed(bool force /*= false*/)
offItem->SaveToDB(); // recursive and not have transaction guard into self, item not in inventory and can be save standalone offItem->SaveToDB(); // recursive and not have transaction guard into self, item not in inventory and can be save standalone
CharacterDatabase.CommitTransaction(); CharacterDatabase.CommitTransaction();
std::string subject = GetSession()->GetMangosString(LANG_NOT_EQUIPPED_ITEM); std::string subject = GetSession()->GetTrinityString(LANG_NOT_EQUIPPED_ITEM);
MailDraft(subject).AddItem(offItem).SendMailTo(this, MailSender(this, MAIL_STATIONERY_GM)); MailDraft(subject).AddItem(offItem).SendMailTo(this, MailSender(this, MAIL_STATIONERY_GM));
} }
} }
+1 -1
View File
@@ -960,7 +960,7 @@ struct BGData
bool HasTaxiPath() const { return taxiPath[0] && taxiPath[1]; } bool HasTaxiPath() const { return taxiPath[0] && taxiPath[1]; }
}; };
class MANGOS_DLL_SPEC Player : public Unit class TRINITY_DLL_SPEC Player : public Unit
{ {
friend class WorldSession; friend class WorldSession;
friend void Item::AddToUpdateQueueOf(Player *player); friend void Item::AddToUpdateQueueOf(Player *player);
+1 -1
View File
@@ -52,7 +52,7 @@ class TRINITY_DLL_SPEC PointMovementGenerator
bool arrived; bool arrived;
}; };
class MANGOS_DLL_SPEC AssistanceMovementGenerator class TRINITY_DLL_SPEC AssistanceMovementGenerator
: public PointMovementGenerator<Creature> : public PointMovementGenerator<Creature>
{ {
public: public:
+1 -1
View File
@@ -99,5 +99,5 @@ class PoolHandler
}; };
#define poolhandler MaNGOS::Singleton<PoolHandler>::Instance() #define poolhandler Trinity::Singleton<PoolHandler>::Instance()
#endif #endif
+16 -16
View File
@@ -505,7 +505,7 @@ WorldObject* Spell::FindCorpseUsing()
// non-standard target selection // non-standard target selection
float max_range = GetSpellMaxRange(m_spellInfo, false); float max_range = GetSpellMaxRange(m_spellInfo, false);
CellPair p(MaNGOS::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); CellPair p(Trinity::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY()));
Cell cell(p); Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate(); cell.SetNoCreate();
@@ -513,15 +513,15 @@ WorldObject* Spell::FindCorpseUsing()
WorldObject* result = NULL; WorldObject* result = NULL;
T u_check(m_caster, max_range); T u_check(m_caster, max_range);
MaNGOS::WorldObjectSearcher<T> searcher(m_caster, result, u_check); Trinity::WorldObjectSearcher<T> searcher(m_caster, result, u_check);
TypeContainerVisitor<MaNGOS::WorldObjectSearcher<T>, GridTypeMapContainer > grid_searcher(searcher); TypeContainerVisitor<Trinity::WorldObjectSearcher<T>, GridTypeMapContainer > grid_searcher(searcher);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, grid_searcher, *m_caster->GetMap(), *m_caster, max_range); cell_lock->Visit(cell_lock, grid_searcher, *m_caster->GetMap(), *m_caster, max_range);
if (!result) if (!result)
{ {
TypeContainerVisitor<MaNGOS::WorldObjectSearcher<T>, WorldTypeMapContainer > world_searcher(searcher); TypeContainerVisitor<Trinity::WorldObjectSearcher<T>, WorldTypeMapContainer > world_searcher(searcher);
cell_lock->Visit(cell_lock, world_searcher, *m_caster->GetMap(), *m_caster, max_range); cell_lock->Visit(cell_lock, world_searcher, *m_caster->GetMap(), *m_caster, max_range);
} }
@@ -587,7 +587,7 @@ void Spell::SelectSpellTargets()
{ {
case 20577: // Cannibalize case 20577: // Cannibalize
{ {
WorldObject* result = FindCorpseUsing<MaNGOS::CannibalizeObjectCheck> (); WorldObject* result = FindCorpseUsing<Trinity::CannibalizeObjectCheck> ();
if(result) if(result)
{ {
@@ -2288,7 +2288,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
case 46584: // Raise Dead case 46584: // Raise Dead
{ {
m_targets.m_targetMask &= ~TARGET_FLAG_DEST_LOCATION; m_targets.m_targetMask &= ~TARGET_FLAG_DEST_LOCATION;
if (WorldObject* result = FindCorpseUsing<MaNGOS::RaiseDeadObjectCheck> ()) if (WorldObject* result = FindCorpseUsing<Trinity::RaiseDeadObjectCheck> ())
{ {
switch(result->GetTypeId()) switch(result->GetTypeId())
{ {
@@ -4640,14 +4640,14 @@ SpellCastResult Spell::CheckCast(bool strict)
if (i_spellST->second.targetEntry) if (i_spellST->second.targetEntry)
{ {
CellPair p(MaNGOS::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); CellPair p(Trinity::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY()));
Cell cell(p); Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
MaNGOS::NearestGameObjectEntryInObjectRangeCheck go_check(*m_caster,i_spellST->second.targetEntry,range); Trinity::NearestGameObjectEntryInObjectRangeCheck go_check(*m_caster,i_spellST->second.targetEntry,range);
MaNGOS::GameObjectLastSearcher<MaNGOS::NearestGameObjectEntryInObjectRangeCheck> checker(m_caster, p_GameObject,go_check); Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectEntryInObjectRangeCheck> checker(m_caster, p_GameObject,go_check);
TypeContainerVisitor<MaNGOS::GameObjectLastSearcher<MaNGOS::NearestGameObjectEntryInObjectRangeCheck>, GridTypeMapContainer > object_checker(checker); TypeContainerVisitor<Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectEntryInObjectRangeCheck>, GridTypeMapContainer > object_checker(checker);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, object_checker, *m_caster->GetMap()); cell_lock->Visit(cell_lock, object_checker, *m_caster->GetMap());
@@ -4677,15 +4677,15 @@ SpellCastResult Spell::CheckCast(bool strict)
{ {
Creature *p_Creature = NULL; Creature *p_Creature = NULL;
CellPair p(MaNGOS::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY())); CellPair p(Trinity::ComputeCellPair(m_caster->GetPositionX(), m_caster->GetPositionY()));
Cell cell(p); Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate(); // Really don't know what is that??? cell.SetNoCreate(); // Really don't know what is that???
MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck u_check(*m_caster,i_spellST->second.targetEntry,i_spellST->second.type!=SPELL_TARGET_TYPE_DEAD,range); Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck u_check(*m_caster,i_spellST->second.targetEntry,i_spellST->second.type!=SPELL_TARGET_TYPE_DEAD,range);
MaNGOS::CreatureLastSearcher<MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(m_caster, p_Creature, u_check); Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(m_caster, p_Creature, u_check);
TypeContainerVisitor<MaNGOS::CreatureLastSearcher<MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck>, GridTypeMapContainer > grid_creature_searcher(searcher); TypeContainerVisitor<Trinity::CreatureLastSearcher<Trinity::NearestCreatureEntryWithLiveStateInObjectRangeCheck>, GridTypeMapContainer > grid_creature_searcher(searcher);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, grid_creature_searcher, *m_caster->GetMap(), *m_caster, range); cell_lock->Visit(cell_lock, grid_creature_searcher, *m_caster->GetMap(), *m_caster, range);
@@ -5650,8 +5650,8 @@ SpellCastResult Spell::CheckItems()
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
GameObject* ok = NULL; GameObject* ok = NULL;
MaNGOS::GameObjectFocusCheck go_check(m_caster,m_spellInfo->RequiresSpellFocus); Trinity::GameObjectFocusCheck go_check(m_caster,m_spellInfo->RequiresSpellFocus);
MaNGOS::GameObjectSearcher<MaNGOS::GameObjectFocusCheck> checker(m_caster, ok, go_check); Trinity::GameObjectSearcher<Trinity::GameObjectFocusCheck> checker(m_caster, ok, go_check);
TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::GameObjectFocusCheck>, GridTypeMapContainer > object_checker(checker); TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::GameObjectFocusCheck>, GridTypeMapContainer > object_checker(checker);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
+1 -1
View File
@@ -425,7 +425,7 @@ class Spell
void CheckSrc() { if(!m_targets.HasSrc()) m_targets.setSrc(m_caster); } void CheckSrc() { if(!m_targets.HasSrc()) m_targets.setSrc(m_caster); }
void CheckDst() { if(!m_targets.HasDst()) m_targets.setDst(m_caster); } void CheckDst() { if(!m_targets.HasDst()) m_targets.setDst(m_caster); }
static void MANGOS_DLL_SPEC SendCastResult(Player* caster, SpellEntry const* spellInfo, uint8 cast_count, SpellCastResult result); static void TRINITY_DLL_SPEC SendCastResult(Player* caster, SpellEntry const* spellInfo, uint8 cast_count, SpellCastResult result);
void SendCastResult(SpellCastResult result); void SendCastResult(SpellCastResult result);
void SendSpellStart(); void SendSpellStart();
void SendSpellGo(); void SendSpellGo();
+5 -5
View File
@@ -6786,15 +6786,15 @@ void AuraEffect::PeriodicDummyTick()
// eff_radius ==0 // eff_radius ==0
float radius = GetSpellMaxRange(spell, false); float radius = GetSpellMaxRange(spell, false);
CellPair p(MaNGOS::ComputeCellPair(caster->GetPositionX(),caster->GetPositionY())); CellPair p(Trinity::ComputeCellPair(caster->GetPositionX(),caster->GetPositionY()));
Cell cell(p); Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
MaNGOS::AnyUnfriendlyVisibleUnitInObjectRangeCheck u_check(caster, caster, radius); Trinity::AnyUnfriendlyVisibleUnitInObjectRangeCheck u_check(caster, caster, radius);
MaNGOS::UnitListSearcher<MaNGOS::AnyUnfriendlyVisibleUnitInObjectRangeCheck> checker(caster,targets, u_check); Trinity::UnitListSearcher<Trinity::AnyUnfriendlyVisibleUnitInObjectRangeCheck> checker(caster,targets, u_check);
TypeContainerVisitor<MaNGOS::UnitListSearcher<MaNGOS::AnyUnfriendlyVisibleUnitInObjectRangeCheck>, GridTypeMapContainer > grid_object_checker(checker); TypeContainerVisitor<Trinity::UnitListSearcher<Trinity::AnyUnfriendlyVisibleUnitInObjectRangeCheck>, GridTypeMapContainer > grid_object_checker(checker);
TypeContainerVisitor<MaNGOS::UnitListSearcher<MaNGOS::AnyUnfriendlyVisibleUnitInObjectRangeCheck>, WorldTypeMapContainer > world_object_checker(checker); TypeContainerVisitor<Trinity::UnitListSearcher<Trinity::AnyUnfriendlyVisibleUnitInObjectRangeCheck>, WorldTypeMapContainer > world_object_checker(checker);
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
+1 -1
View File
@@ -3960,7 +3960,7 @@ void Spell::EffectAddHonor(uint32 /*i*/)
// do not allow to add too many honor for player (50 * 21) = 1040 at level 70, or (50 * 31) = 1550 at level 80 // do not allow to add too many honor for player (50 * 21) = 1040 at level 70, or (50 * 31) = 1550 at level 80
if (damage <= 50) if (damage <= 50)
{ {
uint32 honor_reward = MaNGOS::Honor::hk_honor_at_level(unitTarget->getLevel(), damage); uint32 honor_reward = Trinity::Honor::hk_honor_at_level(unitTarget->getLevel(), damage);
((Player*)unitTarget)->RewardHonor(NULL, 1, honor_reward); ((Player*)unitTarget)->RewardHonor(NULL, 1, honor_reward);
sLog.outDebug("SpellEffect::AddHonor (spell_id %u) rewards %u honor points (scale) to player: %u", m_spellInfo->Id, honor_reward, ((Player*)unitTarget)->GetGUIDLow()); sLog.outDebug("SpellEffect::AddHonor (spell_id %u) rewards %u honor points (scale) to player: %u", m_spellInfo->Id, honor_reward, ((Player*)unitTarget)->GetGUIDLow());
} }
+7 -7
View File
@@ -2026,7 +2026,7 @@ void World::SendGlobalGMMessage(WorldPacket *packet, WorldSession *self, uint32
} }
} }
namespace MaNGOS namespace Trinity
{ {
class WorldWorldTextBuilder class WorldWorldTextBuilder
{ {
@@ -2035,7 +2035,7 @@ namespace MaNGOS
explicit WorldWorldTextBuilder(int32 textId, va_list* args = NULL) : i_textId(textId), i_args(args) {} explicit WorldWorldTextBuilder(int32 textId, va_list* args = NULL) : i_textId(textId), i_args(args) {}
void operator()(WorldPacketList& data_list, int32 loc_idx) void operator()(WorldPacketList& data_list, int32 loc_idx)
{ {
char const* text = objmgr.GetMangosString(i_textId,loc_idx); char const* text = objmgr.GetTrinityString(i_textId,loc_idx);
if (i_args) if (i_args)
{ {
@@ -2081,7 +2081,7 @@ namespace MaNGOS
int32 i_textId; int32 i_textId;
va_list* i_args; va_list* i_args;
}; };
} // namespace MaNGOS } // namespace Trinity
/// Send a System Message to all players (except self if mentioned) /// Send a System Message to all players (except self if mentioned)
void World::SendWorldText(int32 string_id, ...) void World::SendWorldText(int32 string_id, ...)
@@ -2089,8 +2089,8 @@ void World::SendWorldText(int32 string_id, ...)
va_list ap; va_list ap;
va_start(ap, string_id); va_start(ap, string_id);
MaNGOS::WorldWorldTextBuilder wt_builder(string_id, &ap); Trinity::WorldWorldTextBuilder wt_builder(string_id, &ap);
MaNGOS::LocalizedPacketListDo<MaNGOS::WorldWorldTextBuilder> wt_do(wt_builder); Trinity::LocalizedPacketListDo<Trinity::WorldWorldTextBuilder> wt_do(wt_builder);
for (SessionMap::const_iterator itr = m_sessions.begin(); itr != m_sessions.end(); ++itr) for (SessionMap::const_iterator itr = m_sessions.begin(); itr != m_sessions.end(); ++itr)
{ {
if (!itr->second || !itr->second->GetPlayer() || !itr->second->GetPlayer()->IsInWorld()) if (!itr->second || !itr->second->GetPlayer() || !itr->second->GetPlayer()->IsInWorld())
@@ -2108,8 +2108,8 @@ void World::SendGMText(int32 string_id, ...)
va_list ap; va_list ap;
va_start(ap, string_id); va_start(ap, string_id);
MaNGOS::WorldWorldTextBuilder wt_builder(string_id, &ap); Trinity::WorldWorldTextBuilder wt_builder(string_id, &ap);
MaNGOS::LocalizedPacketListDo<MaNGOS::WorldWorldTextBuilder> wt_do(wt_builder); Trinity::LocalizedPacketListDo<Trinity::WorldWorldTextBuilder> wt_do(wt_builder);
for (SessionMap::iterator itr = m_sessions.begin(); itr != m_sessions.end(); ++itr) for (SessionMap::iterator itr = m_sessions.begin(); itr != m_sessions.end(); ++itr)
{ {
if (!itr->second || !itr->second->GetPlayer() || !itr->second->GetPlayer()->IsInWorld()) if (!itr->second || !itr->second->GetPlayer() || !itr->second->GetPlayer()->IsInWorld())
+1 -1
View File
@@ -27,7 +27,7 @@
#include "Config/ConfigEnv.h" #include "Config/ConfigEnv.h"
#include "Log.h" #include "Log.h"
#define CLASS_LOCK MaNGOS::ClassLevelLockable<WorldLog, ACE_Thread_Mutex> #define CLASS_LOCK Trinity::ClassLevelLockable<WorldLog, ACE_Thread_Mutex>
INSTANTIATE_SINGLETON_2(WorldLog, CLASS_LOCK); INSTANTIATE_SINGLETON_2(WorldLog, CLASS_LOCK);
INSTANTIATE_CLASS_MUTEX(WorldLog, ACE_Thread_Mutex); INSTANTIATE_CLASS_MUTEX(WorldLog, ACE_Thread_Mutex);
+2 -2
View File
@@ -32,13 +32,13 @@
#include <stdarg.h> #include <stdarg.h>
/// %Log packets to a file /// %Log packets to a file
class MANGOS_DLL_DECL WorldLog : public MaNGOS::Singleton<WorldLog, MaNGOS::ClassLevelLockable<WorldLog, ACE_Thread_Mutex> > class TRINITY_DLL_DECL WorldLog : public Trinity::Singleton<WorldLog, Trinity::ClassLevelLockable<WorldLog, ACE_Thread_Mutex> >
{ {
friend class Trinity::OperatorNew<WorldLog>; friend class Trinity::OperatorNew<WorldLog>;
WorldLog(); WorldLog();
WorldLog(const WorldLog &); WorldLog(const WorldLog &);
WorldLog& operator=(const WorldLog &); WorldLog& operator=(const WorldLog &);
typedef MaNGOS::ClassLevelLockable<WorldLog, ACE_Thread_Mutex>::Lock Guard; typedef Trinity::ClassLevelLockable<WorldLog, ACE_Thread_Mutex>::Lock Guard;
/// Close the file in destructor /// Close the file in destructor
~WorldLog(); ~WorldLog();
+1 -1
View File
@@ -46,7 +46,7 @@ class TRINITY_DLL_SPEC QueryResult
typedef std::vector<std::string> QueryFieldNames; typedef std::vector<std::string> QueryFieldNames;
class MANGOS_DLL_SPEC QueryNamedResult class TRINITY_DLL_SPEC QueryNamedResult
{ {
public: public:
explicit QueryNamedResult(QueryResult* query, QueryFieldNames const& names) : mQuery(query), mFieldNames(names) {} explicit QueryNamedResult(QueryResult* query, QueryFieldNames const& names) : mQuery(query), mFieldNames(names) {}
+1 -1
View File
@@ -71,7 +71,7 @@ class SqlResultQueue; /// queue for thread
class SqlQueryHolder; /// groups several async quries class SqlQueryHolder; /// groups several async quries
class SqlQueryHolderEx; /// points to a holder, added to the delay thread class SqlQueryHolderEx; /// points to a holder, added to the delay thread
class SqlResultQueue : public ACE_Based::LockedQueue<MaNGOS::IQueryCallback* , ACE_Thread_Mutex> class SqlResultQueue : public ACE_Based::LockedQueue<Trinity::IQueryCallback* , ACE_Thread_Mutex>
{ {
public: public:
SqlResultQueue() {} SqlResultQueue() {}