Conversation
Codecov Report
@@ Coverage Diff @@
## master #1476 +/- ##
==========================================
+ Coverage 35.43% 36.01% +0.58%
==========================================
Files 240 244 +4
Lines 7372 7449 +77
Branches 561 568 +7
==========================================
+ Hits 2612 2683 +71
- Misses 4646 4652 +6
Partials 114 114
Continue to review full report at Codecov.
|
|
|
||
| InventoryItemInstance? RemoveItemAmountFromInventory(short amount, Guid id); | ||
|
|
||
| List<InventoryItemInstance?> RemoveItemAmountFromInventory(short amount, short vnum); |
There was a problem hiding this comment.
You don’t need that if you have the load by vnum and amount
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| // GNU General Public License for more details. | ||
| // | ||
| // |
There was a problem hiding this comment.
All those comment change make it harder to review
| return retItem; | ||
| } | ||
|
|
||
| public List<InventoryItemInstance?> LoadByVNumAndAmount(short vnum, short amount) |
There was a problem hiding this comment.
Wonder if we need the amount getting all the item for a vnum is perfectly fine
| amount -= item.ItemInstance!.Amount; | ||
| if (amount <= 0) | ||
| { | ||
| break; |
|
|
||
| public List<InventoryItemInstance?> RemoveItemAmountFromInventory(short amount, short vnum) | ||
| { | ||
| var result = new List<InventoryItemInstance?>(); |
| case EquipmentType.SecondaryWeapon: | ||
| wearable.SetRarityPoint(); | ||
| break; | ||
|
|
There was a problem hiding this comment.
Seems like all those thing would be better in the item creation service not sure why I put it here. Can be moved to replace the other thing using polymorphism over switch will be better
| var targetSlot = session.Character.InventoryService.LoadBySlotAndType((byte)upgradePacket.Slot2, (NoscorePocketType)upgradePacket.InventoryType); | ||
|
|
||
| await session.SendPacketsAsync(await _sumUpgradeService.SumItemInstanceAsync(session, sourceSlot, targetSlot)); | ||
| break; |
|
|
||
| //TODO RemoveItemAmountFromInventory | ||
| [TestMethod] | ||
| public void RemoveItemAmountFromInventoryByGuidWithoutRemove() |
| Assert.IsTrue((destinationItem?.ItemInstance?.Amount == 999) && (destinationItem.Slot == 1)); | ||
| } | ||
|
|
||
| //TODO RemoveItemAmountFromInventory |
There was a problem hiding this comment.
You remove todo but it was here for the other one not for yours 😂 still need to be tested. Moreover yours will disapear for the load one
| } | ||
|
|
||
| [TestMethod] | ||
| public async Task Test_UpgradePacketSum1Async() |
There was a problem hiding this comment.
Need to test glove with boots, sum > 6, sum of different resistance
|
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #1476 +/- ##
==========================================
+ Coverage 35.43% 36.01% +0.58%
==========================================
Files 240 244 +4
Lines 7372 7449 +77
Branches 561 568 +7
==========================================
+ Hits 2612 2683 +71
- Misses 4646 4652 +6
Partials 114 114 ☔ View full report in Codecov by Sentry. |
No description provided.