Shop Problem

Status
Not open for further replies.
Newbie Spellweaver
Joined
May 14, 2013
Messages
18
Reaction score
0
Hello,
I have added a Riot shield DX to shop, updated DB.
But when i try to buy one i have a problem:

000410.551| WO_API: failed with error code 6 bad GetPrice
000410.552| BuyItem FAILED, code: 6

I can buy everything else including stuff from WarInc..
Any ideas?
Thanks.
 
ALTER PROCEDURE [dbo].[WZ_BuyItemFN_GetPrice]
@out_FNResult int out,
@in_ItemId int,
@in_BuyDays int,
@in_Currency varchar(32),
@o_FinalPrice int out
AS
BEGIN
SET NOCOUNT ON;

--
-- get prices from table based on itemID
--
declare @Price1 int = 0
declare @Price7 int = 0
declare @Price30 int = 0
declare @PriceP int = 0
declare @GPrice1 int = 0
declare @GPrice7 int = 0
declare @GPrice30 int = 0
declare @GPriceP int = 0
declare @IsEnabled int = 1


if(@in_ItemId >= 20000 and @in_ItemId < 99999)
SELECT
@Price1=Price1, @Price7=Price7, @Price30=Price30, @PriceP=PriceP,
@GPrice1=GPrice1, @GPrice7=GPrice7, @GPrice30=GPrice30, @GPriceP=GPriceP
FROM Items_Gear where ItemID=@in_ItemID
else
if(@in_ItemId >= 100000 and @in_ItemId < 190000)
SELECT
@Price1=Price1, @Price7=Price7, @Price30=Price30, @PriceP=PriceP,
@GPrice1=GPrice1, @GPrice7=GPrice7, @GPrice30=GPrice30, @GPriceP=GPriceP
FROM Items_Weapons where ItemID=@in_ItemID
else
if(@in_ItemId >= 300000 and @in_ItemId < 390000)
SELECT
@Price1=Price1, @Price7=Price7, @Price30=Price30, @PriceP=PriceP,
@GPrice1=GPrice1, @GPrice7=GPrice7, @GPrice30=GPrice30, @GPriceP=GPriceP
FROM Items_Generic where ItemID=@in_ItemID
else
if(@in_ItemId >= 400000 and @in_ItemId < 490000)
SELECT
@Price1=Price1, @Price7=Price7, @Price30=Price30, @PriceP=PriceP,
@GPrice1=GPrice1, @GPrice7=GPrice7, @GPrice30=GPrice30, @GPriceP=GPriceP
FROM Items_Attachments where ItemID=@in_ItemID
else
begin
set @out_FNResult = 1
return
end
if (@@RowCount = 0) begin
set @out_FNResult = 2
return
end

if(@in_Currency = 'GP' and @in_BuyDays = 1) set @o_FinalPrice = @Price1
else if(@in_Currency = 'GP' and @in_BuyDays = 7) set @o_FinalPrice = @Price7
else if(@in_Currency = 'GP' and @in_BuyDays = 30) set @o_FinalPrice = @Price30
else if(@in_Currency = 'GP' and @in_BuyDays = 2000) set @o_FinalPrice = @PriceP
else if(@in_Currency = 'GD' and @in_BuyDays = 1) set @o_FinalPrice = @GPrice1
else if(@in_Currency = 'GD' and @in_BuyDays = 7) set @o_FinalPrice = @GPrice7
else if(@in_Currency = 'GD' and @in_BuyDays = 30) set @o_FinalPrice = @GPrice30
else if(@in_Currency = 'GD' and @in_BuyDays = 2000) set @o_FinalPrice = @GPriceP
else begin
set @out_FNResult = 3
return
end


-- check if listed
if(@o_FinalPrice <= 0 or @IsEnabled = 0) begin
set @out_FNResult = 4
return
end

set @out_FNResult = 0
END

Somethings not right with it? because i am able to buy other items for gc or for ingame dollars aswell..
 
Upvote 0
Yes, that's the procedure. But what I meant was to verify if everything is right with it. Check if the Riot Shield DX you added get the to the @out_FNResult = 0.
The problem might be with the Riot Shield DX row.
 
Upvote 0
<Weapon itemID="20124" category="28" upgrade="1" FNAME="Item_Riot_Shield_Crate_02" Weight="900">
<Model file="Data/ObjectsDepot/Weapons/Item_Riot_Shield_Crate_02.sco" AnimPrefix="Item_Riot_Shield_Crate_02" muzzlerOffset.x="0" muzzlerOffset.y="0" muzzlerOffset.z="0" />
<MuzzleModel file="" />
<HudIcon file="$Data/Weapons/HudIcons/Item_Riot_Shield_Crate_02.dds" />
<Store name="Riot Shield DX" icon="$Data/Weapons/StoreIcons/Item_Riot_Shield_Crate_02.dds" desc="Its a riot shield! Hide behind it for safety" LevelRequired="0" />
<PrimaryFire bullet="melee" damage="700" immediate="true" mass="10" decay="1" speed="60" area="0" delay="0" timeout="0" numShells="1" clipSize="1" reloadTime="1" activeReloadTick="0" rateOfFire="60" spread="1" recoil="1" numgrenades="0" grenadename="asr_grenade" firemode="100" ScopeType="default" ScopeZoom="0" />
<Animation type="assault" />
<Sound shoot="" reload="" />
<FPS IsFPS="1" i0="0" i1="0" i2="0" i3="0" i4="0" i5="0" i6="0" i7="0" i8="0" d0="0" d1="0" d2="0" d3="0" d4="0" d5="0" d6="0" d7="0" d8="0" />
</Weapon>
 
Upvote 0
You set the Riot Shield itemID to 20124, but that itemID is in the Gear's itemID range. Since Riot Shield is in the Items_Weapons table, you should set the Riot Shield itemID between 100000 and 189999.
 
Upvote 0
Status
Not open for further replies.
Back