mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-04 22:40:05 +00:00
Possibly fixed item duping via trading
This commit is contained in:
parent
da8dde9818
commit
f7c84c62ed
@ -530,7 +530,9 @@ bool ItemManager::doTrade(Player* plr, Player* plr2) {
|
||||
for (int i = 0; i < 5; i++) {
|
||||
// remove items offered by us
|
||||
if (plr->Trade[i].iID != 0) {
|
||||
if (plrInven[plr->Trade[i].iInvenNum].iID == 0) // pulling a fast one on us
|
||||
if (plrInven[plr->Trade[i].iInvenNum].iID == 0
|
||||
|| plr->Trade[i].iID != plrInven[plr->Trade[i].iInvenNum].iID
|
||||
|| plr->Trade[i].iType != plrInven[plr->Trade[i].iInvenNum].iType) // pulling a fast one on us
|
||||
return false;
|
||||
|
||||
if (plr->Trade[i].iOpt < 1) {
|
||||
@ -551,7 +553,9 @@ bool ItemManager::doTrade(Player* plr, Player* plr2) {
|
||||
}
|
||||
|
||||
if (plr2->Trade[i].iID != 0) {
|
||||
if (plr2Inven[plr2->Trade[i].iInvenNum].iID == 0) // pulling a fast one on us
|
||||
if (plr2Inven[plr2->Trade[i].iInvenNum].iID == 0
|
||||
|| plr2->Trade[i].iID != plr2Inven[plr2->Trade[i].iInvenNum].iID
|
||||
|| plr2->Trade[i].iType != plr2Inven[plr2->Trade[i].iInvenNum].iType) // pulling a fast one on us
|
||||
return false;
|
||||
|
||||
if (plr2->Trade[i].iOpt < 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user