fix: Fix spawners missing parameters/properties (#1155)
This commit is contained in:
parent
1e50ff9966
commit
c34bcbc515
2 changed files with 22 additions and 5 deletions
|
|
@ -98,7 +98,7 @@ public abstract class BaseSpawner : Item, ISpawner
|
|||
|
||||
foreach (var entry in entries)
|
||||
{
|
||||
AddEntry(entry.SpawnedName, entry.SpawnedProbability, entry.SpawnedMaxCount, false);
|
||||
AddEntry(entry.SpawnedName, entry.SpawnedProbability, entry.SpawnedMaxCount, false, entry.Properties, entry.Parameters);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -320,15 +320,24 @@ public abstract class BaseSpawner : Item, ISpawner
|
|||
Entries[i].SpawnedName,
|
||||
Entries[i].SpawnedProbability,
|
||||
Entries[i].SpawnedMaxCount,
|
||||
false
|
||||
false,
|
||||
Entries[i].Properties,
|
||||
Entries[i].Parameters
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public SpawnerEntry AddEntry(string creaturename, int probability = 100, int amount = 1, bool dotimer = true)
|
||||
public SpawnerEntry AddEntry(
|
||||
string creaturename,
|
||||
int probability = 100,
|
||||
int amount = 1,
|
||||
bool dotimer = true,
|
||||
string properties = null,
|
||||
string parameters = null
|
||||
)
|
||||
{
|
||||
var entry = new SpawnerEntry(creaturename, probability, amount);
|
||||
var entry = new SpawnerEntry(creaturename, probability, amount, properties, parameters);
|
||||
Entries.Add(entry);
|
||||
if (dotimer)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue