Jump to content

eNeRGy

Members
  • Posts

    34
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by eNeRGy

  1. or... wait a second... got it! Use already coded db support(with creature_onkill_reputation), and add this new feature to it:P (look at first post of this thread)
  2. Instance - mode - minlevel - recommended level - group size Halls of Lightning (NORMAL Mode) 75 (80) 5 The Oculus (NORMAL Mode) 75 (80) 5 Caverns of Time: Culling of Stratholme (NORMAL Mode) 75 (80) 5 Utgarde Pinnacle (NORMAL Mode) 75 (80) 5 so, there is something wrong, levelmin should be 75
  3. And don't forget about pre-heroic reputation gains in some high-level instances(Oculus, Ulduar:Halls of Stone, etc)
  4. I'll try to look at this problem. Seems like there is should be some faction flag, that tells us how to deliver reputation(to parent faction, or to all child factions) Nope, this is test sql data(for 2 bosses only). Thanks, first post updated.
  5. Thanks, TOM_RUS ! First post updated. Please test it.
  6. What bug does the patch fix? What features does the patch add? This patch adds reputation tabard "championing" for WOTLK factions For which repository revision was the patch created? 8001 Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread. Yes, this thread Who has been writing this patch? Please include either forum user names or email addresses. Me, Energy. Patch code(insert it into textfile and rename it to .patch, then apply): diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 8126abc..9acb0af 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -5731,6 +5731,7 @@ int32 Player::CalculateReputationGain(uint32 creatureOrQuestLevel, int32 rep, in //Calculates how many reputation points player gains in victim's enemy factions void Player::RewardReputation(Unit *pVictim, float rate) { + uint32 tabardFactionID = 0; if(!pVictim || pVictim->GetTypeId() == TYPEID_PLAYER) return; @@ -5739,11 +5740,28 @@ void Player::RewardReputation(Unit *pVictim, float rate) if(!Rep) return; + // Northrend tabards reputation bonus + if(HasAura(57818) && (Rep->repfaction1 == 1037) && (Rep->repfaction2 == 1052)) + { + Item* pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_TABARD ); + if(item) + tabardFactionID = pItem->GetProto()->RequiredReputationFaction; + } + if(Rep->repfaction1 && (!Rep->team_dependent || GetTeam()==ALLIANCE)) { - int32 donerep1 = CalculateReputationGain(pVictim->getLevel(), Rep->repvalue1, Rep->repfaction1, false); + int32 donerep1 = CalculateReputationGain(pVictim->getLevel(), Rep->repvalue1, tabardFactionID == 0 ? Rep->repfaction1 : tabardFactionID, false); donerep1 = int32(donerep1*rate); - FactionEntry const *factionEntry1 = sFactionStore.LookupEntry(Rep->repfaction1); + FactionEntry const *factionEntry1 = sFactionStore.LookupEntry(tabardFactionID == 0 ? Rep->repfaction1 : tabardFactionID); uint32 current_reputation_rank1 = GetReputationMgr().GetRank(factionEntry1); if (factionEntry1 && current_reputation_rank1 <= Rep->reputation_max_cap1) GetReputationMgr().ModifyReputation(factionEntry1, donerep1); @@ -5759,9 +5777,9 @@ void Player::RewardReputation(Unit *pVictim, float rate) if(Rep->repfaction2 && (!Rep->team_dependent || GetTeam()==HORDE)) { - int32 donerep2 = CalculateReputationGain(pVictim->getLevel(), Rep->repvalue2, Rep->repfaction2, false); + int32 donerep2 = CalculateReputationGain(pVictim->getLevel(), Rep->repvalue2, tabardFactionID == 0 ? Rep->repfaction2 : tabardFactionID, false); donerep2 = int32(donerep2*rate); - FactionEntry const *factionEntry2 = sFactionStore.LookupEntry(Rep->repfaction2); + FactionEntry const *factionEntry2 = sFactionStore.LookupEntry(tabardFactionID == 0 ? Rep->repfaction2 : tabardFactionID); uint32 current_reputation_rank2 = GetReputationMgr().GetRank(factionEntry2); if (factionEntry2 && current_reputation_rank2 <= Rep->reputation_max_cap2) GetReputationMgr().ModifyReputation(factionEntry2, donerep2); If we have correct values in `creature_onkill_reputation` table(RewOnKillRepFaction1 == 1037(Alliance Vanguard), and RewOnKillRepFaction2 == 1052(Horde Expedition)), it looks for tabard auras on player, and changing faction id if needed(tabard equipped). Example creature_onkill_reputation data: -- Loken Heroic INSERT INTO `creature_onkill_reputation` VALUES (31538, 1037, 1052, 7, 0, 250, 7, 0, 250, 1); -- Loken Normal INSERT INTO `creature_onkill_reputation` VALUES (28923, 1037, 1052, 7, 0, 50, 7, 0, 50, 1); -- Keristrasza heroic INSERT INTO `creature_onkill_reputation` VALUES (30540, 1037, 1052, 7, 0, 250, 7, 0, 250, 1); -- Keristrasza normal should not give any reputation -- INSERT INTO `creature_onkill_reputation` VALUES (26723, 1037, 1052, 7, 0, 50, 7, 0, 50, 1); This worked as intended for me, but there is one bug with MaNGOS's reputation system(not this patch): if faction(that we trying to increase reputation with) have child factions (i.e. Alliance Vanguard has sub-factions:Explorers' League, The Frostborn, The Silver Covenant, Valiance Expedition), that faction doesn't receive any rep, but all of child factions' reputation is being increased by same amount(250 on heroic and 50 on normal in this case).
  7. RMDC was changed their IPs, so you need to flush DNS cache. otherwise you'll see old hosting with closed board:P
  8. <div class='quotetop'>QUOTE (wolfdragon @ Jul 7 2008, 07:17 AM) <{POST_SNAPBACK}></div> yep, true
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use