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

Buff skills bug #2347

Closed CLAXES closed 5 months ago

CLAXES commented 8 months ago

Hi, when I press buff skills sometimes it doesn't work, it rarely does this but it is a problem with long cooldown skills.

the player throws buffs but there is no effect, the skill enters the waiting period, which negatively affects the game

insthync commented 8 months ago

Video please

CLAXES commented 8 months ago

I have opened a topic for this before, it used to happen more, now it rarely happens, but this problem still continues the video is old, it doesn't happen that often now, but rarely this problem still occurs Video

insthync commented 8 months ago

It has no cast animation?

CLAXES commented 8 months ago

There is no animation for this skill, but the same problem occurs for animated skills

insthync commented 8 months ago

Show me the animated one

insthync commented 8 months ago

How about buff's applyChance setting?

CLAXES commented 8 months ago

this problem occurred 2 times in this video Video

CLAXES commented 8 months ago

image

insthync commented 8 months ago

May I check your project?

insthync commented 8 months ago

As I tried about a hour, I still can't reproduce it.

CLAXES commented 8 months ago

This problem doesn't happen in single, I think it only happens in MMO, I'm not at home right now

insthync commented 8 months ago

Yes, I try the MMO, if this occurring, I think attack skillcan be occurred too.

CLAXES commented 8 months ago

I didn't pay much attention when I attacked, but it could be.

CLAXES commented 8 months ago

Have you had a chance to test

insthync commented 8 months ago

I tested it but it is not occuring yet.

CLAXES commented 8 months ago

I had this problem in buff and debuff skils, I don't know if it also happens in normal hits, these problems started to happen after the enable appy change came.

CLAXES commented 8 months ago

the server also sometimes gives this kind of errors may be related to this problem?

Uploading Crash Report
NullReferenceException: Object reference not set to an instance of an object
at MultiplayerARPG.BaseCharacterEntity.ApplyReceiveDamage (MultiplayerARPG.HitBoxPosition position, UnityEngine.Vector3 fromPosition, MultiplayerARPG.EntityInfo instigator, System.Collections.Generic.Dictionary`2[TKey,TValue] damageAmounts, MultiplayerARPG.CharacterItem weapon, MultiplayerARPG.BaseSkill skill, System.Int32 skillLevel, System.Int32 randomSeed, MultiplayerARPG.CombatAmountType& combatAmountType, System.Int32& totalDamage) [0x000df] in <836b02aaac97423a9ede16ebb1c700e3>:0
at MultiplayerARPG.DamageableEntity.ApplyDamage (MultiplayerARPG.HitBoxPosition position, UnityEngine.Vector3 fromPosition, MultiplayerARPG.EntityInfo instigator, System.Collections.Generic.Dictionary`2[TKey,TValue] damageAmounts, MultiplayerARPG.CharacterItem weapon, MultiplayerARPG.BaseSkill skill, System.Int32 skillLevel, System.Int32 randomSeed) [0x00011] in <836b02aaac97423a9ede16ebb1c700e3>:0
at MultiplayerARPG.DamageableHitBox.ReceiveDamageWithoutConditionCheck (UnityEngine.Vector3 fromPosition, MultiplayerARPG.EntityInfo instigator, System.Collections.Generic.Dictionary`2[TKey,TValue] damageAmounts, MultiplayerARPG.CharacterItem weapon, MultiplayerARPG.BaseSkill skill, System.Int32 skillLevel, System.Int32 randomSeed) [0x00056] in <836b02aaac97423a9ede16ebb1c700e3>:0
at MultiplayerARPG.DamageableHitBox.ReceiveDamage (UnityEngine.Vector3 fromPosition, MultiplayerARPG.EntityInfo instigator, System.Collections.Generic.Dictionary`2[TKey,TValue] damageAmounts, MultiplayerARPG.CharacterItem weapon, MultiplayerARPG.BaseSkill skill, System.Int32 skillLevel, System.Int32 randomSeed) [0x0001f] in <836b02aaac97423a9ede16ebb1c700e3>:0
at MultiplayerARPG.DefaultHitRegistrationManager.PerformValidation (MultiplayerARPG.BaseGameEntity attacker, MultiplayerARPG.HitRegisterData hitData) [0x001dd] in <836b02aaac97423a9ede16ebb1c700e3>:0
at MultiplayerARPG.DefaultHitRegistrationManager.ConfirmHitRegValidation (MultiplayerARPG.BaseGameEntity attacker, System.Int32 simulateSeed, System.Byte triggerIndex, System.Collections.Generic.Dictionary`2[TKey,TValue] increaseDamageAmounts) [0x0008f] in <836b02aaac97423a9ede16ebb1c700e3>:0
at MultiplayerARPG.DefaultCharacterAttackComponent.CmdSimulateActionTrigger (MultiplayerARPG.SimulateActionTriggerData data) [0x00046] in <836b02aaac97423a9ede16ebb1c700e3>:0
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <07ba9f98d9794cf19aca0392570e5637>:0
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00083] in <07ba9f98d9794cf19aca0392570e5637>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <07ba9f98d9794cf19aca0392570e5637>:0
at LiteNetLibManager.LiteNetLibFunctionDynamic.HookCallback () [0x00000] in <914653687dfd4582b23635fe3365bc66>:0
at LiteNetLibManager.LiteNetLibIdentity.ProcessNetFunction (LiteNetLibManager.LiteNetLibFunction netFunction, LiteNetLib.Utils.NetDataReader reader, System.Boolean hookCallback) [0x0000f] in <914653687dfd4582b23635fe3365bc66>:0
at LiteNetLibManager.LiteNetLibGameManager.HandleClientCallFunction (LiteNetLibManager.MessageHandlerData messageHandler) [0x00077] in <914653687dfd4582b23635fe3365bc66>:0
at LiteNetLibManager.TransportHandler.ReadPacket (System.Int64 connectionId, LiteNetLib.Utils.NetDataReader reader) [0x0005f] in <914653687dfd4582b23635fe3365bc66>:0
at LiteNetLibManager.LiteNetLibServer.OnServerReceive (LiteNetLibManager.TransportEventData eventData) [0x00075] in <914653687dfd4582b23635fe3365bc66>:0
at LiteNetLibManager.LiteNetLibServer.Update () [0x00018] in <914653687dfd4582b23635fe3365bc66>:0
at LiteNetLibManager.LiteNetLibManager.Update () [0x00019] in <914653687dfd4582b23635fe3365bc66>:0
at MultiplayerARPG.BaseGameNetworkManager.Update () [0x00000] in <836b02aaac97423a9ede16ebb1c700e3>:0
at MultiplayerARPG.MMO.MapNetworkManager.Update () [0x00000] in <836b02aaac97423a9ede16ebb1c700e3>:0

[NM] DataReceived: bad!
Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 21007 ms: Couldn't connect to server
Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 21084 ms: Couldn't connect to server
Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 21101 ms: Couldn't connect to server
Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 21009 ms: Couldn't connect to server
Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 21005 ms: Couldn't connect to server
Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 21087 ms: Couldn't connect to server
Curl error 28: Failed to connect to cdp.cloud.unity3d.com port 443 after 21008 ms: Couldn't connect to server
[NM] DataReceived: bad!
insthync commented 8 months ago

I had this problem in buff and debuff skils, I don't know if it also happens in normal hits, these problems started to happen after the enable appy change came.

Are you sure that it is occurring after it have an apply chance settings?

CLAXES commented 8 months ago

When I started having this problem I looked in the skill settings and noticed that this feature had been added, but I don't know exactly when it was added and after which version the problem started to occur.

insthync commented 8 months ago

Please don't guess like that, if you try to turn on/off or change the value and then a problem occurs or its result isn't as you expected then you could guess that the problem occurring because of that feature.

insthync commented 8 months ago

Can you find anyone to confirm this or tell me how to reproduce it properly?

CLAXES commented 8 months ago

Don't you have the same problem when you try in MMO mode? Let me open a new project and try it, if this problem is not experienced in it, it may be related to my project and I will try and inform you

CLAXES commented 8 months ago

I think it doesn't happen when I turn off the cast state animation and use active animation, I tried it, there is no problem for the moment, I wonder if there could be a problem with cast.

moepi2k commented 8 months ago

i think its the same bug i already posted here -> https://github.com/suriyun-production/mmorpg-kit-docs/issues/2314 when dont use BufftoUserIfNoTarget, the spell will be casted but never applied.

the fix in my report is working

insthync commented 8 months ago

But that one is included in latest update, I will check it again.

moepi2k commented 8 months ago

ill check again atm. testing in 186b2 but it seems my stuff no longer works.

-its weird, in stock kit when use BufftoUserIfNoTarget is checked all is fine, buff apply to user if no target and also to target. but if its unchecked it no longer apply the buff. -With my changes its exactly other around. when BuffToUserIfNoTarget is checked buff apply at target, but but not to user if no target. If its uncheked its fine to and buff apply to target

 int overlapMask = GameInstance.Singleton.playerLayer.Mask | GameInstance.Singleton.playingLayer.Mask | GameInstance.Singleton.monsterLayer.Mask;
 EntityInfo instigator = skillUser.GetInfo();
 List<BaseCharacterEntity> tempCharacters;
 bool foundTarget = skillUser.CurrentGameManager.TryGetEntityByObjectId(targetObjectId, out BaseCharacterEntity targetEntity) && !targetEntity.IsDead();
 switch (skillBuffType)
 {
     case SkillBuffType.BuffToUser:
         skillUser.ApplyBuff(DataId, BuffType.SkillBuff, skillLevel, instigator, weapon);
         break;
     case SkillBuffType.BuffToNearbyAllies:
         tempCharacters = skillUser.FindAliveEntities<BaseCharacterEntity>(buffDistance.GetAmount(skillLevel), true, false, false, overlapMask);
         foreach (BaseCharacterEntity applyBuffCharacter in tempCharacters)
         {
             applyBuffCharacter.ApplyBuff(DataId, BuffType.SkillBuff, skillLevel, instigator, weapon);
         }
         skillUser.ApplyBuff(DataId, BuffType.SkillBuff, skillLevel, instigator, weapon);
         break;
     case SkillBuffType.BuffToNearbyCharacters:
         tempCharacters = skillUser.FindAliveEntities<BaseCharacterEntity>(buffDistance.GetAmount(skillLevel), true, false, true, overlapMask);
         foreach (BaseCharacterEntity applyBuffCharacter in tempCharacters)
         {
             applyBuffCharacter.ApplyBuff(DataId, BuffType.SkillBuff, skillLevel, instigator, weapon);
         }
         skillUser.ApplyBuff(DataId, BuffType.SkillBuff, skillLevel, instigator, weapon);
         break;
     case SkillBuffType.BuffToTarget:
         if (buffToUserIfNoTarget && !foundTarget)
             targetEntity = skillUser;
         if (foundTarget)
             targetEntity.ApplyBuff(DataId, BuffType.SkillBuff, skillLevel, instigator, weapon);
         break;
     case SkillBuffType.Toggle:
         int indexOfBuff = skillUser.IndexOfBuff(BuffType.SkillBuff, DataId);
         if (indexOfBuff >= 0)
             skillUser.Buffs.RemoveAt(indexOfBuff);
         else
             skillUser.ApplyBuff(DataId, BuffType.SkillBuff, skillLevel, instigator, weapon);
         break;
     case SkillBuffType.BuffToAlly:
         if (foundTarget)
             targetEntity.ApplyBuff(DataId, BuffType.SkillBuff, skillLevel, instigator, weapon);
         break;
     case SkillBuffType.BuffToEnemy:
         if (foundTarget)
             targetEntity.ApplyBuff(DataId, BuffType.SkillBuff, skillLevel, instigator, weapon);
         break;
 }
insthync commented 8 months ago

@moepi2k I am not sure that it is the same issues with @CLAXES 's or not, yours is buff not being applied, but @CLAXES 's one is not being applied sometime.

insthync commented 8 months ago

@moepi2k But I can fix yours because I can reproduce it too.

CLAXES commented 8 months ago

I think my problem is that I only give cast animation and leave the active animation empty, now I have turned off the cast animation, I only use the active animation, there is no problem, I will use it this way until it is fixed.

CLAXES commented 8 months ago

I removed the cast time I removed the cast animation I did not have such a problem only when I turned on the active animation

insthync commented 8 months ago

So problem occurring in following cases:

CLAXES commented 8 months ago

Yes, it's a problem in these cases.

insthync commented 8 months ago

No more other cases?

CLAXES commented 8 months ago

I did not have this problem when I added active animation, I do not know if there may be a security problem when there is no active animation, it may be perceived as trying to press early and may not allow it.

insthync commented 8 months ago

I see