View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002207SphereServerexecutable - windows buildpublic14-09-13 07:5415-09-13 17:03
ReporterCoruja 
Assigned ToBen 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version0.56c Nightly 
Summary0002207: Wrong ARGN1 on @ItemSell (+ ARGN2 feature request)
DescriptionI dont know if it really a bug, but ARGN1 on @ItemSell is returning the item total amount, not the amount that I'm selling to the npc.
I think it's not right since ARGN1 will return a duplicated value from <ACT.AMOUNT> and there's no way to get the real item amount that I sold.

Ex: I have 50 potions and sold 10 on NPC. ARGN1 will be 50, and ACT.AMOUNT will be 50 too. I'm getting a duplicated wrong value instead the value that I want (10)


PS: Tested only on @ItemSell (on chars) using 10 sept 2013 nightly build, but probably it could be the same on others triggers like @Sell, @Buy and @ItemBuy

PS²: It would be great to have a new ARGN2 too, returning the final value paid by the npc (including vendormarkup). This will return the value paid on the total amount sold, to get the value for a single item just use <eval <ARGN2>/<ARGN1>>
Additional Informationon sphere 56b changelog:

24-09-2006, Nazghul
[...]
- Added: Item trigger @Buy and character trigger @itemBuy, which are called before item is sold
  by a vendor. The trigger is called only with EF_New_Triggers on.
  ACT/DEFAULT is the item, SRC is the player, ARGN is the item amount, ARGO is the vendor.
  Return 1 prevents the player from buying the item.
- Added: Item trigger @Sell and character trigger @itemSell, which are called before item is bought
  by a vendor. The trigger is called only with EF_New_Triggers on.
  ACT/DEFAULT is the item, SRC is the player, ARGN is the item amount, ARGO is the vendor.
  Return 1 prevents the player from selling the item.

[...]

24-10-2006, Nazghul
- Added: Trigger @(item)Buy now has local.totalcost, which holds the cost of the whole purchase
  and ARGN2, which holds price of this amount of items (price * amount).
TagsNo tags attached.
Nightly VersionAutomated (specify build number)
Experimental FlagsNone
Option FlagsNone
Internal Build Number
Attached Files

- Relationships

-  Notes
(0001681)
Ben (manager)
15-09-13 17:03

ARGN1 is fixed and added ARGN2 as the cost after vendermarkup.

- Issue History
Date Modified Username Field Change
14-09-13 07:54 Coruja New Issue
15-09-13 17:03 Ben Note Added: 0001681
15-09-13 17:03 Ben Status new => resolved
15-09-13 17:03 Ben Fixed in Version => 0.56c Nightly
15-09-13 17:03 Ben Resolution open => fixed
15-09-13 17:03 Ben Assigned To => Ben


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker