model

package
v0.0.0-...-98bdf84 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ArmyCmdIdle        = 0 //空闲
	ArmyCmdAttack      = 1 //攻击
	ArmyCmdDefend      = 2 //驻守
	ArmyCmdReclamation = 3 //屯垦
	ArmyCmdBack        = 4 //撤退
	ArmyCmdConscript   = 5 //征兵
	ArmyCmdTransfer    = 6 //调动
)
View Source
const (
	ArmyStop    = 0
	ArmyRunning = 1
)
View Source
const (
	UnionDismiss = 0 //解散
	UnionRunning = 1 //运行中
)
View Source
const (
	UnionOpCreate    = 0 //创建
	UnionOpDismiss   = 1 //解散
	UnionOpJoin      = 2 //加入
	UnionOpExit      = 3 //退出
	UnionOpKick      = 4 //踢出
	UnionOpAppoint   = 5 //任命
	UnionOpAbdicate  = 6 //禅让
	UnionOpModNotice = 7 //修改公告
)
View Source
const (
	GeneralNormal      = 0 //正常
	GeneralComposeStar = 1 //星级合成
	GeneralConvert     = 2 //转换
)
View Source
const (
	MapBuildSysFortress = 50 //系统要塞
	MapBuildSysCity     = 51 //系统城市
	MapBuildFortress    = 56 //玩家要塞
)
View Source
const SkillLimit = 3

Variables

View Source
var ArmyIsInView func(rid, x, y int) bool
View Source
var GetCityCost func(cid int) int8
View Source
var GetCityLv func(cid int) int8
View Source
var GetDepotCapacity func(rid int) int
View Source
var GetMainMembers func(unionId int) []int
View Source
var GetMaxDurable func(cid int) int
View Source
var GetParentId func(rid int) int
View Source
var GetRoleNickName func(rid int) string
View Source
var GetUnionId func(rid int) int
View Source
var GetUnionName func(unionId int) string
View Source
var GetYield func(rid int) Yield
View Source
var MapResTypeLevel func(x, y int) (bool, int8, int8)
View Source
var ServerId = 0

Functions

func NewAbdicate

func NewAbdicate(opNickName string, targetNickName string,
	unionId int, opRId int, targetId int, memberType int)

func NewAppoint

func NewAppoint(opNickName string, targetNickName string,
	unionId int, opRId int, targetId int, memberType int)

func NewCreate

func NewCreate(opNickName string, unionId int, opRId int)

func NewDismiss

func NewDismiss(opNickName string, unionId int, opRId int)

func NewExit

func NewExit(opNickName string, unionId int, opRId int)

func NewJoin

func NewJoin(targetNickName string, unionId int, opRId int, targetId int)

func NewKick

func NewKick(opNickName string, targetNickName string, unionId int, opRId int, targetId int)

func NewModNotice

func NewModNotice(opNickName string, unionId int, opRId int)

Types

type Army

type Army struct {
	Id                 int                            `xorm:"id pk autoincr"`
	RId                int                            `xorm:"rid"`
	CityId             int                            `xorm:"cityId"`
	Order              int8                           `xorm:"order"`
	Generals           string                         `xorm:"generals"`
	Soldiers           string                         `xorm:"soldiers"`
	ConscriptTimes     string                         `xorm:"conscript_times"` //征兵结束时间,json数组
	ConscriptCnts      string                         `xorm:"conscript_cnts"`  //征兵数量,json数组
	Cmd                int8                           `xorm:"cmd"`
	FromX              int                            `xorm:"from_x"`
	FromY              int                            `xorm:"from_y"`
	ToX                int                            `xorm:"to_x"`
	ToY                int                            `xorm:"to_y"`
	Start              time.Time                      `json:"-"xorm:"start"`
	End                time.Time                      `json:"-"xorm:"end"`
	State              int8                           `xorm:"-"` //状态:0:running,1:stop
	GeneralArray       [static_conf.ArmyGCnt]int      `json:"-" xorm:"-"`
	SoldierArray       [static_conf.ArmyGCnt]int      `json:"-" xorm:"-"`
	ConscriptTimeArray [static_conf.ArmyGCnt]int64    `json:"-" xorm:"-"`
	ConscriptCntArray  [static_conf.ArmyGCnt]int      `json:"-" xorm:"-"`
	Gens               [static_conf.ArmyGCnt]*General `json:"-" xorm:"-"`
	CellX              int                            `json:"-" xorm:"-"`
	CellY              int                            `json:"-" xorm:"-"`
}

军队

func (*Army) AfterSet

func (this *Army) AfterSet(name string, cell xorm.Cell)

func (*Army) BeforeInsert

func (this *Army) BeforeInsert()

func (*Army) BeforeUpdate

func (this *Army) BeforeUpdate()

func (*Army) BelongToRId

func (this *Army) BelongToRId() []int

func (*Army) CheckConscript

func (this *Army) CheckConscript()

检测征兵是否完成,服务器不做定时任务,用到的时候再检测

func (*Army) CheckSyncCell

func (this *Army) CheckSyncCell()

func (*Army) ClearConscript

func (this *Army) ClearConscript()

func (*Army) GetCamp

func (this *Army) GetCamp() int8

获取军队阵营

func (*Army) IsCanOutWar

func (this *Army) IsCanOutWar() bool

是否能出战

func (*Army) IsCanView

func (this *Army) IsCanView(rid, x, y int) bool

func (*Army) IsCellView

func (this *Army) IsCellView() bool

推送同步 begin

func (*Army) IsIdle

func (this *Army) IsIdle() bool

func (*Army) Position

func (this *Army) Position() (int, int)

func (*Army) PositionCanModify

func (this *Army) PositionCanModify(position int) bool

队伍指定的位置是否能变化(上下阵)

func (*Army) Push

func (this *Army) Push()

func (*Army) PushMsgName

func (this *Army) PushMsgName() string

func (*Army) SyncExecute

func (this *Army) SyncExecute()

func (*Army) TPosition

func (this *Army) TPosition() (int, int)

func (*Army) TableName

func (this *Army) TableName() string

func (*Army) ToGeneral

func (this *Army) ToGeneral()

func (*Army) ToProto

func (this *Army) ToProto() interface{}

func (*Army) ToSoldier

func (this *Army) ToSoldier()

type CityFacility

type CityFacility struct {
	Id         int    `xorm:"id pk autoincr"`
	RId        int    `xorm:"rid"`
	CityId     int    `xorm:"cityId"`
	Facilities string `xorm:"facilities"`
}

func (*CityFacility) Facility

func (this *CityFacility) Facility() []Facility

func (*CityFacility) SyncExecute

func (this *CityFacility) SyncExecute()

func (*CityFacility) TableName

func (this *CityFacility) TableName() string

type Coalition

type Coalition struct {
	Id           int       `xorm:"id pk autoincr"`
	Name         string    `xorm:"name"`
	Members      string    `xorm:"members"`
	MemberArray  []int     `xorm:"-"`
	CreateId     int       `xorm:"create_id"`
	Chairman     int       `xorm:"chairman"`
	ViceChairman int       `xorm:"vice_chairman"`
	Notice       string    `xorm:"notice"`
	State        int8      `xorm:"state"`
	Ctime        time.Time `xorm:"ctime"`
}

func (*Coalition) AfterSet

func (this *Coalition) AfterSet(name string, cell xorm.Cell)

func (*Coalition) BeforeInsert

func (this *Coalition) BeforeInsert()

func (*Coalition) BeforeUpdate

func (this *Coalition) BeforeUpdate()

func (*Coalition) Cnt

func (this *Coalition) Cnt() int

func (*Coalition) SyncExecute

func (this *Coalition) SyncExecute()

func (*Coalition) TableName

func (this *Coalition) TableName() string

func (*Coalition) ToProto

func (this *Coalition) ToProto() interface{}

type CoalitionApply

type CoalitionApply struct {
	Id      int       `xorm:"id pk autoincr"`
	UnionId int       `xorm:"union_id"`
	RId     int       `xorm:"rid"`
	State   int8      `xorm:"state"`
	Ctime   time.Time `xorm:"ctime"`
}

func (*CoalitionApply) BelongToRId

func (this *CoalitionApply) BelongToRId() []int

func (*CoalitionApply) IsCanView

func (this *CoalitionApply) IsCanView(rid, x, y int) bool

func (*CoalitionApply) IsCellView

func (this *CoalitionApply) IsCellView() bool

推送同步 begin

func (*CoalitionApply) Position

func (this *CoalitionApply) Position() (int, int)

func (*CoalitionApply) Push

func (this *CoalitionApply) Push()

func (*CoalitionApply) PushMsgName

func (this *CoalitionApply) PushMsgName() string

func (*CoalitionApply) SyncExecute

func (this *CoalitionApply) SyncExecute()

func (*CoalitionApply) TPosition

func (this *CoalitionApply) TPosition() (int, int)

func (*CoalitionApply) TableName

func (this *CoalitionApply) TableName() string

func (*CoalitionApply) ToProto

func (this *CoalitionApply) ToProto() interface{}

type CoalitionLog

type CoalitionLog struct {
	Id       int       `xorm:"id pk autoincr"`
	UnionId  int       `xorm:"union_id"`
	OPRId    int       `xorm:"op_rid"`
	TargetId int       `xorm:"target_id"`
	State    int8      `xorm:"state"`
	Des      string    `xorm:"des"`
	Ctime    time.Time `xorm:"ctime"`
}

func (*CoalitionLog) TableName

func (this *CoalitionLog) TableName() string

func (*CoalitionLog) ToProto

func (this *CoalitionLog) ToProto() interface{}

type Facility

type Facility struct {
	Name         string `json:"name"`
	PrivateLevel int8   `json:"level"` //等级,外部读的时候不能直接读,要用GetLevel
	Type         int8   `json:"type"`
	UpTime       int64  `json:"up_time"` //升级的时间戳,0表示该等级已经升级完成了
}

func (*Facility) CanLV

func (this *Facility) CanLV() bool

func (*Facility) GetLevel

func (this *Facility) GetLevel() int8

升级这里做成被动触发产生,不做定时

type General

type General struct {
	Id            int             `xorm:"id pk autoincr"`
	RId           int             `xorm:"rid"`
	CfgId         int             `xorm:"cfgId"`
	PhysicalPower int             `xorm:"physical_power"`
	Level         int8            `xorm:"level"`
	Exp           int             `xorm:"exp"`
	Order         int8            `xorm:"order"`
	CityId        int             `xorm:"cityId"`
	CreatedAt     time.Time       `xorm:"created_at"`
	CurArms       int             `xorm:"arms"`
	HasPrPoint    int             `xorm:"has_pr_point"`
	UsePrPoint    int             `xorm:"use_pr_point"`
	AttackDis     int             `xorm:"attack_distance"`
	ForceAdded    int             `xorm:"force_added"`
	StrategyAdded int             `xorm:"strategy_added"`
	DefenseAdded  int             `xorm:"defense_added"`
	SpeedAdded    int             `xorm:"speed_added"`
	DestroyAdded  int             `xorm:"destroy_added"`
	StarLv        int8            `xorm:"star_lv"`
	Star          int8            `xorm:"star"`
	ParentId      int             `xorm:"parentId"`
	Skills        string          `xorm:"skills"`
	SkillsArray   []*proto.GSkill `xorm:"-"`
	State         int8            `xorm:"state"`
}

func NewGeneral

func NewGeneral(cfgId int, rid int, level int8) (*General, bool)

func (*General) AfterSet

func (this *General) AfterSet(name string, cell xorm.Cell)

func (*General) BeforeInsert

func (this *General) BeforeInsert()

func (*General) BeforeUpdate

func (this *General) BeforeUpdate()

func (*General) BelongToRId

func (this *General) BelongToRId() []int

func (*General) DownSkill

func (this *General) DownSkill(skillId int, pos int) bool

func (*General) GetCamp

func (this *General) GetCamp() int8

获取阵营

func (*General) GetDefense

func (this *General) GetDefense() int

func (*General) GetDestroy

func (this *General) GetDestroy() int

func (*General) GetForce

func (this *General) GetForce() int

func (*General) GetSpeed

func (this *General) GetSpeed() int

func (*General) GetStrategy

func (this *General) GetStrategy() int

func (*General) IsActive

func (this *General) IsActive() bool

func (*General) IsCanView

func (this *General) IsCanView(rid, x, y int) bool

func (*General) IsCellView

func (this *General) IsCellView() bool

推送同步 begin

func (*General) PosSkill

func (this *General) PosSkill(pos int) (*proto.GSkill, error)

func (*General) Position

func (this *General) Position() (int, int)

func (*General) Push

func (this *General) Push()

func (*General) PushMsgName

func (this *General) PushMsgName() string

func (*General) SyncExecute

func (this *General) SyncExecute()

func (*General) TPosition

func (this *General) TPosition() (int, int)

func (*General) TableName

func (this *General) TableName() string

func (*General) ToProto

func (this *General) ToProto() interface{}

func (*General) UpSkill

func (this *General) UpSkill(skillId int, cfgId int, pos int) bool

type MapRoleBuild

type MapRoleBuild struct {
	Id         int       `xorm:"id pk autoincr"`
	RId        int       `xorm:"rid"`
	Type       int8      `xorm:"type"`
	Level      int8      `xorm:"level"`
	OPLevel    int8      `xorm:"op_level"` //操作level
	X          int       `xorm:"x"`
	Y          int       `xorm:"y"`
	Name       string    `xorm:"name"`
	Wood       int       `xorm:"-"`
	Iron       int       `xorm:"-"`
	Stone      int       `xorm:"-"`
	Grain      int       `xorm:"-"`
	Defender   int       `xorm:"-"`
	CurDurable int       `xorm:"cur_durable"`
	MaxDurable int       `xorm:"max_durable"`
	OccupyTime time.Time `xorm:"occupy_time"`
	EndTime    time.Time `xorm:"end_time"` //建造或升级完的时间
	GiveUpTime int64     `xorm:"giveUp_time"`
}

func (*MapRoleBuild) BelongToRId

func (this *MapRoleBuild) BelongToRId() []int

func (*MapRoleBuild) BuildOrUp

func (this *MapRoleBuild) BuildOrUp(cfg static_conf.BCLevelCfg)

func (*MapRoleBuild) CellRadius

func (this *MapRoleBuild) CellRadius() int

func (*MapRoleBuild) ConvertToRes

func (this *MapRoleBuild) ConvertToRes()

func (*MapRoleBuild) DelBuild

func (this *MapRoleBuild) DelBuild(cfg static_conf.BCLevelCfg)

func (*MapRoleBuild) Init

func (this *MapRoleBuild) Init()

func (*MapRoleBuild) IsBusy

func (this *MapRoleBuild) IsBusy() bool

func (*MapRoleBuild) IsCanView

func (this *MapRoleBuild) IsCanView(rid, x, y int) bool

func (*MapRoleBuild) IsCellView

func (this *MapRoleBuild) IsCellView() bool

推送同步 begin

func (*MapRoleBuild) IsHasTransferAuth

func (this *MapRoleBuild) IsHasTransferAuth() bool

是否有调兵权限

func (*MapRoleBuild) IsHaveModifyLVAuth

func (this *MapRoleBuild) IsHaveModifyLVAuth() bool

是否有修改等级权限

func (*MapRoleBuild) IsInGiveUp

func (this *MapRoleBuild) IsInGiveUp() bool

func (*MapRoleBuild) IsResBuild

func (this *MapRoleBuild) IsResBuild() bool

func (*MapRoleBuild) IsRoleFortress

func (this *MapRoleBuild) IsRoleFortress() bool

func (*MapRoleBuild) IsSysCity

func (this *MapRoleBuild) IsSysCity() bool

func (*MapRoleBuild) IsSysFortress

func (this *MapRoleBuild) IsSysFortress() bool

func (*MapRoleBuild) IsWarFree

func (this *MapRoleBuild) IsWarFree() bool

func (*MapRoleBuild) Position

func (this *MapRoleBuild) Position() (int, int)

func (*MapRoleBuild) Push

func (this *MapRoleBuild) Push()

func (*MapRoleBuild) PushMsgName

func (this *MapRoleBuild) PushMsgName() string

func (*MapRoleBuild) Reset

func (this *MapRoleBuild) Reset()

func (*MapRoleBuild) SyncExecute

func (this *MapRoleBuild) SyncExecute()

func (*MapRoleBuild) TPosition

func (this *MapRoleBuild) TPosition() (int, int)

func (*MapRoleBuild) TableName

func (this *MapRoleBuild) TableName() string

func (*MapRoleBuild) ToProto

func (this *MapRoleBuild) ToProto() interface{}

type MapRoleCity

type MapRoleCity struct {
	CityId     int       `xorm:"cityId pk autoincr"`
	RId        int       `xorm:"rid"`
	Name       string    `xorm:"name" validate:"min=4,max=20,regexp=^[a-zA-Z0-9_]*$"`
	X          int       `xorm:"x"`
	Y          int       `xorm:"y"`
	IsMain     int8      `xorm:"is_main"`
	CurDurable int       `xorm:"cur_durable"`
	CreatedAt  time.Time `xorm:"created_at"`
	OccupyTime time.Time `xorm:"occupy_time"`
	// contains filtered or unexported fields
}

func (*MapRoleCity) BelongToRId

func (this *MapRoleCity) BelongToRId() []int

func (*MapRoleCity) CellRadius

func (this *MapRoleCity) CellRadius() int

func (*MapRoleCity) DurableChange

func (this *MapRoleCity) DurableChange(change int)

func (*MapRoleCity) IsCanView

func (this *MapRoleCity) IsCanView(rid, x, y int) bool

func (*MapRoleCity) IsCellView

func (this *MapRoleCity) IsCellView() bool

推送同步 begin

func (*MapRoleCity) IsWarFree

func (this *MapRoleCity) IsWarFree() bool

func (*MapRoleCity) Level

func (this *MapRoleCity) Level() int8

func (*MapRoleCity) Position

func (this *MapRoleCity) Position() (int, int)

func (*MapRoleCity) Push

func (this *MapRoleCity) Push()

func (*MapRoleCity) PushMsgName

func (this *MapRoleCity) PushMsgName() string

func (*MapRoleCity) SyncExecute

func (this *MapRoleCity) SyncExecute()

func (*MapRoleCity) TPosition

func (this *MapRoleCity) TPosition() (int, int)

func (*MapRoleCity) TableName

func (this *MapRoleCity) TableName() string

func (*MapRoleCity) ToProto

func (this *MapRoleCity) ToProto() interface{}

type NationalMap

type NationalMap struct {
	MId   int  `xorm:"mid"`
	X     int  `xorm:"x"`
	Y     int  `xorm:"y"`
	Type  int8 `xorm:"type"`
	Level int8 `xorm:"level"`
}

type Role

type Role struct {
	RId        int       `xorm:"rid pk autoincr"`
	UId        int       `xorm:"uid"`
	NickName   string    `xorm:"nick_name" validate:"min=4,max=20,regexp=^[a-zA-Z0-9_]*$"`
	Balance    int       `xorm:"balance"`
	HeadId     int16     `xorm:"headId"`
	Sex        int8      `xorm:"sex"`
	Profile    string    `xorm:"profile"`
	LoginTime  time.Time `xorm:"login_time"`
	LogoutTime time.Time `xorm:"logout_time"`
	CreatedAt  time.Time `xorm:"created_at"`
}

func (*Role) TableName

func (this *Role) TableName() string

func (*Role) ToProto

func (this *Role) ToProto() interface{}

type RoleAttribute

type RoleAttribute struct {
	Id              int            `xorm:"id pk autoincr"`
	RId             int            `xorm:"rid"`
	UnionId         int            `xorm:"-"`                 //联盟id
	ParentId        int            `xorm:"parent_id"`         //上级id(被沦陷)
	CollectTimes    int8           `xorm:"collect_times"`     //征收次数
	LastCollectTime time.Time      `xorm:"last_collect_time"` //最后征收的时间
	PosTags         string         `xorm:"pos_tags"`          //位置标记
	PosTagArray     []proto.PosTag `xorm:"-"`
}

func (*RoleAttribute) AddPosTag

func (this *RoleAttribute) AddPosTag(x, y int, name string)

func (*RoleAttribute) AfterSet

func (this *RoleAttribute) AfterSet(name string, cell xorm.Cell)

func (*RoleAttribute) BeforeInsert

func (this *RoleAttribute) BeforeInsert()

func (*RoleAttribute) BeforeUpdate

func (this *RoleAttribute) BeforeUpdate()

func (*RoleAttribute) BelongToRId

func (this *RoleAttribute) BelongToRId() []int

func (*RoleAttribute) IsCanView

func (this *RoleAttribute) IsCanView(rid, x, y int) bool

func (*RoleAttribute) IsCellView

func (this *RoleAttribute) IsCellView() bool

推送同步 begin

func (*RoleAttribute) Position

func (this *RoleAttribute) Position() (int, int)

func (*RoleAttribute) Push

func (this *RoleAttribute) Push()

func (*RoleAttribute) PushMsgName

func (this *RoleAttribute) PushMsgName() string

func (*RoleAttribute) RemovePosTag

func (this *RoleAttribute) RemovePosTag(x, y int)

func (*RoleAttribute) SyncExecute

func (this *RoleAttribute) SyncExecute()

func (*RoleAttribute) TPosition

func (this *RoleAttribute) TPosition() (int, int)

func (*RoleAttribute) TableName

func (this *RoleAttribute) TableName() string

func (*RoleAttribute) ToProto

func (this *RoleAttribute) ToProto() interface{}

type RoleRes

type RoleRes struct {
	Id     int `xorm:"id pk autoincr"`
	RId    int `xorm:"rid"`
	Wood   int `xorm:"wood"`
	Iron   int `xorm:"iron"`
	Stone  int `xorm:"stone"`
	Grain  int `xorm:"grain"`
	Gold   int `xorm:"gold"`
	Decree int `xorm:"decree"` //令牌
}

func (*RoleRes) BelongToRId

func (this *RoleRes) BelongToRId() []int

func (*RoleRes) IsCanView

func (this *RoleRes) IsCanView(rid, x, y int) bool

func (*RoleRes) IsCellView

func (this *RoleRes) IsCellView() bool

推送同步 begin

func (*RoleRes) Position

func (this *RoleRes) Position() (int, int)

func (*RoleRes) Push

func (this *RoleRes) Push()

func (*RoleRes) PushMsgName

func (this *RoleRes) PushMsgName() string

func (*RoleRes) SyncExecute

func (this *RoleRes) SyncExecute()

func (*RoleRes) TPosition

func (this *RoleRes) TPosition() (int, int)

func (*RoleRes) TableName

func (this *RoleRes) TableName() string

func (*RoleRes) ToProto

func (this *RoleRes) ToProto() interface{}

type Skill

type Skill struct {
	Id             int    `xorm:"id pk autoincr"`
	RId            int    `xorm:"rid"`
	CfgId          int    `xorm:"cfgId"`
	BelongGenerals string `xorm:"belong_generals"`
	Generals       []int  `xorm:"-"`
}

func NewSkill

func NewSkill(rid int, cfgId int) *Skill

func (*Skill) AfterSet

func (this *Skill) AfterSet(name string, cell xorm.Cell)

func (*Skill) ArmyIsIn

func (this *Skill) ArmyIsIn(armId int) bool

func (*Skill) BeforeInsert

func (this *Skill) BeforeInsert()

func (*Skill) BeforeUpdate

func (this *Skill) BeforeUpdate()

func (*Skill) BelongToRId

func (this *Skill) BelongToRId() []int

func (*Skill) DownSkill

func (this *Skill) DownSkill(gId int)

func (*Skill) IsCanView

func (this *Skill) IsCanView(rid, x, y int) bool

func (*Skill) IsCellView

func (this *Skill) IsCellView() bool

推送同步 begin

func (*Skill) IsInLimit

func (this *Skill) IsInLimit() bool

func (*Skill) Limit

func (this *Skill) Limit() int

func (*Skill) Position

func (this *Skill) Position() (int, int)

func (*Skill) Push

func (this *Skill) Push()

func (*Skill) PushMsgName

func (this *Skill) PushMsgName() string

func (*Skill) SyncExecute

func (this *Skill) SyncExecute()

func (*Skill) TPosition

func (this *Skill) TPosition() (int, int)

func (*Skill) TableName

func (this *Skill) TableName() string

func (*Skill) ToProto

func (this *Skill) ToProto() interface{}

func (*Skill) UpSkill

func (this *Skill) UpSkill(gId int)

type WarReport

type WarReport struct {
	Id                int       `xorm:"id pk autoincr"`
	AttackRid         int       `xorm:"a_rid"`
	DefenseRid        int       `xorm:"d_rid"`
	BegAttackArmy     string    `xorm:"b_a_army"`
	BegDefenseArmy    string    `xorm:"b_d_army"`
	EndAttackArmy     string    `xorm:"e_a_army"`
	EndDefenseArmy    string    `xorm:"e_d_army"`
	BegAttackGeneral  string    `xorm:"b_a_general"`
	BegDefenseGeneral string    `xorm:"b_d_general"`
	EndAttackGeneral  string    `xorm:"e_a_general"`
	EndDefenseGeneral string    `xorm:"e_d_general"`
	Result            int       `xorm:"result"` //0失败,1打平,2胜利
	Rounds            string    `xorm:"rounds"` //回合
	AttackIsRead      bool      `xorm:"a_is_read"`
	DefenseIsRead     bool      `xorm:"d_is_read"`
	DestroyDurable    int       `xorm:"destroy"`
	Occupy            int       `xorm:"occupy"`
	X                 int       `xorm:"x"`
	Y                 int       `xorm:"y"`
	CTime             time.Time `xorm:"ctime"`
}

func (*WarReport) BelongToRId

func (this *WarReport) BelongToRId() []int

func (*WarReport) IsCanView

func (this *WarReport) IsCanView(rid, x, y int) bool

func (*WarReport) IsCellView

func (this *WarReport) IsCellView() bool

推送同步 begin

func (*WarReport) Position

func (this *WarReport) Position() (int, int)

func (*WarReport) Push

func (this *WarReport) Push()

func (*WarReport) PushMsgName

func (this *WarReport) PushMsgName() string

func (*WarReport) SyncExecute

func (this *WarReport) SyncExecute()

func (*WarReport) TPosition

func (this *WarReport) TPosition() (int, int)

func (*WarReport) TableName

func (this *WarReport) TableName() string

func (*WarReport) ToProto

func (this *WarReport) ToProto() interface{}

type Yield

type Yield struct {
	Wood  int
	Iron  int
	Stone int
	Grain int
	Gold  int
}

Jump to

Keyboard shortcuts

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