WarZ_Server.sln
ค้นหา
SFLAGS_DisableSNP = 1<<7,
เพิ่มไว้ด้านล่าง
SFLAGS_NoRare = 1<<8,
(ตัวเลข ต้องเปลี่ยนตาม ลำดับใน src ด้วยนะจ๊ะ)
ค้นหา
void CMasterServerConfig::ParsePermamentGame(int gameServerId, const char* name, const char* map, const char* data, int DisableASR , int DisableSNP
เพิ่มต่อท้าย
, int NoRare จะได้เป็นแบบนี้ void CMasterServerConfig::ParsePermamentGame(int gameServerId, const char* name, const char* map, const char* data, int DisableASR , int DisableSNP, int NoRare)
ค้นหา
if ( DisableSNP == 1)
ginfo.flags |= GBGameInfo::SFLAGS_DisableSNP;
เพิ่มไว้ด้านล่าง
if ( NoRare == 1)
ginfo.flags |= GBGameInfo::SFLAGS_NoRare;
ค้นหา
int DisableSNP;
เพิ่มไว้ด้านล่าง
int NoRare;
ค้นหา
DisableSNP = r3dReadCFG_I(configFile, group, "DisableSNP", 0);
เพิ่มไว้ด้านล่าง
NoRare = r3dReadCFG_I(configFile, group, "NoRare", 0);
ค้นหา
ParsePermamentGame(i, name, map, data, DisableASR, DisableSNP
เพิ่มต่อท้าย
, NoRare จะได้เป็นแบบนี้ ParsePermamentGame(i, name, map, data, DisableASR, DisableSNP, NoRare);
ค้นหา
void ParsePermamentGame(int gameServerId, const char* name, const char* map, const char* data, int DisableASR , int DisableSNP
เพิ่มต่อท้าย
, int NoRare จะได้เป็นแบบนี้ void ParsePermamentGame(int gameServerId, const char* name, const char* map, const char* data, int DisableASR , int DisableSNP, int NoRare);
ค้นหา
// if we didnt' received weap data rep in expected time
if(weapDataReqExp > 0 && curTime > weapDataReqExp)
{
gServerLogic.DisconnectPeer(peerId_, true, "no weapdatarep");
return TRUE;
}
เพิ่มไว้ด้านล่าง
if (gServerLogic.ginfo_.flags & GBGameInfo::SFLAGS_NoRare)
{
for(int i=0; i<loadout_->BackpackSize; i++)
{
const wiInventoryItem& wi = loadout_->Items[i];
const BaseItemConfig* cfg = g_pWeaponArmory->getConfig(wi.itemID);
if(cfg)
{
if(cfg->m_NoRareItem > 0)
{
char chatmessage[128] = {0};
PKT_C2C_ChatMessage_s n;
sprintf(chatmessage, "Kicked '%s' from server : Use Rare Item Set (No Rare Item Set)",loadout_->Gamertag);
r3dscpy(n.gamertag, "System");
r3dscpy(n.msg, chatmessage);
n.msgChannel = 1;
n.userFlag = 2;
//gServerLogic.p2pBroadcastToAll(NULL, &n, sizeof(n), true);
gServerLogic.DisconnectPeer(peerId_, true, "use rare item set");
return TRUE;
}
}
}
}
ค้นหา
m_ResMetal = xmlItem.child("Res").attribute("r3").as_int();
เพิ่มไว้ด้านล่าง
m_NoRareItem = xmlItem.child("NoRare").attribute("on").as_int();
ค้นหา
m_ResMetal = 0;
เพิ่มไว้ด้านล่าง
m_NoRareItem = 0;
ค้นหา
int m_ResMetal;
เพิ่มไว้ด้านล่าง
int m_NoRareItem;
==========================================================================
WarZ.sln
ค้นหา
var[13].SetBoolean(ginfo.channel==3 && m_browseGamesMode == 0); // allow donating GC only to private servers
เพิ่มไว้ด้านล่าง ต่อท้ายบรรทัดหลังสุด เปลี่ยนตัวเลข var[17] ตามบรรทัดที่เห็นด้วย เช่น หลังสุดคือ 15 ต้องใส่ var[16] นะ
var[17].SetBoolean((ginfo.flags & GBGameInfo::SFLAGS_NoRare) ? true : false);
และแก้ไข Scaleform::GFx::Value var[19]; ให้เป็น เลข +1 เช่น ทั้งหมดมี 17 var ต้องใส่ เป็น 18 นะจ๊ะ
และแก้ไข gfxMovie.Invoke("_root.api.Main.BrowseGamesAnim.addGameToList", var, 19); ให้เป็น เลข +1 เช่น ทั้งหมดมี 17 var ต้องใส่ เป็น 18 นะจ๊ะ
ค้นหา
var[7].SetInt((srv->ginfo.flags & GBGameInfo::SFLAGS_DisableSNP) ? 1 : 0);
เพิ่มไว้ด้านล่าง
var[8].SetInt((srv->ginfo.flags & GBGameInfo::SFLAGS_NoRare) ? 1 : 0);
และแก้ไข Scaleform::GFx::Value var[12]; ให้เป็น เลข +1 เช่น ทั้งหมดมี 17 var ต้องใส่ เป็น 18 นะจ๊ะ
และแก้ไข gfxMovie.Invoke("_root.api.Main.PlayGameMyServers.setServerInfoSettingsVisibility", var, 12); ให้เป็น เลข +1 เช่น ทั้งหมดมี 17 var ต้องใส่ เป็น 18 นะจ๊ะ
ค้นหา
int disableSNP = args[8].GetInt();
เพิ่มไว้ด้านล่าง
int noRare = args[9].GetInt();
ค้นหา
m_myServerFlags &= ~GBGameInfo::SFLAGS_DisableSNP;
เพิ่มไว้ด้านล่าง
m_myServerFlags &= ~GBGameInfo::SFLAGS_NoRare;
ค้นหา
if(disableSNP) m_myServerFlags |= GBGameInfo::SFLAGS_DisableSNP;
เพิ่มไว้ด้านล่าง
if(noRare) m_myServerFlags |= GBGameInfo::SFLAGS_NoRare;
===============================================================================
การทำไอเทมให้ไม่สามารถเอาลง NoRare Mode ได้ ให้เพิ่ม <NoRare on = "1" /> ไว้บรรทัดล่างใน ItemID.xml
เช่น เหมือนในตัวอย่าง
<Weapon itemID="101347" category="29" upgrade="1" FNAME="MEL_Chainsaw" Weight="1200">
<Model file="Data/ObjectsDepot/Weapons/MEL_Chainsaw.sco" AnimPrefix="MEL_Chainsaw" muzzlerOffset.x="0" muzzlerOffset.y="0" muzzlerOffset.z="0" />
<MuzzleModel file="" />
<HudIcon file="$Data/Weapons/HudIcons/MEL_Chainsaw.dds" />
<Store name="Chainsaw" icon="$Data/Weapons/StoreIcons/MEL_Chainsaw.dds" desc="Tear through undead and living alike with this fearsome household tool" LevelRequired="0" />
<PrimaryFire bullet="melee" damage="65" immediate="true" mass="10" decay="1" speed="300" area="0" delay="0" timeout="0" numShells="0" clipSize="1" reloadTime="0" activeReloadTick="0" rateOfFire="120" spread="0" recoil="0" numgrenades="0" grenadename="asr_grenade" firemode="001" ScopeType="default" ScopeZoom="0" />
<Animation type="melee" />
<Sound shoot="Sounds/NZ_Weapons/MEL/Chainsaw_Woosh" reload="Sounds/Weapons/New Reloads/M16-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" />
<Dur u="800" r1="55" r2="95" r3="500" />
<NoRare on = "1" /> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
</Weapon>
ใน MasterServer.cfg ให้ใส่ NoRare = 1 สำหรับแมพที่ต้องการให้เป็น NoRare จ๊ะ
วันพุธที่ 28 มิถุนายน พ.ศ. 2560
โนแรร์
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
มีโนดรอปไหมครับ
ตอบลบ