Compare commits
2 Commits
a84b08548d
...
d596530064
| Author | SHA1 | Date | |
|---|---|---|---|
| d596530064 | |||
| d2632d04d4 |
@@ -79,10 +79,13 @@ class CustomMission: MissionServer
|
|||||||
|
|
||||||
string steamid = player.GetIdentity().GetPlainId();
|
string steamid = player.GetIdentity().GetPlainId();
|
||||||
ref PlayerRevivalEquipmentData rev = g_CustomRevivalSuitCfg.GetPlayerRevivalEquipmentData( steamid );
|
ref PlayerRevivalEquipmentData rev = g_CustomRevivalSuitCfg.GetPlayerRevivalEquipmentData( steamid );
|
||||||
|
bool isVIP = false;
|
||||||
if ( rev )
|
if ( rev )
|
||||||
|
{
|
||||||
|
isVIP = true;
|
||||||
ProcessVIPEquipment( player, rev );
|
ProcessVIPEquipment( player, rev );
|
||||||
|
}
|
||||||
DefaultPlayerEquipment( player, clothesChosen );
|
DefaultPlayerEquipment( player, clothesChosen, isVIP );
|
||||||
}
|
}
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// 处理VIP装备方法:为VIP玩家设置自定义装备
|
// 处理VIP装备方法:为VIP玩家设置自定义装备
|
||||||
@@ -141,15 +144,23 @@ class CustomMission: MissionServer
|
|||||||
// 参数:
|
// 参数:
|
||||||
// player - 玩家对象
|
// player - 玩家对象
|
||||||
// clothesChosen - 是否已选择服装
|
// clothesChosen - 是否已选择服装
|
||||||
|
// isVIP - 是否为VIP玩家
|
||||||
// 这里的代码是原版init.c中 StartingEquipSetup 方法中的内容, 只是换了个方法名字
|
// 这里的代码是原版init.c中 StartingEquipSetup 方法中的内容, 只是换了个方法名字
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
void DefaultPlayerEquipment( PlayerBase player, bool clothesChosen )
|
void DefaultPlayerEquipment( PlayerBase player, bool clothesChosen, bool isVIP )
|
||||||
{
|
{
|
||||||
EntityAI itemClothing;
|
EntityAI itemClothing;
|
||||||
EntityAI itemEnt;
|
EntityAI itemEnt;
|
||||||
ItemBase itemBs;
|
ItemBase itemBs;
|
||||||
float rand;
|
float rand;
|
||||||
|
|
||||||
|
if ( !isVIP )
|
||||||
|
{
|
||||||
|
// TODO: 这里给普通玩家创建装备. 以前在StartingEquipSetup中如何给玩家创建新的装备这里就如何写
|
||||||
|
// player.RemoveAllItems(); // 移除所有默认装备
|
||||||
|
// itemEnt = player.GetInventory().CreateInInventory( "" /*这里写服装代码 */ );
|
||||||
|
}
|
||||||
|
|
||||||
itemClothing = player.FindAttachmentBySlotName( "Body" );
|
itemClothing = player.FindAttachmentBySlotName( "Body" );
|
||||||
if ( itemClothing )
|
if ( itemClothing )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user