Skip to content

Commit ce5c341

Browse files
committed
fix bug
1 parent 9bab9cb commit ce5c341

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

bhandler/enter_game_handler.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func (h *EnterGameHandler) GetResponse(request *common.BillingPacket) *common.Bi
4242
//
4343
h.Resource.Logger.Info("user [" + string(username) + "] " + string(charName) + " entered game")
4444
//Packets::BLRetBillingStart
45-
opData := make([]byte, 0, usernameLength+2+13)
45+
opData := make([]byte, 0, usernameLength+2+14)
4646
opData = append(opData, usernameLength)
4747
opData = append(opData, username...)
4848
opData = append(opData, 0x1)
@@ -51,7 +51,8 @@ func (h *EnterGameHandler) GetResponse(request *common.BillingPacket) *common.Bi
5151
//mLeftTime: 4u
5252
//mStorePoint: 4u
5353
//mUserPoint: 4u
54-
extraData := make([]byte, 13)
54+
//mWhyFlag: 1u
55+
extraData := make([]byte, 14)
5556
opData = append(opData, extraData...)
5657
response.OpData = opData
5758
return response

bhandler/query_point_handler.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,14 @@ func (h *QueryPointHandler) GetResponse(request *common.BillingPacket) *common.B
5151
//
5252
var accountPoint = 0
5353
if account != nil {
54-
accountPoint = (account.Point + 1) * 1000
54+
accountPoint = account.Point
5555
}
56-
h.Resource.Logger.Info(fmt.Sprintf("user [%s] %s query point (%d) at %s", username, charName, account.Point, loginIP))
56+
h.Resource.Logger.Info(fmt.Sprintf("user [%s] %s query point (%d) at %s", username, charName, accountPoint, loginIP))
5757
//Packets::BLRetAskPoint
5858
opData := make([]byte, 0, usernameLength+5)
5959
opData = append(opData, usernameLength)
6060
opData = append(opData, username...)
61+
accountPoint *= 1000
6162
for i := 0; i < 4; i++ {
6263
tmpValue := accountPoint
6364
movePos := (3 - i) * 8

0 commit comments

Comments
 (0)