mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[12085] Fix a bug with SCRIPT_COMMAND_KILL_CREDIT
This bug can happen if a (group) kill credit is provided without involved creature. Thanks to Atari for pointing!
This commit is contained in:
parent
5d6a28886c
commit
f2578c0e74
2 changed files with 4 additions and 2 deletions
|
|
@ -21070,6 +21070,8 @@ void Player::RewardSinglePlayerAtKill(Unit* pVictim)
|
||||||
|
|
||||||
void Player::RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject* pRewardSource)
|
void Player::RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject* pRewardSource)
|
||||||
{
|
{
|
||||||
|
MANGOS_ASSERT((!GetGroup() || pRewardSource) && "Player::RewardPlayerAndGroupAtEvent called for Group-Case but no source for range searching provided");
|
||||||
|
|
||||||
ObjectGuid creature_guid = pRewardSource && pRewardSource->GetTypeId() == TYPEID_UNIT ? pRewardSource->GetObjectGuid() : ObjectGuid();
|
ObjectGuid creature_guid = pRewardSource && pRewardSource->GetTypeId() == TYPEID_UNIT ? pRewardSource->GetObjectGuid() : ObjectGuid();
|
||||||
|
|
||||||
// prepare data for near group iteration
|
// prepare data for near group iteration
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "12084"
|
#define REVISION_NR "12085"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue