suriyun-production / mmorpg-kit-docs

This is document for MMORPG KIT project (https://www.assetstore.unity3d.com/#!/content/110188?aid=1100lGeN)
https://suriyun-production.github.io/mmorpg-kit-docs
49 stars 10 forks source link

Added OnRewardItem For Immediate Item Rewards #2598

Closed Eniotnacram closed 3 weeks ago

Eniotnacram commented 4 weeks ago

Hello,

I modified the BaseMonsterCharacterEntity "Killed" function To notify the player when an Item is looted when the looting is set to Immediate.

Because the Function didin't call "OnRewardItem" so the Item was not notified.

Those are my changes only for Line 490:

looterEntity.IncreaseItems(_droppingItems[i], characterItem => looterEntity.OnRewardItem(RewardGivenType.KillMonster, characterItem));

I added this: "=> looterEntity.OnRewardItem(RewardGivenType.KillMonster, characterItem));"

insthync commented 3 weeks ago

Applied, thank you