You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when a ChangeModesOperation is executed, the player who's fight and chase modes changed is not made aware of the changes, essentially desynchronizing the modes seen in the client.
Solution:
Create a new outgoing packet for OutgoingGamePacketType.PlayerModes under the namespace/folder Fibula.Communications.Packets.Outgoing:
@jlnunez89 I decided to try and have a crack at this issue. Initially familiarizing myself with the solution & projects and I do have a question - info below.
Looking at the Execute method of the ChangeModesOperation.cs, snippet below, and I am trying to understand:
Why is assignment of combatantCreature.SafeMode commented out?
protectedoverridevoidExecute(IOperationContextcontext){varonCreature=this.GetRequestor(context.CreatureFinder);if(onCreature==null||!(onCreature is ICombatant combatantCreature)){return;}
context.Logger.Debug($"{onCreature.Name} changed modes to {this.FightMode} and {this.ChaseMode}, safety: {this.IsSafeModeOn}.");
combatantCreature.FightMode =this.FightMode;
combatantCreature.ChaseMode =this.ChaseMode;if(this.ChaseMode == ChaseMode.Chase && combatantCreature.AutoAttackTarget !=null){
combatantCreature.SetFollowTarget(combatantCreature.AutoAttackTarget);}elseif(this.ChaseMode == ChaseMode.Stand){
combatantCreature.SetFollowTarget(null);}/* combatantCreature.SafeMode = this.IsSafeModeOn; */}
Copied over from jlnunez89/fibula-mmo#75 (comment)
Problem:
Currently, when a ChangeModesOperation is executed, the player who's fight and chase modes changed is not made aware of the changes, essentially desynchronizing the modes seen in the client.
Solution:
Create a new outgoing packet for
OutgoingGamePacketType.PlayerModes
under the namespace/folderFibula.Communications.Packets.Outgoing
:Create a new packet writer under the namespace/folder
Fibula.Protocol.V772.PacketWriters
for that new packet.Hook up the new packet writer in
Fibula.Protocol.V772.CompositionRootExtensions
class.Finally, in
ChangeModesOperation.Execute
, add a new notification that sends the new packet to the player, to update their modes.The text was updated successfully, but these errors were encountered: