Sziasztok a téma adott.
http://data.hu/get/9436276/Offline_Shop.7z
Offline_shop-ban exe oldalon ne felejtsétek el definiálni a makrót. (locale_inc.h)
Így definiáljátok a makrót locale_inc.h-ban:
#define ENABLE_OFFLINE_SHOP_SYSTEM
Pár fontosabb fix:
Normális sql querry:
/*
Navicat MySQL Data Transfer
Source Server : T.Server
Source Server Version : 50543
Source Host : 188.212.100.109:3306
Source Database : player
Target Server Type : MYSQL
Target Server Version : 50543
File Encoding : 65001
Date: 2015-10-17 18:04:00
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `offline_shop_item`
-- ----------------------------
DROP TABLE IF EXISTS `offline_shop_item`;
CREATE TABLE `offline_shop_item` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`owner_id` int(11) unsigned NOT NULL DEFAULT '0',
`pos` smallint(5) unsigned NOT NULL DEFAULT '0',
`count` tinyint(3) unsigned NOT NULL DEFAULT '0',
`vnum` int(11) unsigned NOT NULL DEFAULT '0',
`socket0` int(10) unsigned NOT NULL DEFAULT '0',
`socket1` int(10) unsigned NOT NULL DEFAULT '0',
`socket2` int(10) unsigned NOT NULL DEFAULT '0',
`socket3` int(10) unsigned NOT NULL DEFAULT '0',
`socket4` int(10) unsigned NOT NULL DEFAULT '0',
`socket5` int(10) unsigned NOT NULL DEFAULT '0',
`attrtype0` tinyint(4) NOT NULL DEFAULT '0',
`attrvalue0` smallint(6) NOT NULL DEFAULT '0',
`attrtype1` tinyint(4) NOT NULL DEFAULT '0',
`attrvalue1` smallint(6) NOT NULL DEFAULT '0',
`attrtype2` tinyint(4) NOT NULL DEFAULT '0',
`attrvalue2` smallint(6) NOT NULL DEFAULT '0',
`attrtype3` tinyint(4) NOT NULL DEFAULT '0',
`attrvalue3` smallint(6) NOT NULL DEFAULT '0',
`attrtype4` tinyint(4) NOT NULL DEFAULT '0',
`attrvalue4` smallint(6) NOT NULL DEFAULT '0',
`attrtype5` tinyint(4) NOT NULL DEFAULT '0',
`attrvalue5` smallint(6) NOT NULL DEFAULT '0',
`attrtype6` tinyint(4) NOT NULL DEFAULT '0',
`attrvalue6` smallint(6) NOT NULL DEFAULT '0',
`applytype0` tinyint(4) NOT NULL DEFAULT '0',
`applyvalue0` smallint(6) NOT NULL DEFAULT '0',
`applytype1` tinyint(4) NOT NULL DEFAULT '0',
`applyvalue1` smallint(6) NOT NULL DEFAULT '0',
`applytype2` tinyint(4) NOT NULL DEFAULT '0',
`applyvalue2` smallint(6) NOT NULL DEFAULT '0',
`applytype3` int(11) NOT NULL DEFAULT '0',
`applyvalue3` int(11) NOT NULL DEFAULT '0',
`applytype4` int(11) NOT NULL DEFAULT '0',
`applyvalue4` int(11) NOT NULL DEFAULT '0',
`applytype5` int(11) NOT NULL DEFAULT '0',
`applyvalue5` int(11) NOT NULL DEFAULT '0',
`applytype6` int(11) NOT NULL DEFAULT '0',
`applyvalue6` int(11) NOT NULL DEFAULT '0',
`applytype7` int(11) NOT NULL DEFAULT '0',
`applyvalue7` int(11) NOT NULL DEFAULT '0',
`price` int(11) NOT NULL DEFAULT '0',
`status` smallint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `owner_id_idx` (`owner_id`),
KEY `item_vnum_index` (`vnum`)
) ENGINE=MyISAM AUTO_INCREMENT=10002684 DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci;
-- ----------------------------
-- Records of offline_shop_item
-- ----------------------------
-- ----------------------------
-- Table structure for `offline_shop_npc`
-- ----------------------------
CREATE TABLE `offline_shop_npc` (
`owner_id` int(11) NOT NULL DEFAULT '0',
`sign` varchar(32) DEFAULT NULL,
`name` varchar(32) DEFAULT NULL,
`time` int(11) DEFAULT NULL,
`x` int(11) DEFAULT NULL,
`y` int(11) DEFAULT NULL,
`z` int(11) DEFAULT NULL,
`mapIndex` int(11) DEFAULT NULL,
`channel` int(2) DEFAULT NULL,
PRIMARY KEY (`owner_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
-- ----------------------------
-- Records of offline_shop_npc
-- ----------------------------
Bónusz fix:
OFFLINE_SHOP_CONFIG-ban ezt:
OFFLINE_SHOP_SOCKET_MAX: 4
cseréljétek le erre:
OFFLINE_SHOP_SOCKET_MAX: 3
Árváltoztatás:
input_main.cpp:
Keressétek meg ezt:
case SHOP_SUBHEADER_CG_CHANGE_PRICE:
{
if (uiBytes < sizeof(TOfflineShopItemTable))
return -1;
TOfflineShopItemTable * pTable = (TOfflineShopItemTable *)(c_pData);
sys_log(0, "INPUT: %s OFFLINE_CHANGE_PRICE (%d)", ch->GetName(), pTable->bPos);
COfflineShopManager::instance().ChangePrice(ch, pTable->bPos, pTable->lPrice);
return (sizeof(TOfflineShopItemTable));
}
cseréljétek le erre:
case SHOP_SUBHEADER_CG_CHANGE_PRICE:
{
if (uiBytes < sizeof(TOfflineShopItemTable))
return -1;
TOfflineShopItemTable * pTable = (TOfflineShopItemTable *)(c_pData);
sys_log(0, "INPUT: %s OFFLINE_CHANGE_PRICE (%d) (%d) (%lld)", ch->GetName(), pTable->bDisplayPos, pTable->bPos, pTable->lPrice);
COfflineShopManager::instance().ChangePrice(ch, pTable->bDisplayPos, pTable->lPrice);
return (sizeof(TOfflineShopItemTable));
}