Hey community! I install Ishop from Azulox, but i have problem with Pet's time. I try socket0, socket1, socket2 but nothing. Here's my function code. Can someone tell me what i do wrong?
Bitte melden Sie sich an, um diesen Link zu sehen.
Edit: I found the problem is only with Dragon Marks. Here:
Code
- if($array['item_type'] == ISHOP_DRAGON_COINS)
- {
- if($_SESSION['ISHOP_SESSION_DM'] >= $cena)
- {
- $query10 = mysql_query("SELECT type,subtype FROM ".GAME_MYSQL_PLAYER.".item_proto WHERE vnum='".$array['item_vnum']."'") or die(mysql_error());
- if($fetchI = mysql_fetch_assoc($query10))
- {
- $znamky = $array['item_marks'];
- $upp = mysql_query("UPDATE ".GAME_MYSQL_ACCOUNT.".account SET ".ISHOP_COLUMN_COINS."=".ISHOP_COLUMN_COINS."-$cena, ".ISHOP_COLUMN_MARKS."=".ISHOP_COLUMN_MARKS."+$cena WHERE id='".$_SESSION['ISHOP_SESSION_ID']."' LIMIT 1") or die(mysql_error());
- $inss = mysql_query("INSERT INTO ".ISHOP_MYSQL_DB.".buy_list_".ISHOP_TABLE_POSTFIX."(buy_dex,buy_type,buy_vnum,buy_date,buy_user_id,buy_count) VALUES('".date("Y-m-d",time())."','".$typ."','".$array['item_vnum']."','".date("d.m.Y")."', '".$_SESSION['ISHOP_SESSION_ID']."','".$pocet."')") or die(mysql_error());
- if(!empty($array['item_socket']))
- {
- $item_time = date('Y-m-d H:i:s', strtotime($array['item_time']));
- $item_time = strtotime($item_time);
- if($array['item_stackable'] == "ANO")
- {
- if($fetchI['type'] == "2" AND $fetchI['subtype'] == "0" OR $fetchI['type']=="1" and $fetchI['subtype']=="1" or $fetchI['type']=="1" and $fetchI['subtype']=="0" or $fetchI['type']=="1" and $fetchI['subtype']=="2" or $fetchI['type']=="1" and $fetchI['subtype']=="3" or $fetchI['type']=="1" and $fetchI['subtype']=="4" or $fetchI['type']=="1" and $fetchI['subtype']=="5")
- {
- $ins = mysql_query("INSERT INTO ".GAME_MYSQL_PLAYER.".item(socket0,socket1,socket2,pos,owner_id,vnum,count,window) VALUES('1','1','1','".$possiblePos[0]."','".$_SESSION['ISHOP_SESSION_ID']."', '".$array['item_vnum']."', '".$pocet."', 'MALL')") or die(mysql_error());
- }
- else
- {
- $ins = mysql_query("INSERT INTO ".GAME_MYSQL_PLAYER.".item(".$array['item_socket'].",pos,owner_id,vnum,count,window) VALUES('".$item_time."','".$possiblePos[0]."','".$_SESSION['ISHOP_SESSION_ID']."', '".$array['item_vnum']."', '".$pocet."', 'MALL')") or die(mysql_error());
- }
- }
- else
- {
- for($i=1;$i<=$pocet;$i++)
- {
- if($fetchI['type'] == "2" AND $fetchI['subtype'] == "0" OR $fetchI['type']=="1" and $fetchI['subtype']=="1" or $fetchI['type']=="1" and $fetchI['subtype']=="0" or $fetchI['type']=="1" and $fetchI['subtype']=="2" or $fetchI['type']=="1" and $fetchI['subtype']=="3" or $fetchI['type']=="1" and $fetchI['subtype']=="4" or $fetchI['type']=="1" and $fetchI['subtype']=="5")
- {
- $ins = mysql_query("INSERT INTO ".GAME_MYSQL_PLAYER.".item(socket0,socket1,socket2,pos,owner_id,vnum,count,window) VALUES('1','1','1','".$possiblePos[$i-1]."','".$_SESSION['ISHOP_SESSION_ID']."', '".$array['item_vnum']."', '1', 'MALL')") or die(mysql_error());
- }
- else
- {
- $ins = mysql_query("INSERT INTO ".GAME_MYSQL_PLAYER.".item(".$array['item_socket'].",pos,owner_id,vnum,count,window) VALUES('".$item_time."','".$possiblePos[$i-1]."','".$_SESSION['ISHOP_SESSION_ID']."', '".$array['item_vnum']."', '1', 'MALL')") or die(mysql_error());
- }
- }
- }
- }
- else
- {
- if($array['item_stackable'] == "ANO")
- {
- if($fetchI['type'] == "2" AND $fetchI['subtype'] == "0" OR $fetchI['type']=="1" and $fetchI['subtype']=="1" or $fetchI['type']=="1" and $fetchI['subtype']=="0" or $fetchI['type']=="1" and $fetchI['subtype']=="2" or $fetchI['type']=="1" and $fetchI['subtype']=="3" or $fetchI['type']=="1" and $fetchI['subtype']=="4" or $fetchI['type']=="1" and $fetchI['subtype']=="5")
- {
- $ins = mysql_query("INSERT INTO ".GAME_MYSQL_PLAYER.".item(socket0,socket1,socket2,pos,owner_id,vnum,count,window) VALUES('1','1','1','".$possiblePos[0]."','".$_SESSION['ISHOP_SESSION_ID']."', '".$array['item_vnum']."', '1', 'MALL')") or die(mysql_error());
- }
- else
- {
- $ins = mysql_query("INSERT INTO ".GAME_MYSQL_PLAYER.".item(pos,owner_id,vnum,count,window) VALUES('".$possiblePos[0]."','".$_SESSION['ISHOP_SESSION_ID']."', '".$array['item_vnum']."', '".$pocet."', 'MALL')") or die(mysql_error());
- }
- }
- else
- {
- for($i=1;$i<=$pocet;$i++)
- {
- if($fetchI['type'] == "2" AND $fetchI['subtype'] == "0" OR $fetchI['type']=="1" and $fetchI['subtype']=="1" or $fetchI['type']=="1" and $fetchI['subtype']=="0" or $fetchI['type']=="1" and $fetchI['subtype']=="2" or $fetchI['type']=="1" and $fetchI['subtype']=="3" or $fetchI['type']=="1" and $fetchI['subtype']=="4" or $fetchI['type']=="1" and $fetchI['subtype']=="5")
- {
- $ins = mysql_query("INSERT INTO ".GAME_MYSQL_PLAYER.".item(socket0,socket1,socket2,pos,owner_id,vnum,count,window) VALUES('1','1','1','".$possiblePos[$i-1]."','".$_SESSION['ISHOP_SESSION_ID']."', '".$array['item_vnum']."', '1', 'MALL')") or die(mysql_error());
- }
- else
- {
- $ins = mysql_query("INSERT INTO ".GAME_MYSQL_PLAYER.".item(pos,owner_id,vnum,count,window) VALUES('".$possiblePos[$i-1]."','".$_SESSION['ISHOP_SESSION_ID']."', '".$array['item_vnum']."', '1', 'MALL')") or die(mysql_error());
- }
- }
- }
- }
- }
- ?>