mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-05 06:50:04 +00:00
Rename Vendor.Xpp -> Vendors.Xpp
This commit is contained in:
parent
588e941d3c
commit
fa7c88e214
4
Makefile
4
Makefile
@ -71,7 +71,7 @@ CXXSRC=\
|
||||
src/Buddies.cpp\
|
||||
src/Groups.cpp\
|
||||
src/Racing.cpp\
|
||||
src/Vendor.cpp\
|
||||
src/Vendors.cpp\
|
||||
src/Trading.cpp\
|
||||
|
||||
# headers (for timestamp purposes)
|
||||
@ -115,7 +115,7 @@ CXXHDR=\
|
||||
src/Buddies.hpp\
|
||||
src/Groups.hpp\
|
||||
src/Racing.hpp\
|
||||
src/Vendor.hpp\
|
||||
src/Vendors.hpp\
|
||||
src/Trading.hpp\
|
||||
|
||||
COBJ=$(CSRC:.c=.o)
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "TableData.hpp"
|
||||
#include "Groups.hpp"
|
||||
#include "Racing.hpp"
|
||||
#include "Vendor.hpp"
|
||||
#include "Vendors.hpp"
|
||||
#include "Abilities.hpp"
|
||||
|
||||
#include <cmath>
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "Chunking.hpp"
|
||||
#include "Nanos.hpp"
|
||||
#include "Racing.hpp"
|
||||
#include "Vendor.hpp"
|
||||
#include "Vendors.hpp"
|
||||
#include "Abilities.hpp"
|
||||
#include "Eggs.hpp"
|
||||
|
||||
@ -708,10 +708,10 @@ void TableData::init() {
|
||||
for (nlohmann::json::iterator _lst = listings.begin(); _lst != listings.end(); _lst++) {
|
||||
auto lst = _lst.value();
|
||||
VendorListing vListing = { lst["m_iSortNumber"], lst["m_iItemType"], lst["m_iitemID"] };
|
||||
Vendor::VendorTables[lst["m_iNpcNumber"]].push_back(vListing);
|
||||
Vendors::VendorTables[lst["m_iNpcNumber"]].push_back(vListing);
|
||||
}
|
||||
|
||||
std::cout << "[INFO] Loaded " << Vendor::VendorTables.size() << " vendor tables" << std::endl;
|
||||
std::cout << "[INFO] Loaded " << Vendors::VendorTables.size() << " vendor tables" << std::endl;
|
||||
|
||||
// load crocpot entries
|
||||
nlohmann::json crocs = xdtData["m_pCombiningTable"]["m_pCombiningData"];
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "Vendor.hpp"
|
||||
#include "Vendors.hpp"
|
||||
|
||||
using namespace Vendor;
|
||||
using namespace Vendors;
|
||||
|
||||
std::map<int32_t, std::vector<VendorListing>> Vendor::VendorTables;
|
||||
std::map<int32_t, std::vector<VendorListing>> Vendors::VendorTables;
|
||||
|
||||
static void vendorBuy(CNSocket* sock, CNPacketData* data) {
|
||||
auto req = (sP_CL2FE_REQ_PC_VENDOR_ITEM_BUY*)data->buf;
|
||||
@ -198,10 +198,10 @@ static void vendorBuyback(CNSocket* sock, CNPacketData* data) {
|
||||
static void vendorTable(CNSocket* sock, CNPacketData* data) {
|
||||
auto req = (sP_CL2FE_REQ_PC_VENDOR_TABLE_UPDATE*)data->buf;
|
||||
|
||||
if (req->iVendorID != req->iNPC_ID || Vendor::VendorTables.find(req->iVendorID) == Vendor::VendorTables.end())
|
||||
if (req->iVendorID != req->iNPC_ID || Vendors::VendorTables.find(req->iVendorID) == Vendors::VendorTables.end())
|
||||
return;
|
||||
|
||||
std::vector<VendorListing> listings = Vendor::VendorTables[req->iVendorID];
|
||||
std::vector<VendorListing> listings = Vendors::VendorTables[req->iVendorID];
|
||||
|
||||
INITSTRUCT(sP_FE2CL_REP_PC_VENDOR_TABLE_UPDATE_SUCC, resp);
|
||||
|
||||
@ -360,7 +360,7 @@ static void vendorCombineItems(CNSocket* sock, CNPacketData* data) {
|
||||
sock->sendPacket(resp, P_FE2CL_REP_PC_ITEM_COMBINATION_SUCC);
|
||||
}
|
||||
|
||||
void Vendor::init() {
|
||||
void Vendors::init() {
|
||||
REGISTER_SHARD_PACKET(P_CL2FE_REQ_PC_VENDOR_START, vendorStart);
|
||||
REGISTER_SHARD_PACKET(P_CL2FE_REQ_PC_VENDOR_TABLE_UPDATE, vendorTable);
|
||||
REGISTER_SHARD_PACKET(P_CL2FE_REQ_PC_VENDOR_ITEM_BUY, vendorBuy);
|
@ -10,7 +10,7 @@ struct VendorListing {
|
||||
int sort, type, iID;
|
||||
};
|
||||
|
||||
namespace Vendor {
|
||||
namespace Vendors {
|
||||
extern std::map<int32_t, std::vector<VendorListing>> VendorTables;
|
||||
|
||||
void init();
|
@ -19,7 +19,7 @@
|
||||
#include "Racing.hpp"
|
||||
#include "Trading.hpp"
|
||||
#include "Email.hpp"
|
||||
#include "Vendor.hpp"
|
||||
#include "Vendors.hpp"
|
||||
#include "Chat.hpp"
|
||||
#include "Eggs.hpp"
|
||||
|
||||
@ -111,7 +111,7 @@ int main() {
|
||||
Missions::init();
|
||||
Nanos::init();
|
||||
NPCManager::init();
|
||||
Vendor::init();
|
||||
Vendors::init();
|
||||
Transport::init();
|
||||
Buddies::init();
|
||||
Email::init();
|
||||
|
Loading…
Reference in New Issue
Block a user