server

package
v0.0.0-...-b27d2ac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2026 License: GPL-3.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyDamageToMobs

func ApplyDamageToMobs(character *entity.Character, mapInstance *entity.Map, damages []dto.AttackPair)

func CallOnAttackHooks

func CallOnAttackHooks(ctx *core.ClientContext, character *entity.Character, mapInstance *entity.Map, damages []dto.AttackPair, skillID uint32, ranged bool, consumeSlot uint16)

func CallPassiveSkillHook

func CallPassiveSkillHook(ctx *core.ClientContext, character *entity.Character, skillID uint32, hook string)

func CallSkillHook

func CallSkillHook(ctx *core.ClientContext, character *entity.Character, skillID uint32, hook string) bool

func CallSummonOnAttackHooks

func CallSummonOnAttackHooks(ctx *core.ClientContext, character *entity.Character, mapInstance *entity.Map, damages []dto.AttackPair, skillID uint32)

func InternalPingAsync

func InternalPingAsync(address string) *async.Promise

InternalPingAsync builds a Promise that dials address and calls internal Ping (reply message must be "pong"). Empty address returns an idle Promise. Caller must Run() (and typically OnError / Finally).

func RunGameServer

func RunGameServer()

func RunHighRateGameServer

func RunHighRateGameServer()

func SyncPartyMemberHPOnMapEnter

func SyncPartyMemberHPOnMapEnter(mapInstance *entity.Map, character *entity.Character, effectivePartyID uint32)

Types

type ActiveSkill

type ActiveSkill struct {
	// contains filtered or unexported fields
}

func (*ActiveSkill) Handle

func (h *ActiveSkill) Handle(ctx *core.ClientContext, req *request.ActiveSkill) error

func (ActiveSkill) New

type Aggro

type Aggro struct {
	// contains filtered or unexported fields
}

func (*Aggro) Handle

func (h *Aggro) Handle(ctx *core.ClientContext, req *request.Aggro) error

func (Aggro) New

func (Aggro) New(gs *GameServer) *Aggro

type Attack

type Attack struct {
	// contains filtered or unexported fields
}

func (*Attack) Handle

func (h *Attack) Handle(ctx *core.ClientContext, req *request.Attack) error

func (Attack) New

func (Attack) New(gs *GameServer) *Attack

type AutoAssignAP

type AutoAssignAP struct {
	// contains filtered or unexported fields
}

func (*AutoAssignAP) Handle

func (h *AutoAssignAP) Handle(ctx *core.ClientContext, req *request.AutoAssignAP) error

func (AutoAssignAP) New

type CancelBuff

type CancelBuff struct {
	// contains filtered or unexported fields
}

func (*CancelBuff) Handle

func (h *CancelBuff) Handle(ctx *core.ClientContext, req *request.CancelBuff) error

func (CancelBuff) New

func (CancelBuff) New(gs *GameServer) *CancelBuff

type CancelChair

type CancelChair struct {
	// contains filtered or unexported fields
}

func (*CancelChair) Handle

func (h *CancelChair) Handle(ctx *core.ClientContext, req *request.CancelChair) error

func (CancelChair) New

type ChangeKeymap

type ChangeKeymap struct {
	// contains filtered or unexported fields
}

func (*ChangeKeymap) Handle

func (h *ChangeKeymap) Handle(ctx *core.ClientContext, req *request.ChangeKeymap) error

func (ChangeKeymap) New

type CharacterListenerImpl

type CharacterListenerImpl struct {
	// contains filtered or unexported fields
}

func (*CharacterListenerImpl) OnAttack

func (l *CharacterListenerImpl) OnAttack(ch *entity.Character, attackPayload dto.AttackPayload, skillLevel uint8)

func (*CharacterListenerImpl) OnBuffAdded

func (l *CharacterListenerImpl) OnBuffAdded(ch *entity.Character, buffID int32, remainingDuration time.Duration, values map[constant.BuffFlag]int32)

func (*CharacterListenerImpl) OnBuffRemoved

func (l *CharacterListenerImpl) OnBuffRemoved(ch *entity.Character, flags []constant.BuffFlag)

func (*CharacterListenerImpl) OnChat

func (l *CharacterListenerImpl) OnChat(ch *entity.Character, message string, highlight bool, dontRecordHistory bool)

func (*CharacterListenerImpl) OnClassChange

func (l *CharacterListenerImpl) OnClassChange(ch *entity.Character, oldClass uint16, newClass uint16)

func (*CharacterListenerImpl) OnControlMoveMob

func (l *CharacterListenerImpl) OnControlMoveMob(ch *entity.Character, mob *entity.Mob, moveId uint16, enabledSkill bool, mp uint16, skillId uint32, skillLevel uint8)

func (*CharacterListenerImpl) OnDebuffAdded

func (l *CharacterListenerImpl) OnDebuffAdded(ch *entity.Character, disease constant.DebuffFlag, x int16, skillID uint16, skillLevel uint16, durationMs int32)

func (*CharacterListenerImpl) OnDebuffRemoved

func (l *CharacterListenerImpl) OnDebuffRemoved(ch *entity.Character, flags []constant.DebuffFlag)

func (*CharacterListenerImpl) OnDialog

func (l *CharacterListenerImpl) OnDialog(ch *entity.Character, npc uint32, message string, prev bool, next bool)

func (*CharacterListenerImpl) OnDialogAccept

func (l *CharacterListenerImpl) OnDialogAccept(ch *entity.Character, npc uint32, message string, enableEscape bool)

func (*CharacterListenerImpl) OnDialogInput

func (l *CharacterListenerImpl) OnDialogInput(ch *entity.Character, npc uint32, message string)

func (*CharacterListenerImpl) OnDialogList

func (l *CharacterListenerImpl) OnDialogList(ch *entity.Character, npc uint32, message string, selections []string)

func (*CharacterListenerImpl) OnDialogYesNo

func (l *CharacterListenerImpl) OnDialogYesNo(ch *entity.Character, npc uint32, message string, prev bool, next bool)

func (*CharacterListenerImpl) OnEndSortInventory

func (l *CharacterListenerImpl) OnEndSortInventory(ch *entity.Character, inventoryType constant.InventoryType)

func (*CharacterListenerImpl) OnExpGain

func (l *CharacterListenerImpl) OnExpGain(ch *entity.Character, exp uint32)

func (*CharacterListenerImpl) OnFullMergeInventorySlot

func (l *CharacterListenerImpl) OnFullMergeInventorySlot(ch *entity.Character, inventoryType constant.InventoryType, source int16, dest int16, count uint16)

func (*CharacterListenerImpl) OnHiddenChanged

func (l *CharacterListenerImpl) OnHiddenChanged(ch *entity.Character, hidden bool)

func (*CharacterListenerImpl) OnInventorySlotAdded

func (l *CharacterListenerImpl) OnInventorySlotAdded(ch *entity.Character, inventoryType constant.InventoryType, slot int16, item entity.Item)

func (*CharacterListenerImpl) OnInventorySlotUpdated

func (l *CharacterListenerImpl) OnInventorySlotUpdated(ch *entity.Character, inventoryType constant.InventoryType, slot int16, item entity.Item)

func (*CharacterListenerImpl) OnItemGainFailed

func (l *CharacterListenerImpl) OnItemGainFailed(ch *entity.Character, mode constant.ItemGainFailedType)

func (*CharacterListenerImpl) OnMagicAttack

func (l *CharacterListenerImpl) OnMagicAttack(ch *entity.Character, attackPayload dto.AttackPayload, skillLevel uint8)

func (*CharacterListenerImpl) OnMesoChanged

func (l *CharacterListenerImpl) OnMesoChanged(ch *entity.Character, meso int32)

func (*CharacterListenerImpl) OnMessage

func (l *CharacterListenerImpl) OnMessage(ch *entity.Character, messageType constant.ServerMessageType, message string)

func (*CharacterListenerImpl) OnMobMoved

func (l *CharacterListenerImpl) OnMobMoved(ch *entity.Character, mob *entity.Mob, isAggroed bool, centerSplit int8, skill1 uint8, skill2 uint8, skill3 uint8, skill4 uint8, startPoint types.Vector2[int16], movements []dto.MoveFragment)

func (*CharacterListenerImpl) OnMultiChat

func (l *CharacterListenerImpl) OnMultiChat(ch *entity.Character, mode pconst.MultiChatMode, senderName string, message string)

func (*CharacterListenerImpl) OnNpcAction

func (l *CharacterListenerImpl) OnNpcAction(ch *entity.Character, bytes []byte)

func (*CharacterListenerImpl) OnPartialMergeInventorySlot

func (l *CharacterListenerImpl) OnPartialMergeInventorySlot(ch *entity.Character, inventoryType constant.InventoryType, source int16, dest int16, sourceCount uint16, destCount uint16)

func (*CharacterListenerImpl) OnPartyCreated

func (l *CharacterListenerImpl) OnPartyCreated(ch *entity.Character, partyID uint32)

func (*CharacterListenerImpl) OnPartyInvite

func (l *CharacterListenerImpl) OnPartyInvite(ch *entity.Character, partyID uint32, inviterName string, partySearch bool)

func (*CharacterListenerImpl) OnPartyMemberFieldsChanged

func (l *CharacterListenerImpl) OnPartyMemberFieldsChanged(ch *entity.Character)

func (*CharacterListenerImpl) OnPartyMemberHPChanged

func (l *CharacterListenerImpl) OnPartyMemberHPChanged(ch *entity.Character, recipient *entity.Character)

func (*CharacterListenerImpl) OnPartyStatusMessage

