Core/Players: Fixed tabard championing in normal modes of WotLK level 80 dungeons

Closes #9227
This commit is contained in:
Shauren committed 2013-05-04 20:50:14 +02:00
1 parent 80769a4366
commit 45bae8d4b7
4 files changed
+22 -7

No files matched your search

+16
View File
@@ -892,3 +892,19 @@ CharStartOutfitEntry const* GetCharStartOutfitEntry(uint8 race, uint8 class_, ui
return itr->second;
}
/// Returns LFGDungeonEntry for a specific map and difficulty. Will return first found entry if multiple dungeons use the same map (such as Scarlet Monastery)
LFGDungeonEntry const* GetLFGDungeon(uint32 mapId, Difficulty difficulty)
{
for (uint32 i = 0; i < sLFGDungeonStore.GetNumRows(); ++i)
{
LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(i);
if (!dungeon)
continue;
if (dungeon->map == mapId && Difficulty(dungeon->difficulty) == difficulty)
return dungeon;
}
return NULL;
}
+2
View File
@@ -67,6 +67,8 @@ PvPDifficultyEntry const* GetBattlegroundBracketById(uint32 mapid, BattlegroundB
CharStartOutfitEntry const* GetCharStartOutfitEntry(uint8 race, uint8 class_, uint8 gender);
LFGDungeonEntry const* GetLFGDungeon(uint32 mapId, Difficulty difficulty);
extern DBCStorage <AchievementEntry> sAchievementStore;
extern DBCStorage <AchievementCriteriaEntry> sAchievementCriteriaStore;
extern DBCStorage <AreaTableEntry> sAreaStore;// recommend access using functions
+3 -6
View File
@@ -5019,7 +5019,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
if (updateRealmChars)
sWorld->UpdateRealmCharCount(accountId);
sWorld->DeleteCharacterNameData(GUID_LOPART(guid));
sWorld->DeleteCharacterNameData(guid);
}
/**
@@ -7036,14 +7036,11 @@ void Player::RewardReputation(Unit* victim, float rate)
if (GetChampioningFaction())
{
// support for: Championing - http://www.wowwiki.com/Championing
Map const* map = GetMap();
if (map && map->IsNonRaidDungeon())
{
if (AccessRequirement const* accessRequirement = sObjectMgr->GetAccessRequirement(map->GetId(), map->GetDifficulty()))
if (accessRequirement->levelMin == 80)
if (LFGDungeonEntry const* dungeon = GetLFGDungeon(map->GetId(), map->GetDifficulty()))
if (dungeon->reclevel == 80)
ChampioningFaction = GetChampioningFaction();
}
}
uint32 team = GetTeam();
+1 -1
View File
@@ -2209,7 +2209,7 @@ void Unit::SendMeleeAttackStop(Unit* victim)
{
WorldPacket data(SMSG_ATTACKSTOP, (8+8+4));
data.append(GetPackGUID());
data.append(victim ? victim->GetPackGUID() : 0);
data.appendPackGUID(victim ? victim->GetGUID() : 0);
data << uint32(0); //! Can also take the value 0x01, which seems related to updating rotation
SendMessageToSet(&data, true);
sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Sent SMSG_ATTACKSTOP");