Jump to content

Ramses_II

Members
  • Posts

    4
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Ramses_II

  1. Hi, sry for the late answer. I'm not really active atm, cause im really busy. Yes this patch will alow (e.g a script) to call GroupKilledMonster for a group member and the credit (entry) will be awarded for all group members with active quest. So this code is no longer needed in script library (it's also unwanted there). The patch is quite old and I don't know if it currently compiles. I will try to find the time to check and update the patch during the next week.
  2. RA and Cli-Console are bundled, if you disable console you are not able to use RA. (this was my experince) Cause I do not use RA or Console I don't care. Using mangos as a daemon since some years now without problems. just need a good starting/restarting script. (search the forum, or just write one)
  3. I don't know exactly what you mean. Merging all functions updating quest objectives is not a good idea imo. Not all quest objectives are handled in the same way. Btw. shareable quests do not mean counting objectives for group members, it says quest can be given to group meber with share quest button. Counting kills of quest creatures for groups is done in Player::RewardPlayerAndGroupAtKill(Unit* Victim) this is the correct place for it, also handling everything related to creature kills like XP, honor etc. This patch is only needed for external scripts which need to count creature kills without rewarding the kill itself. (e.g. quest triggers) my method GroupKilledMonster is used like Player::GroupEventHappens perhaps this makes it more clear.
  4. What features does the patch add? a possibility to send KilledMonster to all group members from script library is needed. For which revision was the patch created? 6841 commit [42d0d95d08c672cfcaf8c707453d6654a7270d33] *master Additional info Using Player::RewardPlayerAndGroupAtKill(Unit* Victim) from scripts is not a good idea, so I decided to create an additional method: void Player::GroupKilledMonster( uint32 entry, uint64 guid ) this reproduces some code from Player::RewardPlayerAndGroupAtKill(Unit* Victim) but seems like the best solution for me. any comments are welcome diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 17b5e37..d0a552e 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -13054,6 +13054,24 @@ void Player::KilledMonster( uint32 entry, uint64 guid ) } } +void Player::GroupKilledMonster( uint32 entry, uint64 guid ) +{ + if (Group *pGroup = GetGroup()) + { + for( GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next() ) + { + Player* pGroupGuy = itr->getSource(); + if ( !pGroupGuy ) + continue; + if ( !pGroupGuy->IsAtGroupRewardDistance( this )) + continue; + + if ( pGroupGuy->isAlive() || !pGroupGuy->GetCorpse() ) + pGroupGuy->KilledMonster( entry, guid); + } + } else KilledMonster( entry, guid ); +} + void Player::CastedCreatureOrGO( uint32 entry, uint64 guid, uint32 spell_id ) { bool isCreature = IS_CREATURE_GUID(guid); @@ -16815,7 +16833,7 @@ uint32 Player::GetMaxPersonalArenaRatingRequirement() } return max_personal_rating; } - + void Player::UpdateHomebindTime(uint32 time) { // GMs never get homebind timer online diff --git a/src/game/Player.h b/src/game/Player.h index 2bf300e..b7e6b84 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -1218,6 +1218,7 @@ class MANGOS_DLL_SPEC Player : public Unit void ItemAddedQuestCheck( uint32 entry, uint32 count ); void ItemRemovedQuestCheck( uint32 entry, uint32 count ); void KilledMonster( uint32 entry, uint64 guid ); + void GroupKilledMonster( uint32 entry, uint64 guid ); void CastedCreatureOrGO( uint32 entry, uint64 guid, uint32 spell_id ); void TalkedToCreature( uint32 entry, uint64 guid ); void MoneyChanged( uint32 value );
×
×
  • 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