func (l *CharacterListenerImpl) OnPartyStatusMessage(ch *entity.Character, code pconst.PartyStatusCode)

func (*CharacterListenerImpl) OnPlayerMove

func (l *CharacterListenerImpl) OnPlayerMove(ch *entity.Character, startPoint types.Vector2[int16], fragments []dto.MoveFragment)

func (*CharacterListenerImpl) OnRangedAttack

func (l *CharacterListenerImpl) OnRangedAttack(ch *entity.Character, attackPayload dto.AttackPayload, skillLevel uint8)

func (*CharacterListenerImpl) OnRemoveInventorySlot

func (l *CharacterListenerImpl) OnRemoveInventorySlot(ch *entity.Character, inventoryType constant.InventoryType, slot int16)

func (*CharacterListenerImpl) OnShowCraftingEffect

func (l *CharacterListenerImpl) OnShowCraftingEffect(ch *entity.Character, effect string, time int32, mode int32)

func (*CharacterListenerImpl) OnShowDiceEffect

func (l *CharacterListenerImpl) OnShowDiceEffect(ch *entity.Character, effectID int32, skillID uint32, skillLevel uint8)

func (*CharacterListenerImpl) OnShowDragonBloodEffect

func (l *CharacterListenerImpl) OnShowDragonBloodEffect(ch *entity.Character, skillID uint32, skillLevel uint8)

func (*CharacterListenerImpl) OnShowEffect

func (l *CharacterListenerImpl) OnShowEffect(ch *entity.Character, effectType response.EffectType)

func (*CharacterListenerImpl) OnShowHPHealedEffect

func (l *CharacterListenerImpl) OnShowHPHealedEffect(ch *entity.Character, amount int32)

func (*CharacterListenerImpl) OnShowItemGain

func (l *CharacterListenerImpl) OnShowItemGain(ch *entity.Character, itemId uint32, count uint32, mode constant.ShowItemGainType)

func (*CharacterListenerImpl) OnShowItemMakerSuccessEffect

func (l *CharacterListenerImpl) OnShowItemMakerSuccessEffect(ch *entity.Character)

func (*CharacterListenerImpl) OnShowMesoGain

func (l *CharacterListenerImpl) OnShowMesoGain(ch *entity.Character, count int32, mode constant.ShowMesoGainType)

func (*CharacterListenerImpl) OnShowMobHp

func (l *CharacterListenerImpl) OnShowMobHp(ch *entity.Character, mob *entity.Mob, percentage uint8)

func (*CharacterListenerImpl) OnShowRewardItemAnimation

func (l *CharacterListenerImpl) OnShowRewardItemAnimation(ch *entity.Character, itemID uint32, effect string)

func (*CharacterListenerImpl) OnShowSelfCraftingEffect

func (l *CharacterListenerImpl) OnShowSelfCraftingEffect(ch *entity.Character, effect string, time int32, mode int32)

func (*CharacterListenerImpl) OnShowSelfDiceEffect

func (l *CharacterListenerImpl) OnShowSelfDiceEffect(ch *entity.Character, effectID int32, skillID uint32, skillLevel uint8)

func (*CharacterListenerImpl) OnShowSelfDragonBloodEffect

func (l *CharacterListenerImpl) OnShowSelfDragonBloodEffect(ch *entity.Character, skillID uint32, skillLevel uint8)

func (*CharacterListenerImpl) OnShowSelfEffect

func (l *CharacterListenerImpl) OnShowSelfEffect(ch *entity.Character, effectType response.EffectType)

func (*CharacterListenerImpl) OnShowSelfHPHealedEffect

func (l *CharacterListenerImpl) OnShowSelfHPHealedEffect(ch *entity.Character, amount int32)

func (*CharacterListenerImpl) OnShowSelfItemMakerSuccessEffect

func (l *CharacterListenerImpl) OnShowSelfItemMakerSuccessEffect(ch *entity.Character)

func (*CharacterListenerImpl) OnShowSelfRewardItemAnimation

func (l *CharacterListenerImpl) OnShowSelfRewardItemAnimation(ch *entity.Character, itemID uint32, effect string)

func (*CharacterListenerImpl) OnShowSelfSkillEffect

func (l *CharacterListenerImpl) OnShowSelfSkillEffect(ch *entity.Character, effectType pconst.SkillEffectType, skillID uint32, skillLevel uint8, additional *uint8)

func (*CharacterListenerImpl) OnShowSkillEffect

func (l *CharacterListenerImpl) OnShowSkillEffect(ch *entity.Character, effectType pconst.SkillEffectType, skillID uint32, skillLevel uint8, additional *uint8)

func (*CharacterListenerImpl) OnSkillCooldown

func (l *CharacterListenerImpl) OnSkillCooldown(ch *entity.Character, skillID uint32, remainingSec uint16)

func (*CharacterListenerImpl) OnSkillPassiveHook

