Core/Refactor: Part 3
This commit is contained in:
@@ -231,7 +231,7 @@ namespace Game
|
||||
SQLTransaction trans;
|
||||
|
||||
if (WorldConfig.GetBoolValue(WorldCfg.AllowTwoSideInteractionAuction))
|
||||
AH.auctioneer = 23442; ///@TODO - HARDCODED DB GUID, BAD BAD BAD
|
||||
AH.auctioneer = 23442; //@TODO - HARDCODED DB GUID, BAD BAD BAD
|
||||
else
|
||||
AH.auctioneer = creature.GetSpawnId();
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace Game
|
||||
|
||||
public void SendSetTimeZoneInformation()
|
||||
{
|
||||
/// @todo: replace dummy values
|
||||
// @todo: replace dummy values
|
||||
SetTimeZoneInformation packet = new SetTimeZoneInformation();
|
||||
packet.ServerTimeTZ = "Europe/Paris";
|
||||
packet.GameTimeTZ = "Europe/Paris";
|
||||
|
||||
@@ -591,8 +591,8 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.RequestRatedBattlefieldInfo)]
|
||||
void HandleRequestRatedBattlefieldInfo(RequestRatedBattlefieldInfo packet)
|
||||
{
|
||||
/// @Todo: perfome research in this case
|
||||
/// The unk fields are related to arenas
|
||||
// @Todo: perfome research in this case
|
||||
// The unk fields are related to arenas
|
||||
WorldPacket data = new WorldPacket(ServerOpcodes.RatedBattlefieldInfo);
|
||||
data.WriteInt32(0); // BgWeeklyWins20vs20
|
||||
data.WriteInt32(0); // BgWeeklyPlayed20vs20
|
||||
|
||||
@@ -208,7 +208,7 @@ namespace Game
|
||||
return;
|
||||
|
||||
CalendarEvent oldEvent = Global.CalendarMgr.GetEvent(calendarCopyEvent.EventID);
|
||||
if (oldEvent == null)
|
||||
if (oldEvent != null)
|
||||
{
|
||||
CalendarEvent newEvent = new CalendarEvent(oldEvent, Global.CalendarMgr.GetFreeEventId());
|
||||
newEvent.Date = calendarCopyEvent.Date;
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.EnumCharactersDeletedByClient, Status = SessionStatus.Authed)]
|
||||
void HandleCharUndeleteEnum(EnumCharacters enumCharacters)
|
||||
{
|
||||
/// get all the data necessary for loading all undeleted characters (along with their pets) on the account
|
||||
// get all the data necessary for loading all undeleted characters (along with their pets) on the account
|
||||
PreparedStatement stmt;
|
||||
if (WorldConfig.GetBoolValue(WorldCfg.DeclinedNamesUsed))
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.SEL_UNDELETE_ENUM_DECLINED_NAME);
|
||||
@@ -379,7 +379,7 @@ namespace Game
|
||||
}
|
||||
|
||||
// need to check team only for first character
|
||||
/// @todo what to if account already has characters of both races?
|
||||
// @todo what to if account already has characters of both races?
|
||||
if (!allowTwoSideAccounts)
|
||||
{
|
||||
Team accTeam = 0;
|
||||
@@ -866,7 +866,7 @@ namespace Game
|
||||
{
|
||||
FeatureSystemStatus features = new FeatureSystemStatus();
|
||||
|
||||
/// START OF DUMMY VALUES
|
||||
// START OF DUMMY VALUES
|
||||
features.ComplaintStatus = 2;
|
||||
features.ScrollOfResurrectionRequestsRemaining = 1;
|
||||
features.ScrollOfResurrectionMaxRequestsPerDay = 1;
|
||||
@@ -887,7 +887,7 @@ namespace Game
|
||||
features.ComplaintStatus = 0;
|
||||
features.TutorialsEnabled = true;
|
||||
features.NPETutorialsEnabled = true;
|
||||
/// END OF DUMMY VALUES
|
||||
// END OF DUMMY VALUES
|
||||
|
||||
features.EuropaTicketSystemStatus.Value.TicketsEnabled = WorldConfig.GetBoolValue(WorldCfg.SupportTicketsEnabled);
|
||||
features.EuropaTicketSystemStatus.Value.BugsEnabled = WorldConfig.GetBoolValue(WorldCfg.SupportBugsEnabled);
|
||||
@@ -1246,7 +1246,7 @@ namespace Game
|
||||
}
|
||||
|
||||
// character with this name already exist
|
||||
/// @todo: make async
|
||||
// @todo: make async
|
||||
ObjectGuid newGuid = ObjectManager.GetPlayerGUIDByName(customizeInfo.CharName);
|
||||
if (!newGuid.IsEmpty())
|
||||
{
|
||||
@@ -1261,7 +1261,7 @@ namespace Game
|
||||
SQLTransaction trans = new SQLTransaction();
|
||||
ulong lowGuid = customizeInfo.CharGUID.GetCounter();
|
||||
|
||||
/// Customize
|
||||
// Customize
|
||||
{
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.UPD_GENDER_AND_APPEARANCE);
|
||||
|
||||
@@ -1279,7 +1279,7 @@ namespace Game
|
||||
trans.Append(stmt);
|
||||
}
|
||||
|
||||
/// Name Change and update atLogin flags
|
||||
// Name Change and update atLogin flags
|
||||
{
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.UPD_CHAR_NAME_AT_LOGIN);
|
||||
stmt.AddValue(0, customizeInfo.CharName);
|
||||
@@ -1325,11 +1325,11 @@ namespace Game
|
||||
{
|
||||
Item item = _player.GetItemByPos(InventorySlots.Bag0, i);
|
||||
|
||||
/// cheating check 1 (item equipped but sent empty guid)
|
||||
// cheating check 1 (item equipped but sent empty guid)
|
||||
if (!item)
|
||||
return;
|
||||
|
||||
/// cheating check 2 (sent guid does not match equipped item)
|
||||
// cheating check 2 (sent guid does not match equipped item)
|
||||
if (item.GetGUID() != itemGuid)
|
||||
return;
|
||||
}
|
||||
@@ -1358,7 +1358,7 @@ namespace Game
|
||||
saveEquipmentSet.Set.Appearances[i] = 0;
|
||||
}
|
||||
}
|
||||
saveEquipmentSet.Set.IgnoreMask &= 0x7FFFF; /// clear invalid bits (i > EQUIPMENT_SLOT_END)
|
||||
saveEquipmentSet.Set.IgnoreMask &= 0x7FFFF; // clear invalid bits (i > EQUIPMENT_SLOT_END)
|
||||
if (saveEquipmentSet.Set.Type == EquipmentSetInfo.EquipmentSetType.Equipment)
|
||||
{
|
||||
saveEquipmentSet.Set.Enchants[0] = 0;
|
||||
@@ -1583,7 +1583,7 @@ namespace Game
|
||||
// resurrect the character in case he's dead
|
||||
Player.OfflineResurrect(factionChangeInfo.Guid, trans);
|
||||
|
||||
/// Name Change and update atLogin flags
|
||||
// Name Change and update atLogin flags
|
||||
{
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.UPD_CHAR_NAME_AT_LOGIN);
|
||||
stmt.AddValue(0, factionChangeInfo.Name);
|
||||
@@ -1719,7 +1719,7 @@ namespace Game
|
||||
trans.Append(stmt);
|
||||
}
|
||||
|
||||
/// @todo: make this part asynch
|
||||
// @todo: make this part asynch
|
||||
if (!WorldConfig.GetBoolValue(WorldCfg.AllowTwoSideInteractionGuild))
|
||||
{
|
||||
// Reset guild
|
||||
@@ -2092,11 +2092,11 @@ namespace Game
|
||||
return;
|
||||
}
|
||||
|
||||
/// @todo: add more safety checks
|
||||
/// * max char count per account
|
||||
/// * max death knight count
|
||||
/// * max demon hunter count
|
||||
/// * team violation
|
||||
// @todo: add more safety checks
|
||||
// * max char count per account
|
||||
// * max death knight count
|
||||
// * max demon hunter count
|
||||
// * team violation
|
||||
|
||||
stmt = DB.Characters.GetPreparedStatement(CharStatements.SEL_SUM_CHARS);
|
||||
stmt.AddValue(0, GetAccountId());
|
||||
|
||||
@@ -448,7 +448,7 @@ namespace Game
|
||||
}
|
||||
break;
|
||||
case ChatMsg.Whisper:
|
||||
/// @todo implement cross realm whispers (someday)
|
||||
// @todo implement cross realm whispers (someday)
|
||||
ExtendedPlayerName extName = ObjectManager.ExtractExtendedPlayerName(target);
|
||||
|
||||
if (!ObjectManager.NormalizePlayerName(ref extName.Name))
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace Game
|
||||
honorStats.LifetimeHK = player.GetUInt32Value(PlayerFields.LifetimeHonorableKills);
|
||||
honorStats.YesterdayHK = player.GetUInt16Value(PlayerFields.Kills, 1);
|
||||
honorStats.TodayHK = player.GetUInt16Value(PlayerFields.Kills, 0);
|
||||
honorStats.LifetimeMaxRank = 0; /// @todo
|
||||
honorStats.LifetimeMaxRank = 0; // @todo
|
||||
|
||||
SendPacket(honorStats);
|
||||
}
|
||||
@@ -110,7 +110,7 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.InspectPvp)]
|
||||
void HandleInspectPVP(InspectPVPRequest request)
|
||||
{
|
||||
/// @todo: deal with request.InspectRealmAddress
|
||||
// @todo: deal with request.InspectRealmAddress
|
||||
|
||||
Player player = Global.ObjAccessor.FindPlayer(request.InspectTarget);
|
||||
if (!player)
|
||||
@@ -127,7 +127,7 @@ namespace Game
|
||||
|
||||
InspectPVPResponse response = new InspectPVPResponse();
|
||||
response.ClientGUID = request.InspectTarget;
|
||||
/// @todo: fill brackets
|
||||
// @todo: fill brackets
|
||||
|
||||
SendPacket(response);
|
||||
}
|
||||
|
||||
@@ -359,7 +359,7 @@ namespace Game
|
||||
}
|
||||
else
|
||||
{
|
||||
/// @todo: 6.x research new values
|
||||
// @todo: 6.x research new values
|
||||
/*WorldPackets.Item.ReadItemResultFailed packet;
|
||||
packet.Item = item->GetGUID();
|
||||
packet.Subcode = ??;
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Game
|
||||
Player player = GetPlayer();
|
||||
AELootResult aeResult = player.GetAELootView().Count > 1 ? new AELootResult() : null;
|
||||
|
||||
/// @todo Implement looting by LootObject guid
|
||||
// @todo Implement looting by LootObject guid
|
||||
foreach (LootRequest req in packet.Loot)
|
||||
{
|
||||
Loot loot = null;
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace Game
|
||||
{
|
||||
// NOTE: this is actually called many times while falling
|
||||
// even after the player has been teleported away
|
||||
/// @todo discard movement packets after the player is rooted
|
||||
// @todo discard movement packets after the player is rooted
|
||||
if (plrMover.IsAlive())
|
||||
{
|
||||
plrMover.SetFlag(PlayerFields.Flags, PlayerFlags.IsOutOfBounds);
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace Game
|
||||
return;
|
||||
}
|
||||
|
||||
/// @todo allow control charmed player?
|
||||
// @todo allow control charmed player?
|
||||
if (pet.IsTypeId(TypeId.Player) && !(flag == ActiveStates.Command && spellid == (uint)CommandStates.Attack))
|
||||
return;
|
||||
|
||||
@@ -169,7 +169,7 @@ namespace Game
|
||||
// Can't attack if owner is pacified
|
||||
if (GetPlayer().HasAuraType(AuraType.ModPacify))
|
||||
{
|
||||
/// @todo Send proper error message to client
|
||||
// @todo Send proper error message to client
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -376,7 +376,7 @@ namespace Game
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pet.isPossessed() || pet.IsVehicle()) /// @todo: confirm this check
|
||||
if (pet.isPossessed() || pet.IsVehicle()) // @todo: confirm this check
|
||||
Spell.SendCastResult(GetPlayer(), spellInfo, spell.m_SpellVisual, spell.m_castId, result);
|
||||
else
|
||||
spell.SendPetCastResult(result);
|
||||
|
||||
@@ -471,7 +471,7 @@ namespace Game
|
||||
if (!GetPlayer().IsInSameRaidWith(originalPlayer))
|
||||
return;
|
||||
|
||||
if (!!originalPlayer.IsActiveQuest(packet.QuestID))
|
||||
if (!originalPlayer.IsActiveQuest(packet.QuestID))
|
||||
return;
|
||||
|
||||
if (!GetPlayer().CanTakeQuest(quest, true))
|
||||
@@ -646,7 +646,7 @@ namespace Game
|
||||
{
|
||||
WorldQuestUpdate response = new WorldQuestUpdate();
|
||||
|
||||
/// @todo: 7.x Has to be implemented
|
||||
// @todo: 7.x Has to be implemented
|
||||
//response.WorldQuestUpdates.push_back(WorldPackets::Quest::WorldQuestUpdateInfo(lastUpdate, questID, timer, variableID, value));
|
||||
|
||||
SendPacket(response);
|
||||
|
||||
@@ -44,17 +44,17 @@ namespace Game
|
||||
if (request.Words.Count > 4)
|
||||
return;
|
||||
|
||||
/// @todo: handle following packet values
|
||||
/// VirtualRealmNames
|
||||
/// ShowEnemies
|
||||
/// ShowArenaPlayers
|
||||
/// ExactName
|
||||
/// ServerInfo
|
||||
// @todo: handle following packet values
|
||||
// VirtualRealmNames
|
||||
// ShowEnemies
|
||||
// ShowArenaPlayers
|
||||
// ExactName
|
||||
// ServerInfo
|
||||
|
||||
request.Words.ForEach(p => p = p.ToLower());
|
||||
|
||||
request.Name.ToLower();
|
||||
request.Guild.ToLower();
|
||||
request.Name = request.Name.ToLower();
|
||||
request.Guild = request.Guild.ToLower();
|
||||
|
||||
// client send in case not set max level value 100 but we support 255 max level,
|
||||
// update it to show GMs with characters after 100 level
|
||||
@@ -282,7 +282,7 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.DelFriend)]
|
||||
void HandleDelFriend(DelFriend packet)
|
||||
{
|
||||
/// @todo: handle VirtualRealmAddress
|
||||
// @todo: handle VirtualRealmAddress
|
||||
GetPlayer().GetSocial().RemoveFromSocialList(packet.Player.Guid, SocialFlag.Friend);
|
||||
|
||||
Global.SocialMgr.SendFriendStatus(GetPlayer(), FriendsResult.Removed, packet.Player.Guid);
|
||||
@@ -336,7 +336,7 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.DelIgnore)]
|
||||
void HandleDelIgnore(DelIgnore packet)
|
||||
{
|
||||
/// @todo: handle VirtualRealmAddress
|
||||
// @todo: handle VirtualRealmAddress
|
||||
Log.outDebug(LogFilter.Network, "WorldSession.HandleDelIgnoreOpcode: {0}", packet.Player.Guid.ToString());
|
||||
|
||||
GetPlayer().GetSocial().RemoveFromSocialList(packet.Player.Guid, SocialFlag.Ignored);
|
||||
@@ -347,7 +347,7 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.SetContactNotes)]
|
||||
void HandleSetContactNotes(SetContactNotes packet)
|
||||
{
|
||||
/// @todo: handle VirtualRealmAddress
|
||||
// @todo: handle VirtualRealmAddress
|
||||
Log.outDebug(LogFilter.Network, "WorldSession.HandleSetContactNotesOpcode: Contact: {0}, Notes: {1}", packet.Player.Guid.ToString(), packet.Notes);
|
||||
GetPlayer().GetSocial().SetFriendNote(packet.Player.Guid, packet.Notes);
|
||||
}
|
||||
|
||||
@@ -469,7 +469,7 @@ namespace Game
|
||||
if (unit == null)
|
||||
return;
|
||||
|
||||
/// @todo Unit.SetCharmedBy: 28782 is not in world but 0 is trying to charm it! . crash
|
||||
// @todo Unit.SetCharmedBy: 28782 is not in world but 0 is trying to charm it! . crash
|
||||
if (!unit.IsInWorld)
|
||||
return;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Game
|
||||
{
|
||||
UpdateListedAuctionableTokensResponse response = new UpdateListedAuctionableTokensResponse();
|
||||
|
||||
/// @todo: fix 6.x implementation
|
||||
// @todo: fix 6.x implementation
|
||||
response.UnkInt = updateListedAuctionableTokens.UnkInt;
|
||||
response.Result = TokenResult.Success;
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Game
|
||||
{
|
||||
WowTokenMarketPriceResponse response = new WowTokenMarketPriceResponse();
|
||||
|
||||
/// @todo: 6.x fix implementation
|
||||
// @todo: 6.x fix implementation
|
||||
response.CurrentMarketPrice = 300000000;
|
||||
response.UnkInt = requestWowTokenMarketPrice.UnkInt;
|
||||
response.Result = TokenResult.Success;
|
||||
|
||||
Reference in New Issue
Block a user