kohl
Members-
Posts
6 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
kohl's Achievements
Newbie (1/3)
0
Reputation
-
Hi, i have searched the forums and the internet and haven't found anything similiar to what I wanted. I would like a client that could connect to a mangos server with the only purpose of using the chat channels. It would simulate the connection, login and realm/character selection, log in to world and nothing more. I found MangChat, it's very close to it, but requires a lot of code modifications and I want something that doesn't touch the mangos code, so I can connect on any server. If there isn't any, how hard would it be to develop one? I have some knowledge on programming, tried to make a program that connect and interact with a mangos server but wasnt sucessful, I couldn't seem to understand what exactly I should send/receive. Thanks in advance.
-
probably because I forgot that rank 2 is also a talent is must be removed from trainers too, I updated my post on UDB forums.However, after rev 8039 you shouldn't be getting this problem, since talents doesn't go to trainers anymore. I tested without training this talent from trainers and I don't get my talents reseted on login.
-
That's because Spiritual Attunement is a talent and is currently available at Paladin Trainer. If you train Spiritual Attunement (Rank 1), after relogging you WILL get your talents reset. Fix: http://udbforums.org/index.php?topic=13264.0
-
hm ok, so level 80 dungeons, in normal mode, doesn't require level 80 to enter. so I can't think in a way to know that instance is considered "level 80 dungeon" other than creating a new column in instance_template table with some kind of flag indicating that championing tabards are, for example (0 = not avalilable; 1 = available only in heroic; 2 = available in both difficulties), but I don't know it's worth it.
-
that's covered by this check: if (mInstance->levelMin == 80) since its minlevel for normal mode is 80, this patch applies to this difficulty mode too
-
I've been thinking about this for a while and after looking to your patch and another posted in theses forums, I think that finally I've found a generic way to determine which instance is eligible for the championing system. 1. I check for the min_level == 80 from instance_template table and the data from DBCs to know if it's a WotLK instance and heroic. 2. I think that implementing the aura 57818 (HasTabard) is a better way to know if the player has it or not, checking a boolean value is much faster than iterating an array every time you gain a reputation. So I created a boolean var in Player class. 3. Needless to say, you need DB support for that to work (entries in creature_onkill_reputation for every trash / boss) Here's my version of this patch: diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 22bf563..7dd8eeb 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -416,6 +416,7 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this), m_reputa /////////////////// Instance System ///////////////////// + m_HasTabard = false; m_HomebindTimer = 0; m_InstanceValid = true; m_dungeonDifficulty = DIFFICULTY_NORMAL; @@ -5761,15 +5762,32 @@ void Player::RewardReputation(Unit *pVictim, float rate) return; ReputationOnKillEntry const* Rep = objmgr.GetReputationOnKilEntry(((Creature*)pVictim)->GetCreatureInfo()->Entry); + uint32 tabardFactionID = 0; if(!Rep) return; + // Championing System + if (m_HasTabard) + { + InstanceTemplate const* mInstance = objmgr.GetInstanceTemplate(pVictim->GetMapId()); + MapEntry const* StoredMap = sMapStore.LookupEntry(pVictim->GetMapId()); + bool heroic = pVictim->GetMap()->IsHeroic(); + + // All reputation gains while in level 80 dungeons will be applied to your standing with <faction>. + if (mInstance->levelMin == 80 || (StoredMap->Expansion() == 2 && heroic)) + { + Item* tabard = GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_TABARD); + if (tabard) + tabardFactionID = tabard->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) ? tabardFactionID : Rep->repfaction1, false); donerep1 = int32(donerep1*rate); - FactionEntry const *factionEntry1 = sFactionStore.LookupEntry(Rep->repfaction1); + FactionEntry const *factionEntry1 = sFactionStore.LookupEntry((tabardFactionID) ? tabardFactionID : Rep->repfaction1); uint32 current_reputation_rank1 = GetReputationMgr().GetRank(factionEntry1); if (factionEntry1 && current_reputation_rank1 <= Rep->reputation_max_cap1) GetReputationMgr().ModifyReputation(factionEntry1, donerep1); @@ -5785,9 +5803,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) ? tabardFactionID : Rep->repfaction2, false); donerep2 = int32(donerep2*rate); - FactionEntry const *factionEntry2 = sFactionStore.LookupEntry(Rep->repfaction2); + FactionEntry const *factionEntry2 = sFactionStore.LookupEntry((tabardFactionID) ? tabardFactionID : Rep->repfaction2); uint32 current_reputation_rank2 = GetReputationMgr().GetRank(factionEntry2); if (factionEntry2 && current_reputation_rank2 <= Rep->reputation_max_cap2) GetReputationMgr().ModifyReputation(factionEntry2, donerep2); diff --git a/src/game/Player.h b/src/game/Player.h index ef17815..9182810 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -2034,6 +2034,7 @@ class MANGOS_DLL_SPEC Player : public Unit void UpdateHomebindTime(uint32 time); + bool m_HasTabard; uint32 m_HomebindTimer; bool m_InstanceValid; // permanent binds and solo binds by difficulty diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 2c45612..00b8578 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -2276,6 +2276,13 @@ void Aura::HandleAuraDummy(bool apply, bool Real) m_target->PlayDirectSound(14972, (Player *)m_target); } return; + // HasTabard (Championing System) + case 57818: + if (caster && caster->GetTypeId() == TYPEID_PLAYER) + { + ((Player*)caster)->m_HasTabard = apply; + } + return; } break; }
Contact Us
To contact us
click here
You can also email us at [email protected]
Privacy Policy | Terms & Conditions
You can also email us at [email protected]
Privacy Policy | Terms & Conditions
Copyright © getMaNGOS. All rights Reserved.
This website is in no way associated with or endorsed by Blizzard Entertainment®
This website is in no way associated with or endorsed by Blizzard Entertainment®