func (l *CharacterListenerImpl) OnSkillPassiveHook(ch *entity.Character, skillID uint32, hook string)

func (*CharacterListenerImpl) OnSummonAttack

func (l *CharacterListenerImpl) OnSummonAttack(ch *entity.Character, summon *entity.Summon, animation uint8, targets []entity.SummonAttackTarget)

func (*CharacterListenerImpl) OnSummonDamaged

func (l *CharacterListenerImpl) OnSummonDamaged(ch *entity.Character, summon *entity.Summon, unknown uint8, damage uint32, monsterIdFrom uint32)

func (*CharacterListenerImpl) OnSummonMove

func (l *CharacterListenerImpl) OnSummonMove(ch *entity.Character, summon *entity.Summon, startPoint types.Vector2[int16], movements []dto.MoveFragment)

func (*CharacterListenerImpl) OnSummonRemove

func (l *CharacterListenerImpl) OnSummonRemove(ch *entity.Character, summon *entity.Summon, animated bool)

func (*CharacterListenerImpl) OnSummonSkill

func (l *CharacterListenerImpl) OnSummonSkill(ch *entity.Character, summon *entity.Summon, newStance uint8)

func (*CharacterListenerImpl) OnSummonSpawn

func (l *CharacterListenerImpl) OnSummonSpawn(ch *entity.Character, summon *entity.Summon)

func (*CharacterListenerImpl) OnSwapInventorySlot

func (l *CharacterListenerImpl) OnSwapInventorySlot(ch *entity.Character, inventoryType constant.InventoryType, source int16, dest int16, equipmentAction int8)

func (*CharacterListenerImpl) OnUnlockAction

func (l *CharacterListenerImpl) OnUnlockAction(ch *entity.Character)

func (*CharacterListenerImpl) OnUpdateCharacterLook

func (l *CharacterListenerImpl) OnUpdateCharacterLook(ch *entity.Character)

func (*CharacterListenerImpl) OnUpdateInventorySlot

func (l *CharacterListenerImpl) OnUpdateInventorySlot(ch *entity.Character, inventoryType constant.InventoryType, slot int16, item entity.Item)

func (*CharacterListenerImpl) OnUpdateSkill

func (l *CharacterListenerImpl) OnUpdateSkill(ch *entity.Character, skillID uint32, level int32, masterLevel int32)

func (*CharacterListenerImpl) OnUpdateStats

func (l *CharacterListenerImpl) OnUpdateStats(ch *entity.Character, stats map[constant.Stat]int32, unlock bool)

type DamageSummon

type DamageSummon struct {
	// contains filtered or unexported fields
}

func (*DamageSummon) Handle

func (h *DamageSummon) Handle(ctx *core.ClientContext, req *request.DamageSummon) error

func (DamageSummon) New

type Damaged

type Damaged struct {
	// contains filtered or unexported fields
}

func (*Damaged) Handle

func (h *Damaged) Handle(ctx *core.ClientContext, req *request.Damaged) error

func (Damaged) New

func (Damaged) New(gs *GameServer) *Damaged

type DenyPartyRequest

type DenyPartyRequest struct {
	// contains filtered or unexported fields
}

func (*DenyPartyRequest) Handle

func (DenyPartyRequest) New

type Dialog

type Dialog struct {
	// contains filtered or unexported fields
}

func (*Dialog) Handle

func (h *Dialog) Handle(ctx *core.ClientContext, req *request.Dialog) error

func (Dialog) New

func (Dialog) New(gs *GameServer) *Dialog

type DistributeAP

type DistributeAP struct {
	// contains filtered or unexported fields
}

func (*DistributeAP) Handle

func (h *DistributeAP) Handle(ctx *core.ClientContext, req *request.DistributeAP) error

func (DistributeAP) New

type DistributeSP

type DistributeSP struct {
	// contains filtered or unexported fields
}

func (*DistributeSP) Handle

func (h *DistributeSP) Handle(ctx *core.ClientContext, req *request.DistributeSP) error

func (DistributeSP) New

type DropMeso

type DropMeso struct {
	// contains filtered or unexported fields
}

func (*DropMeso) Handle

func (h *DropMeso) Handle(ctx *core.ClientContext, req *request.DropMeso) error

func (DropMeso) New

func (DropMeso) New(gs *GameServer) *DropMeso

type GameConfig

type GameConfig struct {
	Host            string
	Port            int
	ChannelId       uint32
	WzPath          string
	WorldName       string
	WorldId         uint32
	MaxPlayers      int
	ExpRate         int
	DropRate        int
	MesoRate        int
	InternalAddr    string
	RabbitMQ        config.RabbitMQEndpoint
	LuaAlwaysReload bool
}

type GameServer

type GameServer struct {
	*core.ServerCore
	// contains filtered or unexported fields
}

func NewGameServer

func NewGameServer(config *GameConfig) (*GameServer, error)

func (*GameServer) DispatchRunCharacterTimer

