public static table.NpcHeadMaskDataBase GetNPCHeadMaskDB(Client.IEntity entity) { table.NpcHeadMaskDataBase db = null; if (null != entity //&& entity.GetEntityType() == EntityType.EntityType_NPC ) { db = GetNPCHeadMaskDB((uint)entity.GetProp((int)Client.EntityProp.BaseID)); } return(db); }
public static table.NpcHeadMaskDataBase GetNPCHeadMaskDB(uint npcBaseId) { table.NpcHeadMaskDataBase db = null; if (npcBaseId != 0 //&& entity.GetEntityType() == EntityType.EntityType_NPC ) { table.NpcDataBase npcdb = GameTableManager.Instance.GetTableItem <table.NpcDataBase>(npcBaseId); if (null != npcdb && npcdb.npcHeadMaskID != 0) { db = GameTableManager.Instance.GetTableItem <table.NpcHeadMaskDataBase>(npcdb.npcHeadMaskID); } } return(db); }