mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 11:24:46 +00:00
46 lines
1.3 KiB
Go
46 lines
1.3 KiB
Go
|
|
||
|
//------------------------------------------------------------------------------
|
||
|
// <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")
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|