Skip to content

Commit 023b5dd

Browse files
author
Github Actions
committed
Merge 3.3.5 to 3.3.5-base_patch
2 parents a8df10d + 8130024 commit 023b5dd

19 files changed

Lines changed: 216 additions & 129 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
--
2+
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_ioc_seaforium_blast_credit' AND `spell_id` IN (67813,67814);
3+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
4+
(67813, 'spell_ioc_seaforium_blast_credit'),
5+
(67814, 'spell_ioc_seaforium_blast_credit');
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
--
2+
DELETE FROM `trinity_string` WHERE `entry` IN (397,398);
3+
INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES
4+
(397, "Characters below level 10 are not eligible for faction change."),
5+
(398, "Death Knights below level 60 are not eligible for faction change.");
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
-- Desolace, Sar'theris Strand GY
2+
DELETE FROM `graveyard_zone` WHERE `ID` = 1422 AND `GhostZone` = 2100;
3+
INSERT INTO `graveyard_zone` (`ID`, `GhostZone`, `Faction`, `Comment`) VALUES
4+
(1422,2100,0,"Desolace, Sar'theris Strand GY");
5+
6+
-- Also delete most likely wrong linked GY
7+
DELETE FROM `graveyard_zone` WHERE `ID`=31 AND `GhostZone`=2100;
8+
9+
-- Ghost Walker Post Spirit Healer Update
10+
UPDATE `creature` SET `position_x`=-1432.9971923828125, `position_y`=1973.572265625, `position_z`=86.70270538330078125, `orientation`=3.246312379837036132, `spawntimesecs`=120, `VerifiedBuild`=55141 WHERE `guid`=40568 AND `id`=6491;

src/server/database/Database/Implementation/CharacterDatabase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ void CharacterDatabaseConnection::DoPrepareStatements()
420420
PrepareStatement(CHAR_SEL_CHARACTER_AT_LOGIN, "SELECT at_login FROM characters WHERE guid = ?", CONNECTION_SYNCH);
421421
PrepareStatement(CHAR_SEL_CHAR_CLASS_LVL_AT_LOGIN, "SELECT class, level, at_login, knownTitles FROM characters WHERE guid = ?", CONNECTION_SYNCH);
422422
PrepareStatement(CHAR_SEL_CHAR_CUSTOMIZE_INFO, "SELECT name, race, class, gender, at_login FROM characters WHERE guid = ?", CONNECTION_ASYNC);
423-
PrepareStatement(CHAR_SEL_CHAR_RACE_OR_FACTION_CHANGE_INFOS, "SELECT c.at_login, c.knownTitles, gm.guid FROM characters c LEFT JOIN group_member gm ON c.guid = gm.memberGuid WHERE c.guid = ?", CONNECTION_ASYNC);
423+
PrepareStatement(CHAR_SEL_CHAR_RACE_OR_FACTION_CHANGE_INFOS, "SELECT c.at_login, c.knownTitles, gm.guid, c.map FROM characters c LEFT JOIN group_member gm ON c.guid = gm.memberGuid WHERE c.guid = ?", CONNECTION_ASYNC);
424424
PrepareStatement(CHAR_SEL_INSTANCE, "SELECT data, completedEncounters FROM instance WHERE map = ? AND id = ?", CONNECTION_SYNCH);
425425
PrepareStatement(CHAR_SEL_PERM_BIND_BY_INSTANCE, "SELECT guid FROM character_instance WHERE instance = ? and permanent = 1", CONNECTION_SYNCH);
426426
PrepareStatement(CHAR_SEL_CHAR_COD_ITEM_MAIL, "SELECT id, messageType, mailTemplateId, sender, subject, body, money, has_items FROM mail WHERE receiver = ? AND has_items <> 0 AND cod <> 0", CONNECTION_SYNCH);

src/server/game/Accounts/AccountMgr.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ AccountOpResult AccountMgr::DeleteAccount(uint32 accountId)
122122
stmt->setUInt32(0, accountId);
123123
CharacterDatabase.Execute(stmt);
124124

