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

BuffToNearbyPartyMembers Bug #2354

Closed CLAXES closed 8 months ago

CLAXES commented 8 months ago

Hello here targetEntity.GetInfo().PartyId is added wrongly applyBuffCharacter.GetInfo().PartyId should be

insthync commented 8 months ago

How do you think it should be like that?

CLAXES commented 8 months ago

targetEntity gets null value, there is an error when trying to find partyID and it does not buff anyone

CLAXES commented 8 months ago

it works smoothly when I organise it this way

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

Ahh, I see

CLAXES commented 8 months ago

I updated 1.86d but this is still the same as before targetEntity.GetInfo().PartyId shouldn't this part change

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

Thank you to inform me, just forget to implement it.