fix trade package
This commit is contained in:
parent
0c37453971
commit
fa47af5ffe
@ -21,9 +21,9 @@ const (
|
||||
|
||||
// Trade slot configuration
|
||||
const (
|
||||
TradeMaxSlotsDefault = 12 // Default max slots for newer clients
|
||||
TradeMaxSlotsLegacy = 6 // Max slots for older clients (version <= 561)
|
||||
TradeSlotAutoFind = 255 // Automatically find next free slot
|
||||
TradeMaxSlotsDefault = 12 // Default max slots for newer clients
|
||||
TradeMaxSlotsLegacy = 6 // Max slots for older clients (version <= 561)
|
||||
TradeSlotAutoFind = -1 // Automatically find next free slot
|
||||
)
|
||||
|
||||
// Coin conversion constants (from C++ CalculateCoins)
|
||||
|
1394
internal/trade/trade_test.go
Normal file
1394
internal/trade/trade_test.go
Normal file
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,7 @@ import (
|
||||
// TradeItemInfo represents an item in a trade slot
|
||||
// Converted from C++ TradeItemInfo struct
|
||||
type TradeItemInfo struct {
|
||||
Item *Item // TODO: Replace with actual Item type when available
|
||||
Item Item // TODO: Replace with actual Item type when available
|
||||
Quantity int32 // Quantity of the item being traded
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ func (tp *TradeParticipant) GetNextFreeSlot() int8 {
|
||||
return slot
|
||||
}
|
||||
}
|
||||
return TradeSlotAutoFind // No free slots available
|
||||
return int8(TradeSlotAutoFind) // No free slots available
|
||||
}
|
||||
|
||||
// HasItem checks if participant has a specific item in trade
|
||||
|
Loading…
x
Reference in New Issue
Block a user