public static MonsterSpawner ReadFromDB(object[] row) { // 0: spawner_id int(10) unsigned // 1: monster int(10) unsigned // 2: location int(10) unsigned // 3: max int(10) unsigned // 4: rate_min int(10) unsigned // 5: rate_max int(10) unsigned // 6: interval_min int(10) unsigned // 7: interval_max int(10) unsigned MonsterSpawner ms = new MonsterSpawner(); ms._id = (uint)row[0]; ms._monsterTemplateID = (uint)row[1]; ms._locationID = (uint)row[2]; ms._max = (uint)row[3]; ms._max = 2; ms._rateMin = (uint)row[4]; ms._rateMax = (uint)row[5]; ms._intervalMin = (uint)row[6]; ms._intervalMax = (uint)row[7]; ms._template = Program.Server.GetMonsterTemplate(ms._monsterTemplateID); ms._loc = Program.Server.GetLocation(ms._locationID); ms._map = Program.Server.GetPlayMap(ms._loc.Map); return(ms); }
public void AddMonsterSpawner(MonsterSpawner ms) { _aiThread.AddSpawner(ms); }
public void AddSpawner(MonsterSpawner ms) { _spawnerLock.WaitOne(); _spawners[ms.ID] = ms; _spawnerLock.ReleaseMutex(); }
public static MonsterSpawner ReadFromDB(object[] row) { // 0: spawner_id int(10) unsigned // 1: monster int(10) unsigned // 2: location int(10) unsigned // 3: max int(10) unsigned // 4: rate_min int(10) unsigned // 5: rate_max int(10) unsigned // 6: interval_min int(10) unsigned // 7: interval_max int(10) unsigned MonsterSpawner ms = new MonsterSpawner(); ms._id = (uint)row[0]; ms._monsterTemplateID = (uint)row[1]; ms._locationID = (uint)row[2]; ms._max = (uint)row[3]; ms._max = 2; ms._rateMin = (uint)row[4]; ms._rateMax = (uint)row[5]; ms._intervalMin = (uint)row[6]; ms._intervalMax = (uint)row[7]; ms._template = Program.Server.GetMonsterTemplate(ms._monsterTemplateID); ms._loc = Program.Server.GetLocation(ms._locationID); ms._map = Program.Server.GetPlayMap(ms._loc.Map); return ms; }
public void AddSpawner(MonsterSpawner ms) { _spawnerLock.WaitOne(); _spawners[ms.ID] = ms; _spawnerLock.ReleaseMutex(); }