Correct SMSG_INSTANCE_DIFFICULTY structure (fixes raid difficulty display).
Move GetDifficulty() in under Map-scope, so it's reachable for map-based functions --HG-- branch : trunk
This commit is contained in:
+1
-1
@@ -2740,7 +2740,7 @@ void InstanceMap::SetResetSchedule(bool on)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MapDifficulty const* InstanceMap::GetMapDifficulty() const
|
MapDifficulty const* Map::GetMapDifficulty() const
|
||||||
{
|
{
|
||||||
return GetMapDifficultyData(GetId(),GetDifficulty());
|
return GetMapDifficultyData(GetId(),GetDifficulty());
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-4
@@ -357,6 +357,11 @@ class Map : public GridRefManager<NGridType>, public Trinity::ObjectLevelLockabl
|
|||||||
virtual bool CanEnter(Player* /*player*/) { return true; }
|
virtual bool CanEnter(Player* /*player*/) { return true; }
|
||||||
const char* GetMapName() const;
|
const char* GetMapName() const;
|
||||||
|
|
||||||
|
// have meaning only for instanced map (that have set real difficulty)
|
||||||
|
Difficulty GetDifficulty() const { return Difficulty(GetSpawnMode()); }
|
||||||
|
bool IsRegularDifficulty() const { return GetDifficulty() == REGULAR_DIFFICULTY; }
|
||||||
|
MapDifficulty const* GetMapDifficulty() const;
|
||||||
|
|
||||||
bool Instanceable() const { return i_mapEntry && i_mapEntry->Instanceable(); }
|
bool Instanceable() const { return i_mapEntry && i_mapEntry->Instanceable(); }
|
||||||
// NOTE: this duplicate of Instanceable(), but Instanceable() can be changed when BG also will be instanceable
|
// NOTE: this duplicate of Instanceable(), but Instanceable() can be changed when BG also will be instanceable
|
||||||
bool IsDungeon() const { return i_mapEntry && i_mapEntry->IsDungeon(); }
|
bool IsDungeon() const { return i_mapEntry && i_mapEntry->IsDungeon(); }
|
||||||
@@ -581,12 +586,8 @@ class InstanceMap : public Map
|
|||||||
void SendResetWarnings(uint32 timeLeft) const;
|
void SendResetWarnings(uint32 timeLeft) const;
|
||||||
void SetResetSchedule(bool on);
|
void SetResetSchedule(bool on);
|
||||||
|
|
||||||
// have meaning only for instanced map (that have set real difficulty)
|
|
||||||
Difficulty GetDifficulty() const { return Difficulty(GetSpawnMode()); }
|
|
||||||
bool IsRegularDifficulty() const { return GetDifficulty() == REGULAR_DIFFICULTY; }
|
|
||||||
uint32 GetMaxPlayers() const;
|
uint32 GetMaxPlayers() const;
|
||||||
uint32 GetMaxResetDelay() const;
|
uint32 GetMaxResetDelay() const;
|
||||||
MapDifficulty const* GetMapDifficulty() const;
|
|
||||||
|
|
||||||
virtual void InitVisibilityDistance();
|
virtual void InitVisibilityDistance();
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -20713,6 +20713,10 @@ void Player::SendInitialPacketsBeforeAddToMap()
|
|||||||
SendTalentsInfoData(false);
|
SendTalentsInfoData(false);
|
||||||
|
|
||||||
// SMSG_INSTANCE_DIFFICULTY
|
// SMSG_INSTANCE_DIFFICULTY
|
||||||
|
data.Initialize(SMSG_INSTANCE_DIFFICULTY, 4+4);
|
||||||
|
data << uint32(GetMap()->GetDifficulty());
|
||||||
|
data << uint32(0);
|
||||||
|
GetSession()->SendPacket(&data);
|
||||||
|
|
||||||
SendInitialSpells();
|
SendInitialSpells();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user