Refactoring of BNetServer
This commit is contained in:
@@ -20,12 +20,12 @@ using Framework.GameMath;
|
||||
using Game.AI;
|
||||
using Game.Maps;
|
||||
using Game.Movement;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Framework.Dynamic;
|
||||
using Game.Network;
|
||||
using Game.Networking;
|
||||
|
||||
namespace Game.Entities
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using Framework.Dynamic;
|
||||
using Game.Network;
|
||||
using Game.Networking;
|
||||
|
||||
namespace Game.Entities
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ using Game.DataStorage;
|
||||
using Game.Maps;
|
||||
using Game.Spells;
|
||||
using System.Collections.Generic;
|
||||
using Game.Network;
|
||||
using Game.Networking;
|
||||
|
||||
namespace Game.Entities
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ using Game.Maps;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Framework.Collections;
|
||||
using Game.Network;
|
||||
using Game.Networking;
|
||||
|
||||
namespace Game.Entities
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ using Game.DataStorage;
|
||||
using Game.Groups;
|
||||
using Game.Loots;
|
||||
using Game.Maps;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -2561,9 +2561,9 @@ namespace Game.Entities
|
||||
return vCount.count;
|
||||
}
|
||||
|
||||
public override string GetName(LocaleConstant locale = LocaleConstant.enUS)
|
||||
public override string GetName(Locale locale = Locale.enUS)
|
||||
{
|
||||
if (locale != LocaleConstant.enUS)
|
||||
if (locale != Locale.enUS)
|
||||
{
|
||||
CreatureLocale cl = Global.ObjectMgr.GetCreatureLocale(GetEntry());
|
||||
if (cl != null)
|
||||
|
||||
@@ -20,7 +20,7 @@ using Framework.Constants;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Framework.Dynamic;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
|
||||
namespace Game.Entities
|
||||
{
|
||||
@@ -309,10 +309,10 @@ namespace Game.Entities
|
||||
|
||||
public class CreatureLocale
|
||||
{
|
||||
public StringArray Name = new StringArray((int)LocaleConstant.Total);
|
||||
public StringArray NameAlt = new StringArray((int)LocaleConstant.Total);
|
||||
public StringArray Title = new StringArray((int)LocaleConstant.Total);
|
||||
public StringArray TitleAlt = new StringArray((int)LocaleConstant.Total);
|
||||
public StringArray Name = new StringArray((int)Locale.Total);
|
||||
public StringArray NameAlt = new StringArray((int)Locale.Total);
|
||||
public StringArray Title = new StringArray((int)Locale.Total);
|
||||
public StringArray TitleAlt = new StringArray((int)Locale.Total);
|
||||
}
|
||||
|
||||
public struct EquipmentItem
|
||||
|
||||
@@ -21,7 +21,7 @@ using Framework.GameMath;
|
||||
using Game.Conditions;
|
||||
using Game.DataStorage;
|
||||
using Game.Entities;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using Game.Spells;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace Game.Misc
|
||||
strBoxText = item.BoxText;
|
||||
|
||||
// Check need of localization.
|
||||
if (GetLocale() != LocaleConstant.enUS)
|
||||
if (GetLocale() != Locale.enUS)
|
||||
{
|
||||
if (optionBroadcastText == null)
|
||||
{
|
||||
@@ -181,8 +181,8 @@ namespace Game.Misc
|
||||
|
||||
public void SetMenuId(uint menu_id) { _menuId = menu_id; }
|
||||
public uint GetMenuId() { return _menuId; }
|
||||
public void SetLocale(LocaleConstant locale) { _locale = locale; }
|
||||
LocaleConstant GetLocale() { return _locale; }
|
||||
public void SetLocale(Locale locale) { _locale = locale; }
|
||||
Locale GetLocale() { return _locale; }
|
||||
|
||||
public int GetMenuItemCount()
|
||||
{
|
||||
@@ -212,7 +212,7 @@ namespace Game.Misc
|
||||
Dictionary<uint, GossipMenuItem> _menuItems = new Dictionary<uint, GossipMenuItem>();
|
||||
Dictionary<uint, GossipMenuItemData> _menuItemData = new Dictionary<uint, GossipMenuItemData>();
|
||||
uint _menuId;
|
||||
LocaleConstant _locale;
|
||||
Locale _locale;
|
||||
}
|
||||
|
||||
public class InteractionData
|
||||
@@ -284,8 +284,8 @@ namespace Game.Misc
|
||||
text.Repeatable = quest.IsRepeatable();
|
||||
|
||||
text.QuestTitle = quest.LogTitle;
|
||||
LocaleConstant locale = _session.GetSessionDbLocaleIndex();
|
||||
if (locale != LocaleConstant.enUS)
|
||||
Locale locale = _session.GetSessionDbLocaleIndex();
|
||||
if (locale != Locale.enUS)
|
||||
{
|
||||
QuestTemplateLocale localeData = Global.ObjectMgr.GetQuestLocale(quest.Id);
|
||||
if (localeData != null)
|
||||
@@ -319,8 +319,8 @@ namespace Game.Misc
|
||||
packet.Id = pointOfInterest.Id;
|
||||
packet.Name = pointOfInterest.Name;
|
||||
|
||||
LocaleConstant locale = _session.GetSessionDbLocaleIndex();
|
||||
if (locale != LocaleConstant.enUS)
|
||||
Locale locale = _session.GetSessionDbLocaleIndex();
|
||||
if (locale != Locale.enUS)
|
||||
{
|
||||
PointOfInterestLocale localeData = Global.ObjectMgr.GetPointOfInterestLocale(id);
|
||||
if (localeData != null)
|
||||
@@ -338,7 +338,7 @@ namespace Game.Misc
|
||||
public void SendQuestGiverQuestListMessage(WorldObject questgiver)
|
||||
{
|
||||
ObjectGuid guid = questgiver.GetGUID();
|
||||
LocaleConstant localeConstant = _session.GetSessionDbLocaleIndex();
|
||||
Locale localeConstant = _session.GetSessionDbLocaleIndex();
|
||||
|
||||
QuestGiverQuestListMessage questList = new QuestGiverQuestListMessage();
|
||||
questList.QuestGiverGUID = guid;
|
||||
@@ -350,7 +350,7 @@ namespace Game.Misc
|
||||
questList.GreetEmoteType = questGreeting.EmoteType;
|
||||
questList.Greeting = questGreeting.Text;
|
||||
|
||||
if (localeConstant != LocaleConstant.enUS)
|
||||
if (localeConstant != Locale.enUS)
|
||||
{
|
||||
QuestGreetingLocale questGreetingLocale = Global.ObjectMgr.GetQuestGreetingLocale(questgiver.GetTypeId(), questgiver.GetEntry());
|
||||
if (questGreetingLocale != null)
|
||||
@@ -368,7 +368,7 @@ namespace Game.Misc
|
||||
{
|
||||
string title = quest.LogTitle;
|
||||
|
||||
if (localeConstant != LocaleConstant.enUS)
|
||||
if (localeConstant != Locale.enUS)
|
||||
{
|
||||
QuestTemplateLocale localeData = Global.ObjectMgr.GetQuestLocale(quest.Id);
|
||||
if (localeData != null)
|
||||
@@ -412,8 +412,8 @@ namespace Game.Misc
|
||||
packet.PortraitTurnInText = quest.PortraitTurnInText;
|
||||
packet.PortraitTurnInName = quest.PortraitTurnInName;
|
||||
|
||||
LocaleConstant locale = _session.GetSessionDbLocaleIndex();
|
||||
if (locale != LocaleConstant.enUS)
|
||||
Locale locale = _session.GetSessionDbLocaleIndex();
|
||||
if (locale != Locale.enUS)
|
||||
{
|
||||
QuestTemplateLocale localeData = Global.ObjectMgr.GetQuestLocale(quest.Id);
|
||||
if (localeData != null)
|
||||
@@ -479,8 +479,8 @@ namespace Game.Misc
|
||||
|
||||
QueryQuestInfoResponse queryQuestInfoResponse = quest.QueryData;
|
||||
|
||||
LocaleConstant loc = _session.GetSessionDbLocaleIndex();
|
||||
if (loc != LocaleConstant.enUS)
|
||||
Locale loc = _session.GetSessionDbLocaleIndex();
|
||||
if (loc != Locale.enUS)
|
||||
{
|
||||
QuestTemplateLocale questTemplateLocale = Global.ObjectMgr.GetQuestLocale(queryQuestInfoResponse.QuestID);
|
||||
if (questTemplateLocale != null)
|
||||
@@ -519,8 +519,8 @@ namespace Game.Misc
|
||||
packet.PortraitTurnInText = quest.PortraitTurnInText;
|
||||
packet.PortraitTurnInName = quest.PortraitTurnInName;
|
||||
|
||||
LocaleConstant locale = _session.GetSessionDbLocaleIndex();
|
||||
if (locale != LocaleConstant.enUS)
|
||||
Locale locale = _session.GetSessionDbLocaleIndex();
|
||||
if (locale != Locale.enUS)
|
||||
{
|
||||
QuestTemplateLocale localeData = Global.ObjectMgr.GetQuestLocale(quest.Id);
|
||||
if (localeData != null)
|
||||
@@ -583,8 +583,8 @@ namespace Game.Misc
|
||||
packet.QuestTitle = quest.LogTitle;
|
||||
packet.CompletionText = quest.RequestItemsText;
|
||||
|
||||
LocaleConstant locale = _session.GetSessionDbLocaleIndex();
|
||||
if (locale != LocaleConstant.enUS)
|
||||
Locale locale = _session.GetSessionDbLocaleIndex();
|
||||
if (locale != Locale.enUS)
|
||||
{
|
||||
QuestTemplateLocale localeData = Global.ObjectMgr.GetQuestLocale(quest.Id);
|
||||
if (localeData != null)
|
||||
@@ -747,7 +747,7 @@ namespace Game.Misc
|
||||
|
||||
public class PageTextLocale
|
||||
{
|
||||
public StringArray Text = new StringArray((int)LocaleConstant.Total);
|
||||
public StringArray Text = new StringArray((int)Locale.Total);
|
||||
}
|
||||
|
||||
public class GossipMenuItems
|
||||
@@ -781,7 +781,7 @@ namespace Game.Misc
|
||||
|
||||
public class PointOfInterestLocale
|
||||
{
|
||||
public StringArray Name = new StringArray((int)LocaleConstant.Total);
|
||||
public StringArray Name = new StringArray((int)Locale.Total);
|
||||
}
|
||||
|
||||
public class GossipMenus
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Framework.Constants;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using Game.Spells;
|
||||
|
||||
namespace Game.Entities
|
||||
@@ -26,10 +26,10 @@ namespace Game.Entities
|
||||
_type = type;
|
||||
_spells = spells;
|
||||
|
||||
_greeting[(int)LocaleConstant.enUS] = greeting;
|
||||
_greeting[(int)Locale.enUS] = greeting;
|
||||
}
|
||||
|
||||
public void SendSpells(Creature npc, Player player, LocaleConstant locale)
|
||||
public void SendSpells(Creature npc, Player player, Locale locale)
|
||||
{
|
||||
float reputationDiscount = player.GetReputationPriceDiscount(npc);
|
||||
|
||||
@@ -171,15 +171,15 @@ namespace Game.Entities
|
||||
player.SendPacket(trainerBuyFailed);
|
||||
}
|
||||
|
||||
string GetGreeting(LocaleConstant locale)
|
||||
string GetGreeting(Locale locale)
|
||||
{
|
||||
if (_greeting[(int)locale].IsEmpty())
|
||||
return _greeting[(int)LocaleConstant.enUS];
|
||||
return _greeting[(int)Locale.enUS];
|
||||
|
||||
return _greeting[(int)locale];
|
||||
}
|
||||
|
||||
public void AddGreetingLocale(LocaleConstant locale, string greeting)
|
||||
public void AddGreetingLocale(Locale locale, string greeting)
|
||||
{
|
||||
_greeting[(int)locale] = greeting;
|
||||
}
|
||||
@@ -187,6 +187,6 @@ namespace Game.Entities
|
||||
uint _id;
|
||||
TrainerType _type;
|
||||
List<TrainerSpell> _spells;
|
||||
Array<string> _greeting = new Array<string>((int)LocaleConstant.Total);
|
||||
Array<string> _greeting = new Array<string>((int)Locale.Total);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
using Framework.Constants;
|
||||
using Game.Spells;
|
||||
using Game.Network;
|
||||
using Game.Networking;
|
||||
|
||||
namespace Game.Entities
|
||||
{
|
||||
|
||||
@@ -25,12 +25,12 @@ using Game.DataStorage;
|
||||
using Game.Groups;
|
||||
using Game.Loots;
|
||||
using Game.Maps;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Game.Network;
|
||||
using Game.Networking;
|
||||
|
||||
namespace Game.Entities
|
||||
{
|
||||
@@ -2086,9 +2086,9 @@ namespace Game.Entities
|
||||
return GetGoInfo().ScriptId;
|
||||
}
|
||||
|
||||
public override string GetName(LocaleConstant locale = LocaleConstant.enUS)
|
||||
public override string GetName(Locale locale = Locale.enUS)
|
||||
{
|
||||
if (locale != LocaleConstant.enUS)
|
||||
if (locale != Locale.enUS)
|
||||
{
|
||||
GameObjectLocale cl = Global.ObjectMgr.GetGameObjectLocale(GetEntry());
|
||||
if (cl != null)
|
||||
|
||||
@@ -20,7 +20,7 @@ using Framework.Constants;
|
||||
using Framework.GameMath;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
|
||||
namespace Game.Entities
|
||||
{
|
||||
@@ -1235,9 +1235,9 @@ namespace Game.Entities
|
||||
|
||||
public class GameObjectLocale
|
||||
{
|
||||
public StringArray Name = new StringArray((int)LocaleConstant.Total);
|
||||
public StringArray CastBarCaption = new StringArray((int)LocaleConstant.Total);
|
||||
public StringArray Unk1 = new StringArray((int)LocaleConstant.Total);
|
||||
public StringArray Name = new StringArray((int)Locale.Total);
|
||||
public StringArray CastBarCaption = new StringArray((int)Locale.Total);
|
||||
public StringArray Unk1 = new StringArray((int)Locale.Total);
|
||||
}
|
||||
|
||||
public class GameObjectAddon
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Game.Network;
|
||||
using Game.Networking;
|
||||
using Framework.Constants;
|
||||
using Framework.Database;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using Game.DataStorage;
|
||||
using System.Linq;
|
||||
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Game.Network;
|
||||
using Game.Networking;
|
||||
using Framework.Constants;
|
||||
using Framework.Database;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using Game.DataStorage;
|
||||
|
||||
namespace Game.Entities
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
using Framework.Constants;
|
||||
using Framework.Database;
|
||||
using Game.Network;
|
||||
using Game.Networking;
|
||||
|
||||
namespace Game.Entities
|
||||
{
|
||||
|
||||
@@ -20,8 +20,8 @@ using Framework.Constants;
|
||||
using Framework.Database;
|
||||
using Game.DataStorage;
|
||||
using Game.Loots;
|
||||
using Game.Network;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking;
|
||||
using Game.Networking.Packets;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -104,7 +104,7 @@ namespace Game.Entities
|
||||
return true;
|
||||
}
|
||||
|
||||
public override string GetName(LocaleConstant locale = LocaleConstant.enUS)
|
||||
public override string GetName(Locale locale = Locale.enUS)
|
||||
{
|
||||
ItemTemplate itemTemplate = GetTemplate();
|
||||
var suffix = CliDB.ItemNameDescriptionStorage.LookupByKey(_bonusData.Suffix);
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Game.Entities
|
||||
Specializations[2] = new BitSet((int)Class.Max * PlayerConst.MaxSpecializations);
|
||||
}
|
||||
|
||||
public string GetName(LocaleConstant locale = SharedConst.DefaultLocale)
|
||||
public string GetName(Locale locale = SharedConst.DefaultLocale)
|
||||
{
|
||||
return ExtendedData.Display[locale];
|
||||
}
|
||||
|
||||
@@ -83,11 +83,11 @@ namespace Game.Entities
|
||||
if (type == HighGuid.Transport)
|
||||
return new ObjectGuid((ulong)type << 58 | (counter << 38), 0);
|
||||
else
|
||||
return new ObjectGuid((ulong)type << 58 | (ulong)Global.WorldMgr.GetRealm().Id.Realm << 42, counter);
|
||||
return new ObjectGuid((ulong)type << 58 | (ulong)Global.WorldMgr.GetRealm().Id.Index << 42, counter);
|
||||
}
|
||||
static ObjectGuid MapSpecificCreate(HighGuid type, byte subType, ushort mapId, uint serverId, uint entry, ulong counter)
|
||||
{
|
||||
return new ObjectGuid((((ulong)type << 58) | ((ulong)(Global.WorldMgr.GetRealm().Id.Realm & 0x1FFF) << 42) | ((ulong)(mapId & 0x1FFF) << 29) | ((ulong)(entry & 0x7FFFFF) << 6) | ((ulong)subType & 0x3F)),
|
||||
return new ObjectGuid((((ulong)type << 58) | ((ulong)(Global.WorldMgr.GetRealm().Id.Index & 0x1FFF) << 42) | ((ulong)(mapId & 0x1FFF) << 29) | ((ulong)(entry & 0x7FFFFF) << 6) | ((ulong)subType & 0x3F)),
|
||||
(((ulong)(serverId & 0xFFFFFF) << 40) | (counter & 0xFFFFFFFFFF)));
|
||||
}
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
*/
|
||||
|
||||
using Framework.IO;
|
||||
using Game.Network;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking;
|
||||
using Game.Networking.Packets;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Game.Entities
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
using Framework.Constants;
|
||||
using Game.Network;
|
||||
using Game.Networking;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
using Framework.Constants;
|
||||
using Game.Network;
|
||||
using Game.Networking;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Framework.GameMath;
|
||||
|
||||
@@ -21,8 +21,8 @@ using Framework.GameMath;
|
||||
using Game.AI;
|
||||
using Game.BattleFields;
|
||||
using Game.Maps;
|
||||
using Game.Network;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking;
|
||||
using Game.Networking.Packets;
|
||||
using Game.Scenarios;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -1671,7 +1671,7 @@ namespace Game.Entities
|
||||
public virtual ushort GetMovementAnimKitId() { return 0; }
|
||||
public virtual ushort GetMeleeAnimKitId() { return 0; }
|
||||
|
||||
public virtual string GetName(LocaleConstant locale = LocaleConstant.enUS) { return _name; }
|
||||
public virtual string GetName(Locale locale = Locale.enUS) { return _name; }
|
||||
public void SetName(string name) { _name = name; }
|
||||
|
||||
public ObjectGuid GetGUID() { return m_guid; }
|
||||
|
||||
@@ -19,7 +19,7 @@ using Framework.Constants;
|
||||
using Framework.Database;
|
||||
using Game.DataStorage;
|
||||
using Game.Maps;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
using Framework.Constants;
|
||||
using Framework.Database;
|
||||
using Game.DataStorage;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
using Framework.Constants;
|
||||
using Game.DataStorage;
|
||||
using Game.Groups;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -27,7 +27,7 @@ using Game.Groups;
|
||||
using Game.Guilds;
|
||||
using Game.Mails;
|
||||
using Game.Maps;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -3532,7 +3532,7 @@ namespace Game.Entities
|
||||
stmt.AddValue(0, GetSession().GetAccountId());
|
||||
stmt.AddValue(1, Global.WorldMgr.GetRealmId().Region);
|
||||
stmt.AddValue(2, Global.WorldMgr.GetRealmId().Site);
|
||||
stmt.AddValue(3, Global.WorldMgr.GetRealmId().Realm);
|
||||
stmt.AddValue(3, Global.WorldMgr.GetRealmId().Index);
|
||||
stmt.AddValue(4, GetName());
|
||||
stmt.AddValue(5, GetGUID().GetCounter());
|
||||
stmt.AddValue(6, Time.UnixTime);
|
||||
|
||||
@@ -25,7 +25,7 @@ using Game.Guilds;
|
||||
using Game.Loots;
|
||||
using Game.Mails;
|
||||
using Game.Maps;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -21,7 +21,7 @@ using Game.DataStorage;
|
||||
using Game.Groups;
|
||||
using Game.Guilds;
|
||||
using Game.Maps;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ using Game.BattleFields;
|
||||
using Game.BattleGrounds;
|
||||
using Game.Cache;
|
||||
using Game.DataStorage;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using Game.PvP;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
|
||||
@@ -23,7 +23,7 @@ using Game.Groups;
|
||||
using Game.Mails;
|
||||
using Game.Maps;
|
||||
using Game.Misc;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -2803,8 +2803,8 @@ namespace Game.Entities
|
||||
|
||||
packet.QuestTitle = quest.LogTitle;
|
||||
|
||||
LocaleConstant loc_idx = receiver.GetSession().GetSessionDbLocaleIndex();
|
||||
if (loc_idx != LocaleConstant.enUS)
|
||||
Locale loc_idx = receiver.GetSession().GetSessionDbLocaleIndex();
|
||||
if (loc_idx != Locale.enUS)
|
||||
{
|
||||
QuestTemplateLocale questLocale = Global.ObjectMgr.GetQuestLocale(quest.Id);
|
||||
if (questLocale != null)
|
||||
|
||||
@@ -19,7 +19,7 @@ using Framework.Constants;
|
||||
using Framework.Dynamic;
|
||||
using Game.BattlePets;
|
||||
using Game.DataStorage;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
using Framework.Constants;
|
||||
using Framework.Database;
|
||||
using Game.DataStorage;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using Game.Spells;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ using Game.Loots;
|
||||
using Game.Mails;
|
||||
using Game.Maps;
|
||||
using Game.Misc;
|
||||
using Game.Network;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking;
|
||||
using Game.Networking.Packets;
|
||||
using Game.PvP;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
@@ -2429,7 +2429,7 @@ namespace Game.Entities
|
||||
string strBoxText = "";
|
||||
BroadcastTextRecord optionBroadcastText = CliDB.BroadcastTextStorage.LookupByKey(menuItems.OptionBroadcastTextId);
|
||||
BroadcastTextRecord boxBroadcastText = CliDB.BroadcastTextStorage.LookupByKey(menuItems.BoxBroadcastTextId);
|
||||
LocaleConstant locale = GetSession().GetSessionDbLocaleIndex();
|
||||
Locale locale = GetSession().GetSessionDbLocaleIndex();
|
||||
|
||||
if (optionBroadcastText != null)
|
||||
strOptionText = Global.DB2Mgr.GetBroadcastTextValue(optionBroadcastText, locale, GetGender());
|
||||
@@ -2441,7 +2441,7 @@ namespace Game.Entities
|
||||
else
|
||||
strBoxText = menuItems.BoxText;
|
||||
|
||||
if (locale != LocaleConstant.enUS)
|
||||
if (locale != Locale.enUS)
|
||||
{
|
||||
if (optionBroadcastText == null)
|
||||
{
|
||||
@@ -5057,8 +5057,8 @@ namespace Game.Entities
|
||||
if (playerChoice == null)
|
||||
return;
|
||||
|
||||
LocaleConstant locale = GetSession().GetSessionDbLocaleIndex();
|
||||
PlayerChoiceLocale playerChoiceLocale = locale != LocaleConstant.enUS ? Global.ObjectMgr.GetPlayerChoiceLocale(choiceId) : null;
|
||||
Locale locale = GetSession().GetSessionDbLocaleIndex();
|
||||
PlayerChoiceLocale playerChoiceLocale = locale != Locale.enUS ? Global.ObjectMgr.GetPlayerChoiceLocale(choiceId) : null;
|
||||
|
||||
PlayerTalkClass.GetInteractionData().Reset();
|
||||
PlayerTalkClass.GetInteractionData().SourceGuid = sender;
|
||||
@@ -5080,7 +5080,7 @@ namespace Game.Entities
|
||||
for (var i = 0; i < playerChoice.Responses.Count; ++i)
|
||||
{
|
||||
PlayerChoiceResponse playerChoiceResponseTemplate = playerChoice.Responses[i];
|
||||
var playerChoiceResponse = new Network.Packets.PlayerChoiceResponse();
|
||||
var playerChoiceResponse = new Networking.Packets.PlayerChoiceResponse();
|
||||
|
||||
playerChoiceResponse.ResponseID = playerChoiceResponseTemplate.ResponseId;
|
||||
playerChoiceResponse.ChoiceArtFileID = playerChoiceResponseTemplate.ChoiceArtFileId;
|
||||
@@ -5111,7 +5111,7 @@ namespace Game.Entities
|
||||
|
||||
if (playerChoiceResponseTemplate.Reward.HasValue)
|
||||
{
|
||||
var reward = new Network.Packets.PlayerChoiceResponseReward();
|
||||
var reward = new Networking.Packets.PlayerChoiceResponseReward();
|
||||
reward.TitleID = playerChoiceResponseTemplate.Reward.Value.TitleId;
|
||||
reward.PackageID = playerChoiceResponseTemplate.Reward.Value.PackageId;
|
||||
reward.SkillLineID = playerChoiceResponseTemplate.Reward.Value.SkillLineId;
|
||||
@@ -5123,7 +5123,7 @@ namespace Game.Entities
|
||||
|
||||
foreach (var item in playerChoiceResponseTemplate.Reward.Value.Items)
|
||||
{
|
||||
var rewardEntry = new Network.Packets.PlayerChoiceResponseRewardEntry();
|
||||
var rewardEntry = new Networking.Packets.PlayerChoiceResponseRewardEntry();
|
||||
rewardEntry.Item.ItemID = item.Id;
|
||||
rewardEntry.Quantity = item.Quantity;
|
||||
if (!item.BonusListIDs.Empty())
|
||||
@@ -5136,7 +5136,7 @@ namespace Game.Entities
|
||||
|
||||
foreach (var currency in playerChoiceResponseTemplate.Reward.Value.Currency)
|
||||
{
|
||||
var rewardEntry = new Network.Packets.PlayerChoiceResponseRewardEntry();
|
||||
var rewardEntry = new Networking.Packets.PlayerChoiceResponseRewardEntry();
|
||||
rewardEntry.Item.ItemID = currency.Id;
|
||||
rewardEntry.Quantity = currency.Quantity;
|
||||
reward.Items.Add(rewardEntry);
|
||||
@@ -5144,7 +5144,7 @@ namespace Game.Entities
|
||||
|
||||
foreach (var faction in playerChoiceResponseTemplate.Reward.Value.Faction)
|
||||
{
|
||||
var rewardEntry = new Network.Packets.PlayerChoiceResponseRewardEntry();
|
||||
var rewardEntry = new Networking.Packets.PlayerChoiceResponseRewardEntry();
|
||||
rewardEntry.Item.ItemID = faction.Id;
|
||||
rewardEntry.Quantity = faction.Quantity;
|
||||
reward.Items.Add(rewardEntry);
|
||||
@@ -6458,7 +6458,7 @@ namespace Game.Entities
|
||||
return;
|
||||
|
||||
ChatPkt data = new ChatPkt();
|
||||
data.Initialize(ChatMsg.Whisper, isLogged ? Language.AddonLogged : Language.Addon, this, this, text, 0, "", LocaleConstant.enUS, prefix);
|
||||
data.Initialize(ChatMsg.Whisper, isLogged ? Language.AddonLogged : Language.Addon, this, this, text, 0, "", Locale.enUS, prefix);
|
||||
receiver.SendPacket(data);
|
||||
}
|
||||
public override void Whisper(string text, Language language, Player target = null, bool something = false)
|
||||
@@ -6508,7 +6508,7 @@ namespace Game.Entities
|
||||
return;
|
||||
}
|
||||
|
||||
LocaleConstant locale = target.GetSession().GetSessionDbLocaleIndex();
|
||||
Locale locale = target.GetSession().GetSessionDbLocaleIndex();
|
||||
ChatPkt packet = new ChatPkt();
|
||||
packet.Initialize(ChatMsg.Whisper, Language.Universal, this, target, Global.DB2Mgr.GetBroadcastTextValue(bct, locale, GetGender()));
|
||||
target.SendPacket(packet);
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
using Framework.Collections;
|
||||
using Framework.Constants;
|
||||
using Game.DataStorage;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System;
|
||||
@@ -34,15 +34,11 @@ namespace Game.Entities
|
||||
public void InitTaxiNodesForLevel(Race race, Class chrClass, uint level)
|
||||
{
|
||||
// class specific initial known nodes
|
||||
var factionMask = Player.TeamForRace(race) == Team.Horde ? CliDB.HordeTaxiNodesMask : CliDB.AllianceTaxiNodesMask;
|
||||
switch (chrClass)
|
||||
if (chrClass == Class.Deathknight)
|
||||
{
|
||||
case Class.Deathknight:
|
||||
{
|
||||
for (int i = 0; i < PlayerConst.TaxiMaskSize; ++i)
|
||||
m_taximask[i] |= (byte)(CliDB.OldContinentsNodesMask[i] & factionMask[i]);
|
||||
break;
|
||||
}
|
||||
var factionMask = Player.TeamForRace(race) == Team.Horde ? CliDB.HordeTaxiNodesMask : CliDB.AllianceTaxiNodesMask;
|
||||
for (int i = 0; i < PlayerConst.TaxiMaskSize; ++i)
|
||||
m_taximask[i] |= (byte)(CliDB.OldContinentsNodesMask[i] & factionMask[i]);
|
||||
}
|
||||
|
||||
// race specific initial known nodes: capital and taxi hub masks
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
using Framework.Constants;
|
||||
using Game.DataStorage;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
using Framework.Constants;
|
||||
using Framework.Database;
|
||||
using Game.Network;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking;
|
||||
using Game.Networking.Packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
using Framework.Constants;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
|
||||
namespace Game.Entities
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
using Framework.Constants;
|
||||
using Game.DataStorage;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
using Framework.Constants;
|
||||
using Game.DataStorage;
|
||||
using Game.Groups;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using Game.Spells;
|
||||
|
||||
namespace Game.Entities
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
using Framework.Collections;
|
||||
using Framework.Constants;
|
||||
using Framework.GameMath;
|
||||
using Game.Network;
|
||||
using Game.Networking;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ using Game.DataStorage;
|
||||
using Game.Groups;
|
||||
using Game.Loots;
|
||||
using Game.Maps;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using Game.PvP;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
|
||||
@@ -23,7 +23,7 @@ using Game.Combat;
|
||||
using Game.DataStorage;
|
||||
using Game.Maps;
|
||||
using Game.Movement;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -21,7 +21,7 @@ using Game.BattleGrounds;
|
||||
using Game.DataStorage;
|
||||
using Game.Maps;
|
||||
using Game.Movement;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Game.Spells;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
using Framework.Constants;
|
||||
using Game.AI;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using Game.Spells;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
using Framework.Constants;
|
||||
using Framework.Dynamic;
|
||||
using Game.BattleGrounds;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -25,12 +25,12 @@ using Game.Combat;
|
||||
using Game.DataStorage;
|
||||
using Game.Maps;
|
||||
using Game.Movement;
|
||||
using Game.Network.Packets;
|
||||
using Game.Networking.Packets;
|
||||
using Game.Spells;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Game.Network;
|
||||
using Game.Networking;
|
||||
|
||||
namespace Game.Entities
|
||||
{
|
||||
@@ -366,7 +366,7 @@ namespace Game.Entities
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
LocaleConstant locale = target.GetSession().GetSessionDbLocaleIndex();
|
||||
Locale locale = target.GetSession().GetSessionDbLocaleIndex();
|
||||
ChatPkt data = new ChatPkt();
|
||||
data.Initialize(isBossWhisper ? ChatMsg.RaidBossWhisper : ChatMsg.MonsterWhisper, Language.Universal, this, target, text, 0, "", locale);
|
||||
target.SendPacket(data);
|
||||
@@ -413,7 +413,7 @@ namespace Game.Entities
|
||||
return;
|
||||
}
|
||||
|
||||
LocaleConstant locale = target.GetSession().GetSessionDbLocaleIndex();
|
||||
Locale locale = target.GetSession().GetSessionDbLocaleIndex();
|
||||
ChatPkt data = new ChatPkt();
|
||||
data.Initialize(isBossWhisper ? ChatMsg.RaidBossWhisper : ChatMsg.MonsterWhisper, Language.Universal, this, target, Global.DB2Mgr.GetBroadcastTextValue(bct, locale, GetGender()), 0, "", locale);
|
||||
target.SendPacket(data);
|
||||
|
||||
Reference in New Issue
Block a user