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 11 forks source link

[Suggestion] Buff abilities only for party members #2325

Closed CLAXES closed 9 months ago

CLAXES commented 9 months ago

Hello buff abilities would be nice if there was an option only for party members, I use it like the code I gave at the bottom, but it would be nice to have an extra option for it.

        case SkillBuffType.BuffToNearbyAllies:
            if (skillUser.GetInfo().PartyId > 0)
            {
                tempCharacters = skillUser.FindAliveEntities<BaseCharacterEntity>(buffDistance.GetAmount(skillLevel), true, false, false, overlapMask);
                foreach (BaseCharacterEntity applyBuffCharacter in tempCharacters)
                {
                    if (skillUser.GetInfo().PartyId == applyBuffCharacter.GetInfo().PartyId)
                        applyBuffCharacter.ApplyBuff(DataId, BuffType.SkillBuff, skillLevel, instigator, weapon);
                }
            }
            skillUser.ApplyBuff(DataId, BuffType.SkillBuff, skillLevel, instigator, weapon);
            break;
insthync commented 9 months ago

Done