//------------------------------------------------------------------------------
//
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
namespace G
{
using System.Collections;
using System.Collections.Generic;
using F;
using F.Item;
///
/// Generated from: city.xlsx
///
partial class ItemCityEvent
{
public Item.ItemInfo[] rewardInfos;
public bool isValid
{
get
{
if (this.type == 1)
{
int beautyId = typeArgs[0];
var beauty = BeautyProxy.Instance.GetBeauty(beautyId);
if (beauty.isFriend)
return false;
}
else if (this.type == 6)
{
var petId = typeArgs[0];
var pet = PetProxy.Instance.GetPet(petId);
if (pet.isFriend)
return false;
}
else if (this.type == 7)
{
var bookId = typeArgs[0];
var book = BookProxy.Instance.GetBook(bookId);
if (book.isUnlock)
return false;
}
return true;
}
}
public override void Init()
{
rewardInfos = Item.ItemInfo.FromArray(rewards);
}
}
}