fix trade package
This commit is contained in:
parent
0c37453971
commit
fa47af5ffe
@ -23,7 +23,7 @@ const (
|
|||||||
const (
|
const (
|
||||||
TradeMaxSlotsDefault = 12 // Default max slots for newer clients
|
TradeMaxSlotsDefault = 12 // Default max slots for newer clients
|
||||||
TradeMaxSlotsLegacy = 6 // Max slots for older clients (version <= 561)
|
TradeMaxSlotsLegacy = 6 // Max slots for older clients (version <= 561)
|
||||||
TradeSlotAutoFind = 255 // Automatically find next free slot
|
TradeSlotAutoFind = -1 // Automatically find next free slot
|
||||||
)
|
)
|
||||||
|
|
||||||
// Coin conversion constants (from C++ CalculateCoins)
|
// 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
|
// TradeItemInfo represents an item in a trade slot
|
||||||
// Converted from C++ TradeItemInfo struct
|
// Converted from C++ TradeItemInfo struct
|
||||||
type 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
|
Quantity int32 // Quantity of the item being traded
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ func (tp *TradeParticipant) GetNextFreeSlot() int8 {
|
|||||||
return slot
|
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
|
// HasItem checks if participant has a specific item in trade
|
||||||
|
Loading…
x
Reference in New Issue
Block a user