Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (Extract Code by HYZ - Chillax GOD)
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- WARZ.sln
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- AI_Player.cpp
- Find
- void obj_Player::ReloadWeaponFromSlot(int wpnSlot, int ammoSlot, int amount)
- Place
- void obj_Player::OpenChangeNameBox(int wpnSlot) //HYZ:NameColorBox
- {
- r3d_assert(NetworkLocal);
- wiInventoryItem& bckItm = CurLoadout.Items[wpnSlot];
- PKT_C2S_OpenNameColorBox_s n;
- n.ItemSlot = wpnSlot;
- n.ItemCfg = bckItm;
- p2pSendToHost(this, &n, sizeof(n));
- return;
- }
- ------------------------------------------------------------------------------------------
- AI_Player.h
- ------------------------------------------------------------------------------------------
- Find
- // hit marker
- Place
- void OpenChangeNameBox(int wid); //HYZ:NameColorBox
- ------------------------------------------------------------------------------------------
- BaseItemConfig.cpp
- ------------------------------------------------------------------------------------------
- Find
- bool BaseItemConfig::loadBaseFromXml(pugi::xml_node& xmlItem)
- Place
- m_ChangeNameColor = xmlItem.child("NameColorData").attribute("color").as_int(); //HYZ:NameColorBox
- ------------------------------------------------------------------------------------------
- BaseItemConfig.h
- ------------------------------------------------------------------------------------------
- Find
- float m_Weight;
- Place
- int m_ChangeNameColor; //HYZ:NameColorBox
- Find
- BaseItemConfig(uint32_t id)
- Place
- m_ChangeNameColor = 0; //HYZ:NameColorBox
- ------------------------------------------------------------------------------------------
- WeaponArmory.cpp
- ------------------------------------------------------------------------------------------
- Find
- const ModelItemConfig* WeaponArmory::getAccountItemConfig(uint32_t itemID)
- Find In funtion
- if(m_itemsHash.GetObject(itemID, &item))
- Replace
- if(item->category >= storecat_Account && item->category <= storecat_LootBox || item->category == storecat_ChangeNameColor) //HYZ:NameColorBox
- return (ModelItemConfig*)item;
- ------------------------------------------------------------------------------------------
- UserProfile.cpp
- ------------------------------------------------------------------------------------------
- Find
- case storecat_CraftRecipe:
- Place
- case storecat_ChangeNameColor: //HYZ:NameColorBox
- ------------------------------------------------------------------------------------------
- UserProfile.h
- ------------------------------------------------------------------------------------------
- Find
- storecat_Water = 33, // water
- Place
- storecat_ChangeNameColor = 36, //HYZ:NameColorBox
- ------------------------------------------------------------------------------------------
- FrontEndShared.cpp
- ------------------------------------------------------------------------------------------
- Find
- const size_t foodSize = allFood.size();
- Place
- const size_t itemSize = allItem.size();
- for(size_t i = 0; i < itemSize; ++i)
- {
- const ModelItemConfig* gear = allItem[i];
- if (gear->category == storecat_ChangeNameColor) //HYZ:NameColorBox
- {
- var[0].SetUInt(gear->m_itemID);
- var[1].SetNumber(gear->category);
- var[2].SetString(gear->m_StoreName);
- var[3].SetString(gear->m_Description);
- var[4].SetString(gear->m_StoreIcon);
- gfxMovie.Invoke("_root.api.addItem", var, 5);
- }
- var[0].SetUInt(gear->m_itemID);
- var[1].SetNumber(gear->category);
- var[2].SetString(gear->m_StoreName);
- var[3].SetString(gear->m_Description);
- var[4].SetString(gear->m_StoreIcon);
- var[5].SetBoolean(false); // is stackable
- var[6].SetNumber(gear->m_Weight);
- gfxMovie.Invoke("_root.api.addItem", var, 7);
- }
- Find
- var[0].SetNumber(storecat_HeroPackage);
- Place
- var[0].SetNumber(storecat_ChangeNameColor);
- var[1].SetString("storecat_ChangeNameColor");
- var[2].SetNumber(9);
- var[3].SetNumber(-1);
- gfxMovie.Invoke("_root.api.addCategory", var, 4); //HYZ:NameColorBox
- ------------------------------------------------------------------------------------------
- HUDPause.cpp
- ------------------------------------------------------------------------------------------
- Find
- if(itm->m_itemID!=WeaponConfig::ITEMID_Binoculars && itm->m_itemID!=WeaponConfig::ITEMID_RangeFinder
- && itm->m_itemID!=WeaponConfig::ITEMID_RepairKit && itm->m_itemID!=WeaponConfig::ITEMID_PremRepairKit
- Place
- && itm->category != storecat_ChangeNameColor //HYZ:NameColorBox
- Find
- // check if player has repair kits, if yes, show repair context menu
- Place above
- if (itm->category == storecat_ChangeNameColor)
- {
- var[0].SetString("$FR_OPEN_CASE"); //HYZ:NameColorBox
- var[1].SetInt(HPA_OPEN_CASEZ);
- gfxMovie.Invoke("_root.api.Main.Inventory.addContextMenuOption", var, 2);
- }
- Find
- if(actionID == HPA_UNLOAD_WEAPON_CLIP)
- Place
- else if (actionID == HPA_OPEN_CASEZ)
- {
- wiInventoryItem& wi = plr->CurLoadout.Items[slotID];
- const BaseItemConfig* item = g_pWeaponArmory->getConfig(wi.itemID);
- if (item) //HYZ:NameColorBox
- {
- if (item->category == storecat_ChangeNameColor)
- {
- plr->OpenChangeNameBox(slotID);
- }
- }
- updateSurvivorTotalWeight();
- gfxMovie.Invoke("_root.api.backpackGridSwapSuccess", "");
- }
- ------------------------------------------------------------------------------------------
- P2PMessages.h
- ------------------------------------------------------------------------------------------
- Find
- PKT_LAST_PACKET_ID
- Place
- PKT_C2S_OpenNameColorBox, //HYZ:NameColorBox
- Find
- struct PKT_C2S_ValidateConnectingPeer_s : public DefaultPacketMixin<PKT_C2S_ValidateConnectingPeer>
- {
- DWORD protocolVersion;
- // must be set by client to correctly connect to game server
- __int64 sessionId;
- DWORD crcgame;
- };
- Place
- struct PKT_C2S_OpenNameColorBox_s : public DefaultPacketMixin<PKT_C2S_OpenNameColorBox> //HYZ:NamecolorBox
- {
- wiInventoryItem ItemCfg;
- BYTE ItemSlot;
- };
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- WARZ_SERVER.sln
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- obj_ServerPlayer.cpp
- ------------------------------------------------------------------------------------------
- Find
- DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_C2S_CraftItem);
- Place
- DEFINE_GAMEOBJ_PACKET_HANDLER(PKT_C2S_OpenNameColorBox); //HYZ:NameColorBox
- Find
- int obj_ServerPlayer::GetVehicleType()
- Place
- void obj_ServerPlayer::OnNetPacket(const PKT_C2S_OpenNameColorBox_s& n) //HYZ:NameColorBox
- {
- if (n.ItemSlot >= loadout_->BackpackSize) {
- gServerLogic.LogCheat(peerId_, PKT_S2C_CheatWarning_s::CHEAT_Protocol, true, "PKT_C2S_OpenNameColorBox_s",
- "slot: %d", n.ItemSlot);
- return;
- }
- wiInventoryItem& wi = loadout_->Items[n.ItemSlot];
- uint32_t usedItemId = wi.itemID;
- const BaseItemConfig* itemCfg = g_pWeaponArmory->getConfig(wi.itemID);
- if (itemCfg->category != storecat_ChangeNameColor)
- {
- gServerLogic.LogCheat(peerId_, PKT_S2C_CheatWarning_s::CHEAT_Protocol, true, "PKT_C2S_OpenNameColorBox_s",
- "itemid: %d", wi.itemID);
- return;
- }
- if (wi.quantity <= 0) {
- gServerLogic.LogCheat(peerId_, PKT_S2C_CheatWarning_s::CHEAT_UseItem, true, "PKT_C2S_OpenNameColorBox_s",
- "%d", wi.quantity);
- return;
- }
- {
- PKT_S2C_PlayerNameJoined_s n2;
- n2.playerIdx = (WORD)(GetNetworkID() - NETID_PLAYERS_START);
- r3dscpy(n2.gamertag, userName);
- n2.reputation = loadout_->Stats.Reputation;
- n2.ClanID = loadout_->ClanID;
- n2.flags = 0;
- n2.GlowColor = loadout_->GlowName = itemCfg->m_ChangeNameColor;
- if(profile_.ProfileData.AccountType == 0) // legend
- n2.flags |= 1;
- if(profile_.ProfileData.isDevAccount & wiUserProfile::DAA_DEV_ICON)
- n2.flags |= 2;
- if(profile_.ProfileData.AccountType == 54) // punisher
- n2.flags |= 4;
- if(profile_.ProfileData.PremiumAcc > 0)
- n2.flags |= 8;
- gServerLogic.p2pBroadcastToAll(&n2, sizeof(n2), true);
- }
- // remove used item
- AdjustBackpackSlotQuantity(n.ItemSlot, -1);
- gServerLogic.ApiPlayerUpdateChar(this);
- // unlock player backpack, op is complete.
- PKT_S2C_BackpackUnlock_s n3;
- gServerLogic.p2pSendToPeer(peerId_, this, &n3, sizeof(n3));
- }
- Find
- Place
- ------------------------------------------------------------------------------------------
- obj_ServerPlayer.h
- ------------------------------------------------------------------------------------------
- Find
- void OnNetPacket(const PKT_C2S_CraftItem_s& n);
- Place
- void OnNetPacket(const PKT_C2S_OpenNameColorBox_s& n); //HYZ:NameColorBox
- ------------------------------------------------------------------------------------------
- AsyncFuncs.cpp
- ------------------------------------------------------------------------------------------
- Find
- req.AddParam("r3", ResMetal);
- Place
- req.AddParam("n23", NameColor); //HYZ:NameColorBox
- ------------------------------------------------------------------------------------------
- AsyncFuncs.h
- ------------------------------------------------------------------------------------------
- Find
- int ResMetal;
- Place
- int NameColor; //HYZ:NameColorBox
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- ItemsDB.xml
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- <Item itemID="501400" category="36" Weight="0">
- <NameColorData color="1"/>
- <Model file="Data/ObjectsDepot/REF_CaseBox/Loot_Drop_Moonnight.sco" />
- <Store name="Char_NameColor_Purple" icon="$Data/Weapons/StoreIcons/Color1.dds" desc="" LevelRequired="0" />
- </Item>
- <Item itemID="501401" category="36" Weight="0">
- <NameColorData color="2"/>
- <Model file="Data/ObjectsDepot/REF_CaseBox/Loot_Drop_Moonnight.sco" />
- <Store name="Char_NameColor_SkyBlue" icon="$Data/Weapons/StoreIcons/Color2.dds" desc="" LevelRequired="0" />
- </Item>
- <Item itemID="501402" category="36" Weight="0">
- <NameColorData color="3"/>
- <Model file="Data/ObjectsDepot/REF_CaseBox/Loot_Drop_Moonnight.sco" />
- <Store name="Char_NameColor_Blue" icon="$Data/Weapons/StoreIcons/Color3.dds" desc="" LevelRequired="0" />
- </Item>
- <Item itemID="501403" category="36" Weight="0">
- <NameColorData color="4"/>
- <Model file="Data/ObjectsDepot/REF_CaseBox/Loot_Drop_Moonnight.sco" />
- <Store name="Char_NameColor_GreenLight" icon="$Data/Weapons/StoreIcons/Color4.dds" desc="" LevelRequired="0" />
- </Item>
- <Item itemID="501404" category="36" Weight="0">
- <NameColorData color="5"/>
- <Model file="Data/ObjectsDepot/REF_CaseBox/Loot_Drop_Moonnight.sco" />
- <Store name="Char_NameColor_Yellow" icon="$Data/Weapons/StoreIcons/Color5.dds" desc="" LevelRequired="0" />
- </Item>
- <Item itemID="501405" category="36" Weight="0">
- <NameColorData color="6"/>
- <Model file="Data/ObjectsDepot/REF_CaseBox/Loot_Drop_Moonnight.sco" />
- <Store name="Char_NameColor_Orenge" icon="$Data/Weapons/StoreIcons/Color6.dds" desc="" LevelRequired="0" />
- </Item>
- <Item itemID="501406" category="36" Weight="0">
- <NameColorData color="7"/>
- <Model file="Data/ObjectsDepot/REF_CaseBox/Loot_Drop_Moonnight.sco" />
- <Store name="Char_NameColor_Red" icon="$Data/Weapons/StoreIcons/Color7.dds" desc="" LevelRequired="0" />
- </Item>
- <Item itemID="501407" category="36" Weight="0">
- <NameColorData color="8"/>
- <Model file="Data/ObjectsDepot/REF_CaseBox/Loot_Drop_Moonnight.sco" />
- <Store name="Char_NameColor_Pink" icon="$Data/Weapons/StoreIcons/Color8.dds" desc="" LevelRequired="0" />
- </Item>
- <Item itemID="501408" category="36" Weight="0">
- <NameColorData color="9"/>
- <Model file="Data/ObjectsDepot/REF_CaseBox/Loot_Drop_Moonnight.sco" />
- <Store name="Char_NameColor_GreenPussy" icon="$Data/Weapons/StoreIcons/Color9.dds" desc="" LevelRequired="0" />
- </Item>
- <Item itemID="501409" category="36" Weight="0">
- <NameColorData color="20"/>
- <Model file="Data/ObjectsDepot/REF_CaseBox/Loot_Drop_Moonnight.sco" />
- <Store name="Char_NameColor_Black" icon="$Data/Weapons/StoreIcons/Color10.dds" desc="" LevelRequired="0" />
- </Item>
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- ------------------------------------------------------------------------------------------
- ปรับเลข SQL ตรง
- <NameColorData color="5"/>
- ปรับเป็นเลข color ของซอสตัวเองเลย
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement