public bool IsTransport() { UpdateField uf; if (UpdateFields.TryGetValue(Enums.Version.UpdateFields.GetUpdateField(GameObjectField.GAMEOBJECT_BYTES_1), out uf)) { return((GameObjectType)((uf.UInt32Value & 0x0000FF00) >> 8) == GameObjectType.MOTransport); } return(false); }
public override bool IsTemporarySpawn() { // If our gameobject got the following update field set, // it's probably a temporary spawn UpdateField uf; if (UpdateFields.TryGetValue(Enums.Version.UpdateFields.GetUpdateField(GameObjectField.GAMEOBJECT_FIELD_CREATED_BY), out uf)) { return(uf.UInt32Value != 0); } return(false); }
public override bool IsTemporarySpawn() { // If our unit got any of the following update fields set, // it's probably a temporary spawn UpdateField uf; if (UpdateFields.TryGetValue(Enums.Version.UpdateFields.GetUpdateField(UnitField.UNIT_FIELD_SUMMONEDBY), out uf) || UpdateFields.TryGetValue(Enums.Version.UpdateFields.GetUpdateField(UnitField.UNIT_CREATED_BY_SPELL), out uf) || UpdateFields.TryGetValue(Enums.Version.UpdateFields.GetUpdateField(UnitField.UNIT_FIELD_CREATEDBY), out uf)) { return(uf.UInt32Value != 0); } return(false); }