internal static GOSpawnPoolTemplate GetOrCreateSpawnPoolTemplate(uint poolId) { GOSpawnPoolTemplate templ; if (poolId == 0) { // does not belong to any Pool templ = new GOSpawnPoolTemplate(); SpawnPoolTemplates.Add(templ.PoolId, templ); } else if (!SpawnPoolTemplates.TryGetValue(poolId, out templ)) { // pool does not exist yet var entry = SpawnMgr.GetSpawnPoolTemplateEntry(poolId); if (entry != null) { // default pool templ = new GOSpawnPoolTemplate(entry); } else { // pool does not exist templ = new GOSpawnPoolTemplate(); } SpawnPoolTemplates.Add(templ.PoolId, templ); } return(templ); }
public void FinalizeDataHolder() { if (!Asda2PortalMgr.Portals.ContainsKey((MapId)FromMap)) { Asda2PortalMgr.Portals.Add((MapId)FromMap, new List <GOSpawnPoolTemplate>()); } var pos = new Vector3(FromX + 1000 * FromMap, FromY + 1000 * FromMap); var goEntry = new GOPortalEntry { GOCreator = GoCreator, GOId = GOEntryId.Portal }; var goTempl = new GOSpawnEntry(goEntry, GameObjectState.Enabled, (MapId)FromMap, ref pos, 0, 1, new float[] { 0, 0, 0 }); var templ = new GOSpawnPoolTemplate(goTempl, 1); Asda2PortalMgr.Portals[(MapId)FromMap].Add(templ); }
public void FinalizeDataHolder() { if (!Asda2PortalMgr.Portals.ContainsKey((MapId)FromMap)) { Asda2PortalMgr.Portals.Add((MapId)FromMap, new List <GOSpawnPoolTemplate>()); } Vector3 pos = new Vector3(FromX + 1000 * FromMap, FromY + 1000 * FromMap); GOPortalEntry goPortalEntry = new GOPortalEntry(); goPortalEntry.GOCreator = GoCreator; goPortalEntry.GOId = GOEntryId.Portal; GOSpawnPoolTemplate spawnPoolTemplate = new GOSpawnPoolTemplate( new GOSpawnEntry(goPortalEntry, GameObjectState.Enabled, (MapId)FromMap, ref pos, 0.0f, 1f, new float[3], 600), 1); Asda2PortalMgr.Portals[(MapId)FromMap].Add(spawnPoolTemplate); }
internal static GOSpawnPoolTemplate GetOrCreateSpawnPoolTemplate(uint poolId) { GOSpawnPoolTemplate spawnPoolTemplate; if (poolId == 0U) { spawnPoolTemplate = new GOSpawnPoolTemplate(); SpawnPoolTemplates.Add(spawnPoolTemplate.PoolId, spawnPoolTemplate); } else if (!SpawnPoolTemplates.TryGetValue(poolId, out spawnPoolTemplate)) { SpawnPoolTemplateEntry poolTemplateEntry = SpawnMgr.GetSpawnPoolTemplateEntry(poolId); spawnPoolTemplate = poolTemplateEntry == null ? new GOSpawnPoolTemplate() : new GOSpawnPoolTemplate(poolTemplateEntry); SpawnPoolTemplates.Add(spawnPoolTemplate.PoolId, spawnPoolTemplate); } return(spawnPoolTemplate); }
internal static GOSpawnPoolTemplate GetOrCreateSpawnPoolTemplate(uint poolId) { GOSpawnPoolTemplate templ; if (poolId == 0) { // does not belong to any Pool templ = new GOSpawnPoolTemplate(); SpawnPoolTemplates.Add(templ.PoolId, templ); } else if (!SpawnPoolTemplates.TryGetValue(poolId, out templ)) { // pool does not exist yet var entry = SpawnMgr.GetSpawnPoolTemplateEntry(poolId); if (entry != null) { // default pool templ = new GOSpawnPoolTemplate(entry); } else { // pool does not exist templ = new GOSpawnPoolTemplate(); } SpawnPoolTemplates.Add(templ.PoolId, templ); } return templ; }