func (gs *GameServer) DispatchRunCharacterTimer(pid *actor.PID, payload *c_actor.RunCharacterTimer)

func (*GameServer) EnsureComplete

func (gs *GameServer) EnsureComplete(correlationID uint64)

func (*GameServer) EnsureRedispatch

func (gs *GameServer) EnsureRedispatch(d *ensure.EnsureDeliver)

func (*GameServer) EnsureSend

func (gs *GameServer) EnsureSend(caller *actor.PID, characterID uint32, inner interface{})

func (*GameServer) GetDropRate

func (gs *GameServer) GetDropRate() int

func (*GameServer) GetExpRate

func (gs *GameServer) GetExpRate() int

func (*GameServer) GetMap

func (gs *GameServer) GetMap(mapID uint32) *entity.Map

func (*GameServer) GetMesoRate

func (gs *GameServer) GetMesoRate() int

func (*GameServer) GetPacketHandler

func (gs *GameServer) GetPacketHandler() *core.PacketHandler

func (*GameServer) GetPartyByID

func (gs *GameServer) GetPartyByID(partyID uint32) *entity.Party

func (*GameServer) GetResources

func (gs *GameServer) GetResources() *wz.Resources

func (*GameServer) GetRootContext

func (gs *GameServer) GetRootContext() *actor.RootContext

func (*GameServer) GetStats

func (gs *GameServer) GetStats() map[string]interface{}

func (*GameServer) NotifyDoorRemove

func (gs *GameServer) NotifyDoorRemove(ownerID uint32, skillID uint32, counterpartMapWZID uint32)

func (*GameServer) RequestSpawnReturnMapDoor

func (gs *GameServer) RequestSpawnReturnMapDoor(ch *entity.Character, skillID gameconst.SkillID)

func (*GameServer) RequestWarp

func (gs *GameServer) RequestWarp(character *entity.Character, targetMap *entity.Map, spawnPoint uint8) error

func (*GameServer) SaveAllCharactersAsync

func (gs *GameServer) SaveAllCharactersAsync(ctx actor.Context) *async.Promise

SaveAllCharactersAsync builds a Promise that asks all map actors to persist online characters in parallel. Caller must Run().

func (*GameServer) SaveCharactersAsync

func (gs *GameServer) SaveCharactersAsync(ctx actor.Context, chars []*entity.Character) *async.Promise

SaveCharactersAsync builds a Promise that saves chars in parallel chunks of saveCharactersChunkSize. Caller must Run().

func (*GameServer) Start

func (gs *GameServer) Start() error

func (*GameServer) Stop

func (gs *GameServer) Stop() error

func (*GameServer) UpdatePartyMemberAsync

func (gs *GameServer) UpdatePartyMemberAsync(ctx actor.Context, ch *entity.Character) *async.Promise

UpdatePartyMemberAsync builds a Promise for UpdatePartyMember. Caller must Run(). Pass ctx nil when unavailable.

type HandlerConstructor

type HandlerConstructor[H core.Handler[T], T core.RequestPtr[U], U any] interface {
	New(*GameServer) H
}

type HealOverTime

type HealOverTime struct {
	// contains filtered or unexported fields
}

func (*HealOverTime) Handle

func (h *HealOverTime) Handle(ctx *core.ClientContext, req *request.HealOverTime) error

func (HealOverTime) New

type ItemLoot

type ItemLoot struct {
	// contains filtered or unexported fields
}

func (*ItemLoot) Handle

func (h *ItemLoot) Handle(ctx *core.ClientContext, req *request.ItemLoot) error

func (ItemLoot) New

func (ItemLoot) New(gs *GameServer) *ItemLoot

type LoginGame

type LoginGame struct {
	// contains filtered or unexported fields
}

func (*LoginGame) Handle

func (h *LoginGame) Handle(ctx *core.ClientContext, req *request.LoginGame) error

func (LoginGame) New

func (LoginGame) New(gs *GameServer) *LoginGame

type MagicAttack

type MagicAttack struct {
	// contains filtered or unexported fields
}

func (*MagicAttack) Handle

func (h *MagicAttack) Handle(ctx *core.ClientContext, req *request.MagicAttack) error

func (MagicAttack) New

type MapListenerImpl

type MapListenerImpl struct {
	// contains filtered or unexported fields
}

func NewGameMapListener

func NewGameMapListener(gs *GameServer) *MapListenerImpl

func (*MapListenerImpl) OnAttack

func (l *MapListenerImpl) OnAttack(mapInstance *entity.Map, character *entity.Character, attackPayload dto.AttackPayload, skillLevel uint8)

func (*MapListenerImpl) OnDoorRemoved

func (l *MapListenerImpl) OnDoorRemoved(mapInstance *entity.Map, door *entity.Door, animated bool)

func (*MapListenerImpl) OnItemRemoved

func (l *MapListenerImpl) OnItemRemoved(mapInstance *entity.Map, itemID uint32, looterID uint32, mode constant.RemoveItemType)

func (*MapListenerImpl) OnItemSpawned

func (l *MapListenerImpl) OnItemSpawned(mapInstance *entity.Map, item entity.Item, drop *entity.Drop)

func (*MapListenerImpl) OnMagicAttack

func (l *MapListenerImpl) OnMagicAttack(mapInstance *entity.Map, character *entity.Character, attackPayload dto.AttackPayload, skillLevel uint8)

func (*MapListenerImpl) OnMesoSpawned

func (l *MapListenerImpl) OnMesoSpawned(mapInstance *entity.Map, meso *entity.Meso)

func (*MapListenerImpl) OnMistRemoved

func (l *MapListenerImpl) OnMistRemoved(mapInstance *entity.Map, mist *entity.Mist)

func (*MapListenerImpl) OnMistSpawned

func (l *MapListenerImpl) OnMistSpawned(mapInstance *entity.Map, mist *entity.Mist)

func (*MapListenerImpl) OnMobControllerChange

func (l *MapListenerImpl) OnMobControllerChange(mob *entity.Mob, before *entity.Character, after *entity.Character)

func (*MapListenerImpl) OnMobHomingRemoved

func (l *MapListenerImpl) OnMobHomingRemoved(mapInstance *entity.Map, mob *entity.Mob, removed *entity.Homing, causer *entity.Character)

func (*MapListenerImpl) OnMobHomingSet

func (l *MapListenerImpl) OnMobHomingSet(mapInstance *entity.Map, mob *entity.Mob, homing *entity.Homing, causer *entity.Character)

func (*MapListenerImpl) OnMobMobBuffApplied

func (l *MapListenerImpl) OnMobMobBuffApplied(mapInstance *entity.Map, mob *entity.Mob, buff constant.MobBuffFlag, value int32, skillID uint32, durationMs int64)

func (*MapListenerImpl) OnMobMobBuffCancelled

func (l *MapListenerImpl) OnMobMobBuffCancelled(mapInstance *entity.Map, mob *entity.Mob, buff constant.MobBuffFlag)

func (*MapListenerImpl) OnMobMoved

func (l *MapListenerImpl) OnMobMoved(mapInstance *entity.Map, mob *entity.Mob, isAggroed bool, centerSplit int8, skill1 uint8, skill2 uint8, skill3 uint8, skill4 uint8, startPoint types.Vector2[int16], movements []dto.MoveFragment)

func (*MapListenerImpl) OnMobRemoved

func (l *MapListenerImpl) OnMobRemoved(mapInstance *entity.Map, mob *entity.Mob, animationType constant.MobDieAnimationType)

func (*MapListenerImpl) OnMobSpawned

func (l *MapListenerImpl) OnMobSpawned(mapInstance *entity.Map, mob *entity.Mob)

func (*MapListenerImpl) OnPlayerAdded

func (l *MapListenerImpl) OnPlayerAdded(ctx actor.Context, mapInstance *entity.Map, character *entity.Character, init bool)

func (*MapListenerImpl) OnPlayerChat

func (l *MapListenerImpl) OnPlayerChat(mapInstance *entity.Map, character *entity.Character, message string)

func (*MapListenerImpl) OnPlayerMove

func (l *MapListenerImpl) OnPlayerMove(mapInstance *entity.Map, character *entity.Character, startPoint types.Vector2[int16], fragments []dto.MoveFragment)

func (*MapListenerImpl) OnPlayerMoved

func (l *MapListenerImpl) OnPlayerMoved(mapInstance *entity.Map, character *entity.Character)

func (*MapListenerImpl) OnPlayerRemoved

func (l *MapListenerImpl) OnPlayerRemoved(mapInstance *entity.Map, character *entity.Character)

func (*MapListenerImpl) OnRangedAttack

func (l *MapListenerImpl) OnRangedAttack(mapInstance *entity.Map, character *entity.Character, attackPayload dto.AttackPayload, skillLevel uint8)

type MoveItem

type MoveItem struct {
	// contains filtered or unexported fields
}

func (*MoveItem) Handle

func (h *MoveItem) Handle(ctx *core.ClientContext, req *request.MoveItem) error

func (MoveItem) New

func (MoveItem) New(gs *GameServer) *MoveItem

type MoveMob

type MoveMob struct {
	// contains filtered or unexported fields
}

func (*MoveMob) Handle

func (h *MoveMob) Handle(ctx *core.ClientContext, req *request.MoveMob) error

func (MoveMob) New

func (MoveMob) New(gs *GameServer) *MoveMob

type MovePlayer

type MovePlayer struct {
	// contains filtered or unexported fields
}

func (*MovePlayer) Handle

func (h *MovePlayer) Handle(ctx *core.ClientContext, req *request.MovePlayer) error

func (MovePlayer) New

func (MovePlayer) New(gs *GameServer) *MovePlayer

type MoveSummon

type MoveSummon struct {
	// contains filtered or unexported fields
}

func (*MoveSummon) Handle

func (h *MoveSummon) Handle(ctx *core.ClientContext, req *request.MoveSummon) error

func (MoveSummon) New

func (MoveSummon) New(gs *GameServer) *MoveSummon

type MultiChat

type MultiChat struct {
	// contains filtered or unexported fields
}

func (*MultiChat) Handle

func (h *MultiChat) Handle(ctx *core.ClientContext, req *request.MultiChat) error

func (MultiChat) New

func (MultiChat) New(gs *GameServer) *MultiChat

type NormalChat

type NormalChat struct {
	// contains filtered or unexported fields
}

func (*NormalChat) Handle

func (h *NormalChat) Handle(ctx *core.ClientContext, req *request.NormalChat) error

func (NormalChat) New

func (NormalChat) New(gs *GameServer) *NormalChat

type NpcClick

type NpcClick struct {
	// contains filtered or unexported fields
}

func (*NpcClick) Handle

func (h *NpcClick) Handle(ctx *core.ClientContext, req *request.NpcClick) error

func (NpcClick) New

func (NpcClick) New(gs *GameServer) *NpcClick

type NpcControl

type NpcControl struct {
	// contains filtered or unexported fields
}

func (*NpcControl) Handle

func (h *NpcControl) Handle(ctx *core.ClientContext, req *request.NpcAction) error

func (NpcControl) New

func (NpcControl) New(gs *GameServer) *NpcControl

type NpcShop

type NpcShop struct {
	// contains filtered or unexported fields
}

func (*NpcShop) Handle

func (h *NpcShop) Handle(ctx *core.ClientContext, req *request.NpcShop) error

func (NpcShop) New

func (NpcShop) New(gs *GameServer) *NpcShop

type PacketHandlerRegistry

type PacketHandlerRegistry struct {
	// contains filtered or unexported fields
}

func NewPacketHandlerRegistry

func NewPacketHandlerRegistry(gs *GameServer) *PacketHandlerRegistry

type PartyContainer

type PartyContainer struct {
	// contains filtered or unexported fields
}

func NewPartyContainer

func NewPartyContainer(gs *GameServer, worldID uint32, ic internal.InternalClient) *PartyContainer

func (*PartyContainer) ClearCharacterPartyID

func (pc *PartyContainer) ClearCharacterPartyID(characterID uint32)

func (*PartyContainer) ClearPartyMembers

func (pc *PartyContainer) ClearPartyMembers(memberIDs []uint32)

func (*PartyContainer) DeliverPartyDenyStatusToCharacter

func (pc *PartyContainer) DeliverPartyDenyStatusToCharacter(targetCharacterID uint32, action uint8, deniedCharacterName string)

func (*PartyContainer) DeliverPartyDisbandUpdate

func (pc *PartyContainer) DeliverPartyDisbandUpdate(prev *entity.Party, leaderCharacterID uint32)

func (*PartyContainer) DeliverPartyInviteToCharacter

func (pc *PartyContainer) DeliverPartyInviteToCharacter(targetCharacterID uint32, partyID uint32, inviterName string, partySearch bool)

func (*PartyContainer) DeliverPartyJoinUpdate

func (pc *PartyContainer) DeliverPartyJoinUpdate(party *entity.Party, joinedCharacterID uint32)

func (*PartyContainer) DeliverPartyLeaderChange

func (pc *PartyContainer) DeliverPartyLeaderChange(party *entity.Party, newLeaderCharacterID uint32, byDisconnect bool)

func (*PartyContainer) DeliverPartyLeaveUpdate

func (pc *PartyContainer) DeliverPartyLeaveUpdate(prev, current *entity.Party, targetCharacterID uint32, expelled bool)

func (*PartyContainer) DeliverPartyLogOnOff

func (pc *PartyContainer) DeliverPartyLogOnOff(party *entity.Party, _ uint32)

func (*PartyContainer) DeliverPartySilent

func (pc *PartyContainer) DeliverPartySilent(party *entity.Party)

func (*PartyContainer) Get

func (pc *PartyContainer) Get(partyID uint32) *entity.Party

func (*PartyContainer) PartyMemberIndex

func (pc *PartyContainer) PartyMemberIndex(characterID uint32, partyID *uint32) int

func (*PartyContainer) SendPartySilentAsync

func (pc *PartyContainer) SendPartySilentAsync(ctx actor.Context, ch *entity.Character) *async.Promise

SendPartySilentAsync builds a Promise that sends party silent UI state to the character. Uses cache when warm; otherwise schedules GetParty via ThenRPC. Caller must .Run() (from map actor Receive).

func (*PartyContainer) Sync

func (pc *PartyContainer) Sync(party *entity.Party)

func (*PartyContainer) Update

func (pc *PartyContainer) Update(partyPb *internal.Party)

