本文整理汇总了Golang中github.com/beoran/woe/sitef.Record.Get方法的典型用法代码示例。如果您正苦于以下问题:Golang Record.Get方法的具体用法?Golang Record.Get怎么用?Golang Record.Get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/beoran/woe/sitef.Record
的用法示例。
在下文中一共展示了Record.Get方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: LoadSirec
// Load a character from a sitef record.
func (me *Character) LoadSirec(rec sitef.Record) (err error) {
aname := rec.Get("accountname")
account, err := DefaultWorld.LoadAccount(aname)
if err != nil {
return err
}
me.Account = account
me.Being.LoadSitef(rec)
return nil
}
示例2: LoadSitef
// Load an entity from a sitef record.
func (me *Entity) LoadSitef(rec sitef.Record) (err error) {
me.ID = rec.Get("id")
me.Name = rec.Get("name")
me.Short = rec.Get("short")
me.Long = rec.Get("long")
return nil
}
示例3: LoadSitef
// Load a being from a sitef record.
func (me *Being) LoadSitef(rec sitef.Record) (err error) {
me.Entity.LoadSitef(rec)
me.Level = rec.GetIntDefault("level", 1)
me.Gender = EntitylikeToGender(GenderEntityList.FindID(rec.Get("gender")))
me.Job = EntitylikeToJob(JobEntityList.FindID(rec.Get("job")))
me.Kin = EntitylikeToKin(KinEntityList.FindID(rec.Get("kin")))
me.Talents.LoadSitef(rec)
me.Vitals.LoadSitef(rec)
me.EquipmentValues.LoadSitef(rec)
me.Aptitudes.LoadSitef(rec)
me.Inventory.LoadSitef(rec)
if rec.Get("room") != "" {
var err error
me.Room, err = DefaultWorld.LoadRoom(rec.Get("room"))
if err != nil {
monolog.WriteError(err)
return err
}
}
return nil
}