csprotocol

package
v0.0.0-...-d7572e3 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveObjBuff

type ActiveObjBuff struct {
	Name        string
	RemainCount int
}

type ActiveObjClient

type ActiveObjClient struct {
	UUID       string
	NickName   string
	Faction    factiontype.FactionType
	EquippedPo []*EquipClient
	Conditions condition_flag.ConditionFlag // not all condition
	X          int
	Y          int
	Alive      bool
	Chat       string

	// turn result
	Act        turnaction.TurnAction
	Dir        way9type.Way9Type
	Result     returncode.ReturnCode
	DamageGive int
	DamageTake int
}

type CarryObjClientOnFloor

type CarryObjClientOnFloor struct {
	UUID               string
	X                  int
	Y                  int
	CarryingObjectType carryingobjecttype.CarryingObjectType

	// for equip
	EquipType equipslottype.EquipSlotType
	Faction   factiontype.FactionType

	// for potion
	PotionType potiontype.PotionType

	// for scroll
	ScrollType scrolltype.ScrollType

	// for money
	Value int
}

func (CarryObjClientOnFloor) String

func (po CarryObjClientOnFloor) String() string

type CarryObjEqByLen

type CarryObjEqByLen []*EquipClient

func (CarryObjEqByLen) Len

func (objList CarryObjEqByLen) Len() int

func (CarryObjEqByLen) Less

func (objList CarryObjEqByLen) Less(i, j int) bool

func (CarryObjEqByLen) Sort

func (objList CarryObjEqByLen) Sort()

func (CarryObjEqByLen) Swap

func (objList CarryObjEqByLen) Swap(i, j int)

type DangerObjClient

type DangerObjClient struct {
	UUID       string
	OwnerID    string
	DangerType dangertype.DangerType
	X          int
	Y          int
	AffectRate float64
}

type EquipClient

type EquipClient struct {
	UUID      string
	Name      string
	EquipType equipslottype.EquipSlotType
	Faction   factiontype.FactionType
	BiasLen   float64
}

func (EquipClient) GetBias

func (po EquipClient) GetBias() bias.Bias

func (EquipClient) String

func (po EquipClient) String() string

func (EquipClient) Weight

func (po EquipClient) Weight() float64

type EquipClientByUUID

type EquipClientByUUID []*EquipClient

func (EquipClientByUUID) Len

func (objList EquipClientByUUID) Len() int

func (EquipClientByUUID) Less

func (objList EquipClientByUUID) Less(i, j int) bool

func (EquipClientByUUID) Sort

func (objList EquipClientByUUID) Sort()

func (EquipClientByUUID) Swap

func (objList EquipClientByUUID) Swap(i, j int)

type FieldObjByType

type FieldObjByType []*FieldObjClient

func (FieldObjByType) Len

func (objList FieldObjByType) Len() int

func (FieldObjByType) Less

func (objList FieldObjByType) Less(i, j int) bool

func (FieldObjByType) Sort

func (objList FieldObjByType) Sort()

func (FieldObjByType) Swap

func (objList FieldObjByType) Swap(i, j int)

type FieldObjClient

type FieldObjClient struct {
	ID          string
	X           int
	Y           int
	ActType     fieldobjacttype.FieldObjActType
	DisplayType fieldobjdisplaytype.FieldObjDisplayType
	Message     string
}

func (*FieldObjClient) GetUUID

func (p *FieldObjClient) GetUUID() string

type FloorInfo

type FloorInfo struct {
	Name       string
	W          int
	H          int
	Tiles      int
	Bias       bias.Bias
	VisitCount int
}

func (FloorInfo) GetHeight

func (fi FloorInfo) GetHeight() int

func (FloorInfo) GetName

func (fi FloorInfo) GetName() string

func (FloorInfo) GetWidth

func (fi FloorInfo) GetWidth() int

func (FloorInfo) VisitableCount

func (fi FloorInfo) VisitableCount() int

type FloorInfoByName

type FloorInfoByName []*FloorInfo

func (FloorInfoByName) Len

func (objList FloorInfoByName) Len() int

func (FloorInfoByName) Less

func (objList FloorInfoByName) Less(i, j int) bool

func (FloorInfoByName) Sort

func (objList FloorInfoByName) Sort()

func (FloorInfoByName) Swap

func (objList FloorInfoByName) Swap(i, j int)

type GameInfo

type GameInfo struct {
	Version     string
	DataVersion string

	ActiveObjUUID string
	NickName      string

	TowerSeed     int64
	TowerName     string
	Factor        [3]int64 `prettystring:"simple"`
	TotalFloorNum int
	StartTime     time.Time `prettystring:"simple"`
}

func (*GameInfo) StringForm

func (info *GameInfo) StringForm() string

type NotiActivateTrap

type NotiActivateTrap struct {
	FieldObjAct fieldobjacttype.FieldObjActType
	Triggered   bool
}

type NotiAgeing

type NotiAgeing struct {
	FloorName string
}

type NotiDeath

type NotiDeath struct {
}

type NotiEnterFloor

type NotiEnterFloor struct {
	FI        *FloorInfo
	TurnCount int
}

type NotiFloorComplete

type NotiFloorComplete struct {
	FI     *FloorInfo
	Tiles  tilearea.TileArea
	FOList []*FieldObjClient
}

NotiFloorComplete used for floor complete

type NotiForgetFloor

type NotiForgetFloor struct {
	FloorName string
}

type NotiFoundFieldObj

type NotiFoundFieldObj struct {
	FloorName string
	FieldObj  *FieldObjClient
}

type NotiLeaveFloor

type NotiLeaveFloor struct {
	FI *FloorInfo
}

type NotiReadyToRebirth

type NotiReadyToRebirth struct {
}

type NotiRebirthed

type NotiRebirthed struct {
}

type NotiVPObjList

type NotiVPObjList struct {
	TurnCount     int
	FloorName     string
	ActiveObj     *PlayerActiveObjInfo
	ActiveObjList []*ActiveObjClient
	CarryObjList  []*CarryObjClientOnFloor
	FieldObjList  []*FieldObjClient
	DangerObjList []*DangerObjClient
}

type NotiVPTiles

type NotiVPTiles struct {
	FloorName string
	VPX       int // viewport center X
	VPY       int // viewport center Y
	VPTiles   *viewportdata.ViewportTileArea2
}

NotiVPTiles contains tile info center from pos

type Packet

type Packet struct {
	FlowType   flowtype.FlowType
	PacketID   int                   // Request,Response
	ReturnCode returncode.ReturnCode // Response
	Body       interface{}
}

type PlayerActiveObjInfo

type PlayerActiveObjInfo struct {
	Bias       bias.Bias
	Conditions condition_flag.ConditionFlag
	Exp        int
	TotalAO    int // total activeobject count
	Ranking    int // ranking / totalao
	Death      int
	Kill       int
	Sight      float64
	HP         float64
	HPMax      float64
	SP         float64
	SPMax      float64
	AIPlan     aiplan.AIPlan
	EquippedPo []*EquipClient
	EquipBag   []*EquipClient
	PotionBag  []*PotionClient
	ScrollBag  []*ScrollClient
	Wallet     int
	Wealth     int
	ActiveBuff []*ActiveObjBuff
	AP         float64

	Act        *aoactreqrsp.ActReqRsp
	TurnResult []TurnResultClient
}

func (PlayerActiveObjInfo) CalcDamageGive

func (pao PlayerActiveObjInfo) CalcDamageGive() float64

func (PlayerActiveObjInfo) CalcDamageTake

func (pao PlayerActiveObjInfo) CalcDamageTake() float64

func (PlayerActiveObjInfo) CalcWeight

func (pao PlayerActiveObjInfo) CalcWeight() float64

func (PlayerActiveObjInfo) Exist

func (pao PlayerActiveObjInfo) Exist(id string) bool

type PotionClient

type PotionClient struct {
	UUID       string
	PotionType potiontype.PotionType
}

func (PotionClient) String

func (po PotionClient) String() string

func (PotionClient) Weight

func (po PotionClient) Weight() int

type PotionClientByUUID

type PotionClientByUUID []*PotionClient

func (PotionClientByUUID) Len

func (objList PotionClientByUUID) Len() int

func (PotionClientByUUID) Less

func (objList PotionClientByUUID) Less(i, j int) bool

func (PotionClientByUUID) Sort

func (objList PotionClientByUUID) Sort()

func (PotionClientByUUID) Swap

func (objList PotionClientByUUID) Swap(i, j int)

type ReqAIPlay

type ReqAIPlay struct {
	On bool
}

AIPlay

type ReqAchieveInfo

type ReqAchieveInfo struct {
}

AchieveInfo

type ReqAdminAddEquip

type ReqAdminAddEquip struct {
	Faction factiontype.FactionType
	Equip   equipslottype.EquipSlotType
}

AdminAddEquip add random equip to inven

type ReqAdminAddExp

type ReqAdminAddExp struct {
	Exp int
}

AdminAddExp add arg to battle exp

type ReqAdminAddMoney

type ReqAdminAddMoney struct {
	Money int
}

AdminAddMoney add arg money to inven

type ReqAdminAddPotion

type ReqAdminAddPotion struct {
	Potion potiontype.PotionType
}

AdminAddPotion add arg potion to inven

type ReqAdminAddScroll

type ReqAdminAddScroll struct {
	Scroll scrolltype.ScrollType
}

AdminAddScroll add arg scroll to inven

type ReqAdminCondition

type ReqAdminCondition struct {
	Condition condition.Condition
}

AdminCondition add arg condition for 100 turn

type ReqAdminFloorMap

type ReqAdminFloorMap struct {
}

AdminFloorMap complete current floor map

type ReqAdminFloorMove

type ReqAdminFloorMove struct {
	Floor string
}

AdminFloorMove Next Before floorUUID

type ReqAdminForgetFloor

type ReqAdminForgetFloor struct {
}

AdminForgetFloor forget current floor map

type ReqAdminPotionEffect

type ReqAdminPotionEffect struct {
	Potion potiontype.PotionType
}

AdminPotionEffect buff by arg potion type

type ReqAdminScrollEffect

type ReqAdminScrollEffect struct {
	Scroll scrolltype.ScrollType
}

AdminScrollEffect buff by arg Scroll type

type ReqAdminTeleport

type ReqAdminTeleport struct {
	X int
	Y int
}

AdminTeleport random pos in floor

type ReqTurnAction

type ReqTurnAction struct {
	Act  turnaction.TurnAction
	Dir  way9type.Way9Type
	UUID string
}

type ReqVisitFloorList

type ReqVisitFloorList struct {
}

VisitFloorList floor info of visited

type RspAIPlay

type RspAIPlay struct {
}

type RspAchieveInfo

type RspAchieveInfo struct {
	AchieveStat   achievetype_vector_float64.AchieveTypeVector_float64 `prettystring:"simple"`
	PotionStat    potiontype_vector_int.PotionTypeVector_int           `prettystring:"simple"`
	ScrollStat    scrolltype_vector_int.ScrollTypeVector_int           `prettystring:"simple"`
	FOActStat     fieldobjacttype_vector_int.FieldObjActTypeVector_int `prettystring:"simple"`
	ConditionStat condition_vector_int.ConditionVector_int             `prettystring:"simple"`
}

type RspAdminAddEquip

type RspAdminAddEquip struct {
}

type RspAdminAddExp

type RspAdminAddExp struct {
}

type RspAdminAddMoney

type RspAdminAddMoney struct {
}

type RspAdminAddPotion

type RspAdminAddPotion struct {
}

type RspAdminAddScroll

type RspAdminAddScroll struct {
}

type RspAdminCondition

type RspAdminCondition struct {
}

type RspAdminFloorMap

type RspAdminFloorMap struct {
}

type RspAdminFloorMove

type RspAdminFloorMove struct {
}

type RspAdminForgetFloor

type RspAdminForgetFloor struct {
}

type RspAdminPotionEffect

type RspAdminPotionEffect struct {
}

type RspAdminScrollEffect

type RspAdminScrollEffect struct {
}

type RspAdminTeleport

type RspAdminTeleport struct {
}

type RspTurnAction

type RspTurnAction struct {
}

type RspVisitFloorList

type RspVisitFloorList struct {
	FloorList []*FloorInfo
}

type ScrollClient

type ScrollClient struct {
	UUID       string
	ScrollType scrolltype.ScrollType
}

func (ScrollClient) String

func (po ScrollClient) String() string

func (ScrollClient) Weight

func (po ScrollClient) Weight() int

type ScrollClientByUUID

type ScrollClientByUUID []*ScrollClient

func (ScrollClientByUUID) Len

func (objList ScrollClientByUUID) Len() int

func (ScrollClientByUUID) Less

func (objList ScrollClientByUUID) Less(i, j int) bool

func (ScrollClientByUUID) Sort

func (objList ScrollClientByUUID) Sort()

func (ScrollClientByUUID) Swap

func (objList ScrollClientByUUID) Swap(i, j int)

type TurnResultClient

type TurnResultClient struct {
	ResultType turnresulttype.TurnResultType
	DstUUID    string
	Arg        float64
}

func (TurnResultClient) String

func (ifa TurnResultClient) String() string

Jump to

Keyboard shortcuts

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