func (*PartyContainer) UpdateAsync

func (pc *PartyContainer) UpdateAsync(ctx actor.Context, evt PartyEventEnvelope) *async.Promise

type PartyEventEnvelope

type PartyEventEnvelope struct {
	EventID    string `json:"event_id"`
	EventType  string `json:"event_type"`
	WorldID    uint32 `json:"world_id"`
	PartyID    uint32 `json:"party_id"`
	Revision   uint64 `json:"revision"`
	OccurredAt string `json:"occurred_at"`
}

type PartyOperation

type PartyOperation struct {
	// contains filtered or unexported fields
}

func (*PartyOperation) Handle

func (PartyOperation) New

type PartySearchStart

type PartySearchStart struct {
	// contains filtered or unexported fields
}

func (*PartySearchStart) Handle

func (PartySearchStart) New

type PartySearchStop

type PartySearchStop struct {
	// contains filtered or unexported fields
}

func (*PartySearchStop) Handle

func (PartySearchStop) New

type Pong

type Pong struct {
	// contains filtered or unexported fields
}

func (*Pong) Handle

func (h *Pong) Handle(ctx *core.ClientContext, req *request.Pong) error

func (Pong) New

func (Pong) New(gs *GameServer) *Pong

type RangedAttack

type RangedAttack struct {
	// contains filtered or unexported fields
}

func (*RangedAttack) Handle

func (h *RangedAttack) Handle(ctx *core.ClientContext, req *request.RangedAttack) error

func (RangedAttack) New

type Secure

type Secure struct {
	// contains filtered or unexported fields
}

func (*Secure) Handle

func (h *Secure) Handle(ctx *core.ClientContext, req *request.Secure) error

func (Secure) New

func (Secure) New(gs *GameServer) *Secure

type ServerCharacterRuntime

type ServerCharacterRuntime struct {
	// contains filtered or unexported fields
}

func NewServerCharacterRuntime

func NewServerCharacterRuntime(gs *GameServer) *ServerCharacterRuntime

func (*ServerCharacterRuntime) Exists

func (r *ServerCharacterRuntime) Exists(characterID uint32) bool

func (*ServerCharacterRuntime) GetCharacterIDByName

func (r *ServerCharacterRuntime) GetCharacterIDByName(name string) (uint32, bool)

func (*ServerCharacterRuntime) GetMapPID

func (r *ServerCharacterRuntime) GetMapPID(characterID uint32) (pid *actor.PID, ok bool)

func (*ServerCharacterRuntime) RegisterCharacter

func (r *ServerCharacterRuntime) RegisterCharacter(characterID uint32, name string) error

func (*ServerCharacterRuntime) SetMapPID

func (r *ServerCharacterRuntime) SetMapPID(characterID uint32, pid *actor.PID) error

func (*ServerCharacterRuntime) UnregisterCharacter

func (r *ServerCharacterRuntime) UnregisterCharacter(characterID uint32)

type SortInventory

type SortInventory struct {
	// contains filtered or unexported fields
}

func (*SortInventory) Handle

func (SortInventory) New

type SummonAttack

type SummonAttack struct {
	// contains filtered or unexported fields
}

func (*SummonAttack) Handle

func (h *SummonAttack) Handle(ctx *core.ClientContext, req *request.SummonAttack) error

func (SummonAttack) New

type SummonSkill

type SummonSkill struct {
	// contains filtered or unexported fields
}

func (*SummonSkill) Handle

func (h *SummonSkill) Handle(ctx *core.ClientContext, req *request.SummonSkill) error

func (SummonSkill) New

type UseChair

type UseChair struct {
	// contains filtered or unexported fields
}

func (*UseChair) Handle

func (h *UseChair) Handle(ctx *core.ClientContext, req *request.UseChair) error

func (UseChair) New

func (UseChair) New(gs *GameServer) *UseChair

type UseDoor

type UseDoor struct {
	// contains filtered or unexported fields
}

func (*UseDoor) Handle

func (h *UseDoor) Handle(ctx *core.ClientContext, req *request.UseDoor) error

func (UseDoor) New

func (UseDoor) New(gs *GameServer) *UseDoor

type UseInnerPortal

type UseInnerPortal struct {
	// contains filtered or unexported fields
}

func (*UseInnerPortal) Handle

func (UseInnerPortal) New

type UseItem

type UseItem struct {
	// contains filtered or unexported fields
}

func (*UseItem) Handle

func (h *UseItem) Handle(ctx *core.ClientContext, req *request.UseItem) error

func (UseItem) New

func (UseItem) New(gs *GameServer) *UseItem

type Warp

type Warp struct {
	// contains filtered or unexported fields
}

func (*Warp) Handle

func (h *Warp) Handle(ctx *core.ClientContext, req *request.Warp) error

func (Warp) New

func (Warp) New(gs *GameServer) *Warp

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL