Table of Contents

Struct DismissBuffBroadcast

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Asks the server to take a buff off the sender.

public struct DismissBuffBroadcast : IBroadcast
Implements
IBroadcast
Inherited Members

Remarks

Client → server, a request, and refused at the source. Clicking a buff icon on the HUD strip has always been advertised — the tooltip says "Left Mouse Button to remove" — and has never done anything: the strip had no click handler and there was no message for one to send. This is that message.

The server owns the decision. It resolves the sender's own character from its own connection, looks the buff up in THAT character's container, and removes it only when CanBeDismissedByPlayer says it may be. Nothing is taken on the client's word: an id naming a buff the sender does not have removes nothing, and a debuff is refused however it was asked for — a debuff is on you until it expires or something dispels it. Sending this for a debuff is therefore wasted packets rather than a way to clear one.

Keyed by template ID, not by position. The character's buff container is keyed by template ID already (IBuffController.Buffs), so the id in this message is the same value the server looks up with and there is no index to age out between send and receipt. One click clears the buff and every stack of it, which is what the strip draws as a single icon and what the hint promises.

No optimistic removal on the client. The removal travels back on the reconcile the server already sends — BuffController.Remove marks the snapshot dirty and the owner's RestoreFromReconcile fires OnRemoveBuff — so the icon leaves when the server says it left. Blanking it locally would show a buff as gone while the server still held it, which for a refused removal never corrects itself.

Fields

TemplateID

Template ID of the buff to remove. See IBuffController.Buffs.

public int TemplateID

Field Value

int