mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-11-11 08:38:45 +00:00
update
This commit is contained in:
45
luban_examples/Projects/Go_bin/gen/test.ItemBase.go
Normal file
45
luban_examples/Projects/Go_bin/gen/test.ItemBase.go
Normal file
@@ -0,0 +1,45 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
package cfg;
|
||||
|
||||
|
||||
import (
|
||||
"demo/luban"
|
||||
)
|
||||
|
||||
import "errors"
|
||||
|
||||
type TestItemBase struct {
|
||||
Id int32
|
||||
Name string
|
||||
Desc string
|
||||
}
|
||||
|
||||
const TypeId_TestItemBase = -1631171968
|
||||
|
||||
func (*TestItemBase) GetTypeId() int32 {
|
||||
return -1631171968
|
||||
}
|
||||
|
||||
func NewTestItemBase(_buf *luban.ByteBuf) (interface{}, error) {
|
||||
var id int32
|
||||
var err error
|
||||
if id, err = _buf.ReadInt() ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
switch id {
|
||||
case -1226641649: _v, err := NewTestItem(_buf); if err != nil { return nil, errors.New("test.item") } else { return _v, nil }
|
||||
case -76837102: _v, err := NewTestEquipment(_buf); if err != nil { return nil, errors.New("test.equipment") } else { return _v, nil }
|
||||
case -625155649: _v, err := NewTestDecorator(_buf); if err != nil { return nil, errors.New("test.decorator") } else { return _v, nil }
|
||||
default: return nil, errors.New("unknown type id")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user