Browse Source

修改InitNoDb的BUG

master
wserver/wangdisen 3 years ago
parent
commit
3822e15410
  1. 5
      Server/Hotfix/Demo/Unit/UnitFactory.cs
  2. 17
      Unity/Codes/Model/Demo/People/People.cs

5
Server/Hotfix/Demo/Unit/UnitFactory.cs

@ -197,6 +197,11 @@ namespace ET
public static void InitNoDb(Unit unit)
{
var bc = unit.GetComponent<BuildingComponent>();
if (bc == null)
{
return;
}
foreach (var v in unit.GetComponent<BuildingComponent>().Children.Values)
{
foreach (var c in v.Children.Values)

17
Unity/Codes/Model/Demo/People/People.cs

@ -19,7 +19,7 @@ namespace ET
public int Exp;
public int Level;
public int Age;
public int BehaveType;
public long TargetId;
public int CurrSkillId;
public float PosX;
@ -31,20 +31,7 @@ namespace ET
public int Wisdom; //智慧
public int MoveSpeed; //移动速度
public int BehaveType
{
set
{
this.BehaveType = value;
#if !SERVER
Game.EventSystem.Publish(new EventType.BehaveTypeChanged() { People = this });
#endif
}
get
{
return this.BehaveType;
}
}
[BsonIgnore]
public RoleConfig Config => RoleConfigCategory.Instance.Get(this.ConfigId);

Loading…
Cancel
Save