mirror of
https://github.com/CPunch/gopenfusion.git
synced 2025-11-21 22:50:33 +00:00
landwalker achieved!
- the shard's ip sent to the client via the login server is currently hardcoded in config/config.go - no packets other than P_CL2FE_REQ_PC_ENTER and P_CL2FE_REQ_PC_LOADING_COMPLETE are supported via the shard server
This commit is contained in:
@@ -124,7 +124,7 @@ const (
|
||||
)
|
||||
|
||||
func (db *DBHandler) readPlayer(rows *sql.Rows) (*core.Player, error) {
|
||||
plr := core.Player{}
|
||||
plr := core.Player{ActiveNanoSlotNum: -1}
|
||||
|
||||
if err := rows.Scan(
|
||||
&plr.PlayerID, &plr.AccountID, &plr.Slot, &plr.PCStyle.SzFirstName, &plr.PCStyle.SzLastName,
|
||||
|
||||
@@ -34,3 +34,31 @@ type Player struct {
|
||||
Fatigue int
|
||||
CurrentMissionID int
|
||||
}
|
||||
|
||||
func (plr *Player) ToPCLoadData2CL() protocol.SPCLoadData2CL {
|
||||
return protocol.SPCLoadData2CL{
|
||||
IUserLevel: int16(plr.AccountLevel),
|
||||
PCStyle: plr.PCStyle,
|
||||
PCStyle2: plr.PCStyle2,
|
||||
IMentor: int16(plr.Mentor),
|
||||
IMentorCount: 1,
|
||||
IHP: int32(plr.HP),
|
||||
IBatteryW: int32(plr.BatteryW),
|
||||
IBatteryN: int32(plr.BatteryN),
|
||||
ICandy: int32(plr.Taros),
|
||||
IFusionMatter: int32(plr.FusionMatter),
|
||||
ISpecialState: 0,
|
||||
IMapNum: 0,
|
||||
IX: int32(plr.X),
|
||||
IY: int32(plr.Y),
|
||||
IZ: int32(plr.Z),
|
||||
IAngle: int32(plr.Angle),
|
||||
AEquip: plr.Equip,
|
||||
AInven: plr.Inven,
|
||||
ANanoSlots: [3]int16{int16(plr.EquippedNanos[0]), int16(plr.EquippedNanos[1]), int16(plr.EquippedNanos[2])},
|
||||
IActiveNanoSlotNum: int16(plr.ActiveNanoSlotNum),
|
||||
IWarpLocationFlag: int32(plr.WarpLocationFlag),
|
||||
IBuddyWarpTime: 60,
|
||||
IFatigue: 50,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,6 +87,10 @@ func (peer *CNPeer) Send(typeID uint32, data ...interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (peer *CNPeer) SetActiveKey(whichKey int) {
|
||||
peer.whichKey = whichKey
|
||||
}
|
||||
|
||||
func (peer *CNPeer) Kill() {
|
||||
if !peer.alive {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user