Core/Maps: Replaced spawnmask with difficulty list
This commit is contained in:
@@ -484,7 +484,7 @@ namespace Game.Chat
|
||||
}
|
||||
|
||||
// fill the gameobject data and save to the db
|
||||
obj.SaveToDB(map.GetId(), 1ul << (int)map.GetSpawnMode());
|
||||
obj.SaveToDB(map.GetId(), new List<Difficulty>() { map.GetDifficultyID() });
|
||||
ulong spawnId = obj.GetSpawnId();
|
||||
|
||||
// this will generate a new guid if the object is in an instance
|
||||
|
||||
@@ -1095,7 +1095,7 @@ namespace Game.Chat
|
||||
// @todo: add phases
|
||||
|
||||
Creature _creature = trans.CreateNPCPassenger(guid, data);
|
||||
_creature.SaveToDB((uint)trans.GetGoInfo().MoTransport.SpawnMap, 1ul << (int)map.GetSpawnMode());
|
||||
_creature.SaveToDB((uint)trans.GetGoInfo().MoTransport.SpawnMap, new List<Difficulty>() { map.GetDifficultyID() });
|
||||
|
||||
Global.ObjectMgr.AddCreatureToGrid(guid, data);
|
||||
return true;
|
||||
@@ -1106,7 +1106,7 @@ namespace Game.Chat
|
||||
return false;
|
||||
|
||||
PhasingHandler.InheritPhaseShift(creature, chr);
|
||||
creature.SaveToDB(map.GetId(), 1ul << (int)map.GetSpawnMode());
|
||||
creature.SaveToDB(map.GetId(), new List<Difficulty>() { map.GetDifficultyID() });
|
||||
|
||||
ulong db_guid = creature.GetSpawnId();
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ using Framework.IO;
|
||||
using Game.Entities;
|
||||
using Game.Maps;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Game.Chat.Commands
|
||||
{
|
||||
@@ -549,7 +550,7 @@ namespace Game.Chat.Commands
|
||||
}
|
||||
|
||||
PhasingHandler.InheritPhaseShift(creature, chr);
|
||||
creature.SaveToDB(map.GetId(), 1ul << (int)map.GetSpawnMode());
|
||||
creature.SaveToDB(map.GetId(), new List<Difficulty>() { map.GetDifficultyID() });
|
||||
|
||||
ulong dbGuid = creature.GetSpawnId();
|
||||
|
||||
@@ -769,7 +770,7 @@ namespace Game.Chat.Commands
|
||||
}
|
||||
|
||||
PhasingHandler.InheritPhaseShift(creature, chr);
|
||||
creature.SaveToDB(map.GetId(), 1ul << (int)map.GetSpawnMode());
|
||||
creature.SaveToDB(map.GetId(), new List<Difficulty>() { map.GetDifficultyID() });
|
||||
|
||||
ulong dbGuid = creature.GetSpawnId();
|
||||
|
||||
@@ -835,7 +836,7 @@ namespace Game.Chat.Commands
|
||||
}
|
||||
|
||||
PhasingHandler.InheritPhaseShift(creature, chr);
|
||||
creature.SaveToDB(map.GetId(), 1ul << (int)map.GetSpawnMode());
|
||||
creature.SaveToDB(map.GetId(), new List<Difficulty>() { map.GetDifficultyID() });
|
||||
|
||||
ulong dbGuid = creature.GetSpawnId();
|
||||
|
||||
@@ -890,7 +891,7 @@ namespace Game.Chat.Commands
|
||||
}
|
||||
|
||||
PhasingHandler.InheritPhaseShift(creature, chr);
|
||||
creature.SaveToDB(map.GetId(), 1ul << (int)map.GetSpawnMode());
|
||||
creature.SaveToDB(map.GetId(), new List<Difficulty>() { map.GetDifficultyID() });
|
||||
|
||||
ulong dbGuid = creature.GetSpawnId();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user