Jump to content

mumion

Members
  • Posts

    5
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by mumion

  1. Problem: After reaching max level (80) the player receives the bonus gold for each time he turns in a daily quests Fix: rewrite code in that way the experience points or gold is only given the first time the quest is turned in diff --git a/src/game/Player.cpp b/src/game/Player.cpp index d16196b..f579213 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -13930,15 +13930,21 @@ void Player::RewardQuest(Quest const *pQuest, uint32 reward, Object* questGiver, QuestStatusData& q_status = mQuestStatus[quest_id]; // Not give XP in case already completed once repeatable quest - uint32 XP = q_status.m_rewarded ? 0 : uint32(pQuest->XPValue(this)*sWorld.getConfig(CONFIG_FLOAT_RATE_XP_QUEST)); + uint32 xp = 0; + if ( !q_status.m_rewarded ) + { + if (getLevel() < sWorld.getConfig(CONFIG_UINT32_MAX_PLAYER_LEVEL)) + { + xp = uint32(pQuest->XPValue(this)*sWorld.getConfig(CONFIG_FLOAT_RATE_XP_QUEST)); + GiveXP( xp, NULL); + } + else + { + uint32 money = uint32(pQuest->GetRewMoneyMaxLevel() * sWorld.getConfig(CONFIG_FLOAT_RATE_DROP_MONEY)); + ModifyMoney( money ); + GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_MONEY_FROM_QUEST_REWARD, money); + } - if (getLevel() < sWorld.getConfig(CONFIG_UINT32_MAX_PLAYER_LEVEL)) - GiveXP(XP , NULL); - else - { - uint32 money = uint32(pQuest->GetRewMoneyMaxLevel() * sWorld.getConfig(CONFIG_FLOAT_RATE_DROP_MONEY)); - ModifyMoney( money ); - GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_MONEY_FROM_QUEST_REWARD, money); } // Give player extra money if GetRewOrReqMoney > 0 and get ReqMoney if negative @@ -13993,7 +13999,7 @@ void Player::RewardQuest(Quest const *pQuest, uint32 reward, Object* questGiver, q_status.uState = QUEST_CHANGED; if (announce) - SendQuestReward(pQuest, XP, questGiver); + SendQuestReward(pQuest, xp, questGiver); bool handled = false; Sorry for not putting it into a code block but it totally spoils the view
  2. Sadly you are right. I have tested it again and it does not work. Maybe I should not test patches after 2300 because I don't get it right
  3. The warrior talent sudden death does not work. The aura is triggered but you cannot use execute on the enemy. This patch fixes this so the warrior can use execute anytime he has the aura active no matter if the foe is already wounded enough. index 0c80e73..2cd936c 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -4475,7 +4475,7 @@ SpellCastResult Spell::CheckCast(bool strict) { if(m_spellInfo->SpellIconID == 1648) // Execute { - if(!m_targets.getUnitTarget() || m_targets.getUnitTarget()->GetHealth() > m_targets.getUnitTarget()->GetMaxHealth()*0.2) + if(!m_caster->HasAura(52437) && (!m_targets.getUnitTarget() || m_targets.getUnitTarget()->GetHealth() > m_targets.getUnitTarget()->GetMaxHealth()*0.2) ) return SPELL_FAILED_BAD_TARGETS; } else if (m_spellInfo->Id == 51582) // Rocket Boots Engaged
  4. seems that in this case it has been two heads with one idea
  5. The following patch fixes the build on ubuntu 9.04 diff --git a/src/game/TargetedMovementGenerator.cpp b/src/game/TargetedMovementGenerator.cpp index 3d68e39..39cf775 100644 --- a/src/game/TargetedMovementGenerator.cpp +++ b/src/game/TargetedMovementGenerator.cpp @@ -227,6 +227,24 @@ void ChaseMovementGenerator<T>::Reset(T &owner) //-----------------------------------------------// template<> +void FollowMovementGenerator<Player>::_updateSpeed(Player &) +{ + // nothing to do for Player +} + +template<> +void FollowMovementGenerator<Creature>::_updateSpeed(Creature &u) +{ + // pet only sync speed with owner + if (!((Creature&)u).isPet() || !i_target.isValid() || i_target->GetGUID() != u.GetOwnerGUID()) + return; + + u.UpdateSpeed(MOVE_RUN,true); + u.UpdateSpeed(MOVE_WALK,true); + u.UpdateSpeed(MOVE_SWIM,true); +} + +template<> void FollowMovementGenerator<Creature>::_updateWalkMode(Creature &u) { if (i_target.isValid() && u.isPet()) @@ -282,24 +300,6 @@ void FollowMovementGenerator<T>::Reset(T &owner) Initialize(owner); } -template<> -void FollowMovementGenerator<Player>::_updateSpeed(Player &u) -{ - // nothing to do for Player -} - -template<> -void FollowMovementGenerator<Creature>::_updateSpeed(Creature &u) -{ - // pet only sync speed with owner - if (!((Creature&)u).isPet() || !i_target.isValid() || i_target->GetGUID() != u.GetOwnerGUID()) - return; - - u.UpdateSpeed(MOVE_RUN,true); - u.UpdateSpeed(MOVE_WALK,true); - u.UpdateSpeed(MOVE_SWIM,true); -} - //-----------------------------------------------// template void TargetedMovementGeneratorMedium<Player,ChaseMovementGenerator<Player> >::_setTargetLocation(Player &); template void TargetedMovementGeneratorMedium<Player,FollowMovementGenerator<Player> >::_setTargetLocation(Player &);
×
×
  • 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