If you are not using a custom FrontEnd you can get away with using this Published version with only the below changes made. > Fixed FrontEnd Link Click Here<
public function eventBuyQtyCallback (state:Boolean, text:String=""):void
{
if (state)
{
var q:uint = uint(text);
if(q>0)
FrontEndEvents.eventBuyItem (BuyItemID, BuyGamePoints, BuyGameDollar, q);
}
}
Open src\Frontend.fla and Publish.
-------- Stage 2 Editing the API
Spoiler:
Open server\src\Scripts\WZBackend-ASP.NET\WZBackend-ASP.NET.sln
The files you will need open are: api_ClanMgr.aspx.cs, api_ClanCreate.aspx.cs, api_CharSlots.aspx.cs, api_BuyItem3.aspx.cs
mStore_BuyQuantity = args[3].GetInt(); // new quantity code
mStore_BuyPrice *= mStore_BuyQuantity; // make price take into account the new quantity!
mStore_BuyPriceGD *= mStore_BuyQuantity; // make price take into account the new quantity!
Find (unsigned int WINAPI FrontendWarZ::as_BuyItemThread(void* in_data))
Spoiler:
int apiCode = gUserProfile.ApiBuyItem(This->mStore_BuyItemID, buyIdx, &This->m_inventoryID);
Replace With
Spoiler:
int apiCode = gUserProfile.ApiBuyItem(This->mStore_BuyItemID, buyIdx, &This->m_inventoryID, This->mStore_BuyQuantity);
Find
Spoiler:
int quantityToAdd = storecat_GetItemBuyStackSize(mStore_BuyItemID);
Replace With
Spoiler:
int quantityToAdd = storecat_GetItemBuyStackSize(mStore_BuyItemID) * mStore_BuyQuantity;
Open UserProfile.cpp
Find
Spoiler:
int CClientUserProfile::ApiBuyItem(int itemId, int buyIdx, __int64* out_InventoryID)
Replace With
Spoiler:
int CClientUserProfile::ApiBuyItem(int itemId, int buyIdx, __int64* out_InventoryID, int qty)
Within (ApiBuyItem)
Find
Spoiler:
req.AddParam("BuyIdx", buyIdx);
Add Below
Spoiler:
req.AddParam("Qty", qty);
Open UserProfile.h
Find
Spoiler:
int ApiBuyItem(int itemId, int buyIdx, __int64* out_InventoryID);
Replace
Spoiler:
int ApiBuyItem(int itemId, int buyIdx, __int64* out_InventoryID, int qty);
Server
Spoiler:
Open AsyncFuncs.cpp
Find
Spoiler:
req.AddParam("BuyIdx", BuyIdx);
Add Below
Spoiler:
req.AddParam("Qty", 1);
This will fix ingame store. As it does not yet have support for qty purchases will default to 1 / 1 stack.
--------
* Confirmed Working *
Please post any errors you receive on this thread and will gladly fix these for you.
Hope it all works regardless or atleast helps you make progress getting this system running.
<3 Hit that Likes button
Special Thanks @erickstyle for posting a fix and the community for feeding back bugs.
13-12-15
Sylvanas1234
Re: Buy Item Quantity From Marketplace
Cheers big ears! <3
13-12-15
GetRektBambi
Re: Buy Item Quantity From Marketplace
All updated. Awaiting feedback of working state.
13-12-15
beastgameer
Re: Buy Item Quantity From Marketplace
i can not find the other things under frontendevents :L
13-12-15
erickstyle
Re: Buy Item Quantity From Marketplace
i have this error
Code:
1>.\Sources\UI\FrontEndWarZ.cpp(2820) : error C2664: 'CClientUserProfile::ApiBuyItem' : cannot convert parameter 4 from 'int *' to 'int'
1> There is no context in which this conversion is possible
i dont find : private var transactionsData:Array = null; ....
13-12-15
GetRektBambi
Re: Buy Item Quantity From Marketplace
Quote:
Originally Posted by beastgameer
i can not find the other things under frontendevents :L
Open src\classes\warz\FrontEnd\MarketPlace.as
sorry was inside for the rest.
Quote:
Originally Posted by erickstyle
i have this error
Code:
1>.\Sources\UI\FrontEndWarZ.cpp(2820) : error C2664: 'CClientUserProfile::ApiBuyItem' : cannot convert parameter 4 from 'int *' to 'int'
1> There is no context in which this conversion is possible
will take a look when I get home, just doing some shopping.
13-12-15
Oosmar02
Re: Buy Item Quantity From Marketplace
And public function ActionFunction (button:String) not find :c
13-12-15
Nikita505
Re: Buy Item Quantity From Marketplace
thx for sharing, and
sir, can u clear PM? :):
13-12-15
erickstyle
Re: Buy Item Quantity From Marketplace
i remove the "$"
int apiCode = gUserProfile.ApiBuyItem(This->mStore_BuyItemID, buyIdx, &This->m_inventoryID, This->mStore_BuyQuantity);
and compile ok.. i will continue
13-12-15
GetRektBambi
Re: Buy Item Quantity From Marketplace
Quote:
Originally Posted by Oosmar02
And public function ActionFunction (button:String) not find :c
Open src\classes\warz\FrontEnd\MarketPlace......as
sorry was inside for the rest.
Quote:
Originally Posted by Nikita505
thx for sharing, and
sir, can u clear PM? :):
Np and cleared.
13-12-15
LukeFire
Re: Buy Item Quantity From Marketplace
Quote:
Originally Posted by erickstyle
i have this error
Code:
1>.\Sources\UI\FrontEndWarZ.cpp(2820) : error C2664: 'CClientUserProfile::ApiBuyItem' : cannot convert parameter 4 from 'int *' to 'int'
1> There is no context in which this conversion is possible