125+
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ACCOUNT_INSTANCE_LOCK_TIMES);
126+
stmt->setUInt32(0, accountId);
127+
CharacterDatabase.Execute(stmt);
128+
125129
LoginDatabaseTransaction trans = LoginDatabase.BeginTransaction();
126130

127131
loginStmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_ACCOUNT);

src/server/game/Entities/Player/Player.cpp

Lines changed: 10 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,17 +1309,6 @@ void Player::Update(uint32 p_time)
13091309
UpdateEnchantTime(p_time);
13101310
UpdateHomebindTime(p_time);
13111311

1312-
if (!_instanceResetTimes.empty())
1313-
{
1314-
for (InstanceTimeMap::iterator itr = _instanceResetTimes.begin(); itr != _instanceResetTimes.end();)
1315-
{
1316-
if (itr->second < now)
1317-
_instanceResetTimes.erase(itr++);
1318-
else
1319-
++itr;
1320-
}
1321-
}
1322-
13231312
if (GetClass() == CLASS_DEATH_KNIGHT)
13241313
{
13251314
// Update rune timers
@@ -3775,7 +3764,10 @@ void Player::RemoveArenaSpellCooldowns(bool removeActivePetCooldowns)
37753764
GetSpellHistory()->ResetCooldowns([](SpellHistory::CooldownStorageType::iterator itr) -> bool
37763765
{
37773766
SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(itr->first);
3778-
return spellInfo->RecoveryTime < 10 * MINUTE * IN_MILLISECONDS && spellInfo->CategoryRecoveryTime < 10 * MINUTE * IN_MILLISECONDS;
3767+
int32 cooldown = -1;
3768+
int32 categoryCooldown = -1;
3769+
SpellHistory::GetCooldownDurations(spellInfo, itr->second.ItemId, &cooldown, nullptr, &categoryCooldown);
3770+
return cooldown < 10 * MINUTE * IN_MILLISECONDS && categoryCooldown < 10 * MINUTE * IN_MILLISECONDS;
37793771
}, true);
37803772

37813773
// pet cooldowns
@@ -17277,7 +17269,7 @@ bool Player::LoadFromDB(ObjectGuid guid, CharacterDatabaseQueryHolder const& hol
1727717269
SetUInt16Value(PLAYER_FIELD_KILLS, 1, fields[50].GetUInt16());
1727817270

1727917271
_LoadBoundInstances(holder.GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_BOUND_INSTANCES));
17280-
_LoadInstanceTimeRestrictions(holder.GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_INSTANCE_LOCK_TIMES));
17272+
1728117273
_LoadBGData(holder.GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_BG_DATA));
1728217274

1728317275
GetSession()->SetPlayer(this);
@@ -19125,19 +19117,6 @@ bool Player::CheckInstanceValidity(bool /*isLogin*/)
1912519117
return true;
1912619118
}
1912719119

19128-
bool Player::CheckInstanceCount(uint32 instanceId) const
19129-
{
19130-
if (_instanceResetTimes.size() < sWorld->getIntConfig(CONFIG_MAX_INSTANCES_PER_HOUR))
19131-
return true;
19132-
return _instanceResetTimes.find(instanceId) != _instanceResetTimes.end();
19133-
}
19134-
19135-
void Player::AddInstanceEnterTime(uint32 instanceId, time_t enterTime)
19136-
{
19137-
if (_instanceResetTimes.find(instanceId) == _instanceResetTimes.end())
19138-
_instanceResetTimes.insert(InstanceTimeMap::value_type(instanceId, enterTime + HOUR));
19139-
}
19140-
1914119120
bool Player::_LoadHomeBind(PreparedQueryResult result)
1914219121
{
1914319122
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(GetRace(), GetClass());
@@ -19516,7 +19495,7 @@ void Player::SaveToDB(CharacterDatabaseTransaction trans, bool create /* = false
1951619495
_SaveEquipmentSets(trans);
1951719496
GetSession()->SaveTutorialsData(trans); // changed only while character in game
1951819497
_SaveGlyphs(trans);
19519-
_SaveInstanceTimeRestrictions(trans);
19498+
GetSession()->SaveInstanceTimeRestrictions(trans);
1952019499

1952119500
// check if stats should only be saved on logout
1952219501
// save stats can be out of transaction
@@ -25705,22 +25684,22 @@ void Player::SetEquipmentSet(EquipmentSetInfo::EquipmentSetData const& eqSet)
2570525684
}
2570625685
}
2570725686

25708-
EquipmentSetInfo& eqSlot = _equipmentSets[eqSet.Guid];
25687+
uint64 setGuid = (eqSet.Guid != 0) ? eqSet.Guid : sObjectMgr->GenerateEquipmentSetGuid();
2570925688

25710-
EquipmentSetUpdateState oldState = eqSlot.State;
25689+
EquipmentSetInfo& eqSlot = _equipmentSets[setGuid];
2571125690
eqSlot.Data = eqSet;
2571225691

2571325692
if (eqSet.Guid == 0)
2571425693
{
25715-
eqSlot.Data.Guid = sObjectMgr->GenerateEquipmentSetGuid();
25694+
eqSlot.Data.Guid = setGuid;
2571625695

2571725696
WorldPacket data(SMSG_EQUIPMENT_SET_SAVED, 4 + 1);
2571825697
data << uint32(eqSlot.Data.SetID);
2571925698
data.appendPackGUID(eqSlot.Data.Guid);
2572025699
SendDirectMessage(&data);
2572125700
}
2572225701

25723-
eqSlot.State = (oldState == EQUIPMENT_SET_NEW ? EQUIPMENT_SET_NEW : EQUIPMENT_SET_CHANGED);
25702+
eqSlot.State = (eqSlot.State == EQUIPMENT_SET_NEW ? EQUIPMENT_SET_NEW : EQUIPMENT_SET_CHANGED);
2572425703
}
2572525704

2572625705
void Player::_SaveEquipmentSets(CharacterDatabaseTransaction trans)
@@ -26441,18 +26420,6 @@ float Player::GetAverageItemLevel() const
2644126420
return ((float)sum) / count;
2644226421
}
2644326422

26444-
void Player::_LoadInstanceTimeRestrictions(PreparedQueryResult result)
26445-
{
26446-
if (!result)
26447-
return;
26448-
26449-
do
26450-
{
26451-
Field* fields = result->Fetch();
26452-
_instanceResetTimes.insert(InstanceTimeMap::value_type(fields[0].GetUInt32(), fields[1].GetUInt64()));
26453-
} while (result->NextRow());
26454-
}
26455-
2645626423
void Player::_LoadPetStable(uint8 petStableSlots, PreparedQueryResult result)
2645726424
{
2645826425
if (!petStableSlots && !result)
@@ -26502,25 +26469,6 @@ void Player::_LoadPetStable(uint8 petStableSlots, PreparedQueryResult result)
2650226469
}
2650326470
}
2650426471

26505-
void Player::_SaveInstanceTimeRestrictions(CharacterDatabaseTransaction trans)
26506-
{
26507-
if (_instanceResetTimes.empty())
26508-
return;
26509-
26510-
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ACCOUNT_INSTANCE_LOCK_TIMES);
26511-
stmt->setUInt32(0, GetSession()->GetAccountId());
26512-
trans->Append(stmt);
26513-
26514-
for (InstanceTimeMap::const_iterator itr = _instanceResetTimes.begin(); itr != _instanceResetTimes.end(); ++itr)
26515-
{
26516-
stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_ACCOUNT_INSTANCE_LOCK_TIMES);
26517-
stmt->setUInt32(0, GetSession()->GetAccountId());
26518-
stmt->setUInt32(1, itr->first);
26519-
stmt->setUInt64(2, itr->second);
26520-
trans->Append(stmt);
26521-
}
26522-
}
26523-
2652426472
bool Player::IsInWhisperWhiteList(ObjectGuid guid)
2652526473
{
2652626474
for (GuidList::const_iterator itr = WhisperList.begin(); itr != WhisperList.end(); ++itr)

src/server/game/Entities/Player/Player.h

Lines changed: 34 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,6 @@ typedef std::unordered_map<uint32, PlayerTalent*> PlayerTalentMap;
155155
typedef std::unordered_map<uint32, PlayerSpell> PlayerSpellMap;
156156
typedef std::unordered_set<SpellModifier*> SpellModContainer;
157157

158-
typedef std::unordered_map<uint32 /*instanceId*/, time_t/*releaseTime*/> InstanceTimeMap;
159-
160158
enum ActionButtonUpdateState
161159
{
162160
ACTIONBUTTON_UNCHANGED = 0,
@@ -705,41 +703,40 @@ enum PlayedTimeIndex
705703
// used at player loading query list preparing, and later result selection
706704
enum PlayerLoginQueryIndex
707705
{
708-
PLAYER_LOGIN_QUERY_LOAD_FROM = 0,
709-
PLAYER_LOGIN_QUERY_LOAD_GROUP = 1,
710-
PLAYER_LOGIN_QUERY_LOAD_BOUND_INSTANCES = 2,
711-
PLAYER_LOGIN_QUERY_LOAD_AURAS = 3,
712-
PLAYER_LOGIN_QUERY_LOAD_SPELLS = 4,
713-
PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS = 5,
714-
PLAYER_LOGIN_QUERY_LOAD_DAILY_QUEST_STATUS = 6,
715-
PLAYER_LOGIN_QUERY_LOAD_REPUTATION = 7,
716-
PLAYER_LOGIN_QUERY_LOAD_INVENTORY = 8,
717-
PLAYER_LOGIN_QUERY_LOAD_ACTIONS = 9,
718-
PLAYER_LOGIN_QUERY_LOAD_MAILS = 10,
719-
PLAYER_LOGIN_QUERY_LOAD_MAIL_ITEMS = 11,
720-
PLAYER_LOGIN_QUERY_LOAD_SOCIAL_LIST = 12,
721-
PLAYER_LOGIN_QUERY_LOAD_HOME_BIND = 13,
722-
PLAYER_LOGIN_QUERY_LOAD_SPELL_COOLDOWNS = 14,
723-
PLAYER_LOGIN_QUERY_LOAD_DECLINED_NAMES = 15,
724-
PLAYER_LOGIN_QUERY_LOAD_GUILD = 16,
725-
PLAYER_LOGIN_QUERY_LOAD_ARENA_INFO = 17,
726-
PLAYER_LOGIN_QUERY_LOAD_ACHIEVEMENTS = 18,
727-
PLAYER_LOGIN_QUERY_LOAD_CRITERIA_PROGRESS = 19,
728-
PLAYER_LOGIN_QUERY_LOAD_EQUIPMENT_SETS = 20,
729-
PLAYER_LOGIN_QUERY_LOAD_BG_DATA = 21,
730-
PLAYER_LOGIN_QUERY_LOAD_GLYPHS = 22,
731-
PLAYER_LOGIN_QUERY_LOAD_TALENTS = 23,
732-
PLAYER_LOGIN_QUERY_LOAD_ACCOUNT_DATA = 24,
733-
PLAYER_LOGIN_QUERY_LOAD_SKILLS = 25,
734-
PLAYER_LOGIN_QUERY_LOAD_WEEKLY_QUEST_STATUS = 26,
735-
PLAYER_LOGIN_QUERY_LOAD_RANDOM_BG = 27,
736-
PLAYER_LOGIN_QUERY_LOAD_BANNED = 28,
737-
PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_REW = 29,
738-
PLAYER_LOGIN_QUERY_LOAD_INSTANCE_LOCK_TIMES = 30,
739-
PLAYER_LOGIN_QUERY_LOAD_SEASONAL_QUEST_STATUS = 31,
740-
PLAYER_LOGIN_QUERY_LOAD_MONTHLY_QUEST_STATUS = 32,
741-
PLAYER_LOGIN_QUERY_LOAD_CORPSE_LOCATION = 33,
742-
PLAYER_LOGIN_QUERY_LOAD_PET_SLOTS = 34,
706+
PLAYER_LOGIN_QUERY_LOAD_FROM,
707+
PLAYER_LOGIN_QUERY_LOAD_GROUP,
708+
PLAYER_LOGIN_QUERY_LOAD_BOUND_INSTANCES,
709+
PLAYER_LOGIN_QUERY_LOAD_AURAS,
710+
PLAYER_LOGIN_QUERY_LOAD_SPELLS,
711+
PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS,
712+
PLAYER_LOGIN_QUERY_LOAD_DAILY_QUEST_STATUS,
713+
PLAYER_LOGIN_QUERY_LOAD_REPUTATION,
714+
PLAYER_LOGIN_QUERY_LOAD_INVENTORY,
715+
PLAYER_LOGIN_QUERY_LOAD_ACTIONS,
716+
PLAYER_LOGIN_QUERY_LOAD_MAILS,
717+
PLAYER_LOGIN_QUERY_LOAD_MAIL_ITEMS,
718+
PLAYER_LOGIN_QUERY_LOAD_SOCIAL_LIST,
719+
PLAYER_LOGIN_QUERY_LOAD_HOME_BIND,
720+
PLAYER_LOGIN_QUERY_LOAD_SPELL_COOLDOWNS,
721+
PLAYER_LOGIN_QUERY_LOAD_DECLINED_NAMES,
722+
PLAYER_LOGIN_QUERY_LOAD_GUILD,
723+
PLAYER_LOGIN_QUERY_LOAD_ARENA_INFO,
724+
PLAYER_LOGIN_QUERY_LOAD_ACHIEVEMENTS,
725+
PLAYER_LOGIN_QUERY_LOAD_CRITERIA_PROGRESS,
726+
PLAYER_LOGIN_QUERY_LOAD_EQUIPMENT_SETS,
727+
PLAYER_LOGIN_QUERY_LOAD_BG_DATA,
728+
PLAYER_LOGIN_QUERY_LOAD_GLYPHS,
729+
PLAYER_LOGIN_QUERY_LOAD_TALENTS,
730+
PLAYER_LOGIN_QUERY_LOAD_ACCOUNT_DATA,
731+
PLAYER_LOGIN_QUERY_LOAD_SKILLS,
732+
PLAYER_LOGIN_QUERY_LOAD_WEEKLY_QUEST_STATUS,
733+
PLAYER_LOGIN_QUERY_LOAD_RANDOM_BG,
734+
PLAYER_LOGIN_QUERY_LOAD_BANNED,
735+
PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_REW,
736+
PLAYER_LOGIN_QUERY_LOAD_SEASONAL_QUEST_STATUS,
737+
PLAYER_LOGIN_QUERY_LOAD_MONTHLY_QUEST_STATUS,
738+
PLAYER_LOGIN_QUERY_LOAD_CORPSE_LOCATION,
739+
PLAYER_LOGIN_QUERY_LOAD_PET_SLOTS,
743740
MAX_PLAYER_LOGIN_QUERY
744741
};
745742

@@ -2090,8 +2087,6 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
20902087
void SendSavedInstances();
20912088
bool Satisfy(AccessRequirement const* ar, uint32 target_map, bool report = false);
20922089
bool CheckInstanceValidity(bool /*isLogin*/);
2093-
bool CheckInstanceCount(uint32 instanceId) const;
2094-
void AddInstanceEnterTime(uint32 instanceId, time_t enterTime);
20952090

20962091
// last used pet number (for BG's)
20972092
uint32 GetLastPetNumber() const { return m_lastpetnumber; }
@@ -2269,7 +2264,6 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
22692264
void _LoadBGData(PreparedQueryResult result);
22702265
void _LoadGlyphs(PreparedQueryResult result);
22712266
void _LoadTalents(PreparedQueryResult result);
2272-
void _LoadInstanceTimeRestrictions(PreparedQueryResult result);
22732267
void _LoadPetStable(uint8 petStableSlots, PreparedQueryResult result);
22742268

22752269
/*********************************************************/
@@ -2292,7 +2286,6 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
22922286
void _SaveGlyphs(CharacterDatabaseTransaction trans) const;
22932287
void _SaveTalents(CharacterDatabaseTransaction trans);
22942288
void _SaveStats(CharacterDatabaseTransaction trans) const;
2295-
void _SaveInstanceTimeRestrictions(CharacterDatabaseTransaction trans);
22962289

22972290
/*********************************************************/
22982291
/*** ENVIRONMENTAL SYSTEM ***/
@@ -2513,7 +2506,6 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
25132506

25142507
uint32 m_ChampioningFaction;
25152508

2516-
InstanceTimeMap _instanceResetTimes;
25172509
uint32 _pendingBindId;
25182510
uint32 _pendingBindTimer;
25192511

src/server/game/Handlers/CharacterHandler.cpp

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,6 @@ bool LoginQueryHolder::Initialize()
205205
stmt->setUInt32(0, lowGuid);
206206
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_REW, stmt);
207207

208-
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ACCOUNT_INSTANCELOCKTIMES);
209-
stmt->setUInt32(0, m_accountId);
210-
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_INSTANCE_LOCK_TIMES, stmt);
211-
212208
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CORPSE_LOCATION);
213209
stmt->setUInt32(0, lowGuid);
214210
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_CORPSE_LOCATION, stmt);
@@ -1674,6 +1670,7 @@ void WorldSession::HandleCharFactionOrRaceChangeCallback(std::shared_ptr<Charact
16741670
uint32 atLoginFlags = fields[0].GetUInt16();
16751671
std::string knownTitlesStr = fields[1].GetString();
16761672
uint32 groupId = !fields[2].IsNull() ? fields[2].GetUInt32() : 0;
1673+
uint32 mapId = fields[3].GetUInt16();
16771674

16781675
uint32 usedLoginFlag = (factionChangeInfo->FactionChange ? AT_LOGIN_CHANGE_FACTION : AT_LOGIN_CHANGE_RACE);
16791676
if (!(atLoginFlags & usedLoginFlag))
@@ -1682,6 +1679,18 @@ void WorldSession::HandleCharFactionOrRaceChangeCallback(std::shared_ptr<Charact
16821679
return;
16831680
}
16841681

1682+
if (level < 10)
1683+
{
1684+
SendCharFactionChange(CHAR_CREATE_ERROR, factionChangeInfo.get());
1685+
return;
1686+
}
1687+
1688+
if (playerClass == CLASS_DEATH_KNIGHT && (level < 60 || mapId == 609))
1689+
{
1690+
SendCharFactionChange(CHAR_CREATE_RESTRICTED_RACECLASS, factionChangeInfo.get());
1691+
return;
1692+
}
1693+
16851694
uint32 newTeam = Player::TeamForRace(factionChangeInfo->Race);
16861695
if (factionChangeInfo->FactionChange == (Player::TeamForRace(oldRace) == newTeam))
16871696
{

src/server/game/Maps/Map.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3908,7 +3908,7 @@ bool InstanceMap::AddPlayerToMap(Player* player)
39083908

39093909
// increase current instances (hourly limit)
39103910
if (!group || !group->isLFGGroup())
3911-
player->AddInstanceEnterTime(GetInstanceId(), GameTime::GetGameTime());
3911+
player->GetSession()->AddInstanceEnterTime(GetInstanceId(), GameTime::GetSystemTime());
39123912

39133913
// get or create an instance save for the map
39143914
InstanceSave* mapSave = sInstanceSaveMgr->GetInstanceSave(GetInstanceId());

src/server/game/Maps/MapManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ Map::EnterState MapManager::PlayerCannotEnter(uint32 mapid, Player* player, bool
205205
instanceIdToCheck = save->GetInstanceId();
206206

207207
// instanceId can never be 0 - will not be found
208-
if (!player->CheckInstanceCount(instanceIdToCheck) && !player->isDead())
208+
if (!player->GetSession()->UpdateAndCheckInstanceCount(instanceIdToCheck) && !player->isDead())
209209
return Map::CANNOT_ENTER_TOO_MANY_INSTANCES;
210210
}
211211

0 commit comments

Comments
 (0)