#W# Change: Harvesting (mining, lumberjacking, fishing,) continue until complete.
This commit is contained in:
parent
8a9f979067
commit
6429c4a1dd
2 changed files with 10 additions and 2 deletions
|
|
@ -11,7 +11,7 @@
|
||||||
"settings": {
|
"settings": {
|
||||||
"accountHandler.enableAutoAccountCreation": "True",
|
"accountHandler.enableAutoAccountCreation": "True",
|
||||||
"accountHandler.enablePlayerPasswordCommand": "False",
|
"accountHandler.enablePlayerPasswordCommand": "False",
|
||||||
"accountHandler.maxAccountsPerIP": "1",
|
"accountHandler.maxAccountsPerIP": "3",
|
||||||
"accountSecurity.encryptionAlgorithm": "Argon2",
|
"accountSecurity.encryptionAlgorithm": "Argon2",
|
||||||
"assistants.enableNegotiation": "False",
|
"assistants.enableNegotiation": "False",
|
||||||
"autoArchive.archiveLocally": "True",
|
"autoArchive.archiveLocally": "True",
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,8 @@ namespace Server.Engines.Harvest
|
||||||
|
|
||||||
Type type = null;
|
Type type = null;
|
||||||
|
|
||||||
|
bool stopAutoHarvest = false;
|
||||||
|
|
||||||
if (skillBase >= resource.ReqSkill && from.CheckSkill(def.Skill, resource.MinSkill, resource.MaxSkill))
|
if (skillBase >= resource.ReqSkill && from.CheckSkill(def.Skill, resource.MinSkill, resource.MaxSkill))
|
||||||
{
|
{
|
||||||
type = GetResourceType(from, tool, def, map, loc, resource);
|
type = GetResourceType(from, tool, def, map, loc, resource);
|
||||||
|
|
@ -204,6 +206,7 @@ namespace Server.Engines.Harvest
|
||||||
{
|
{
|
||||||
SendPackFullTo(from, item, def, resource);
|
SendPackFullTo(from, item, def, resource);
|
||||||
item.Delete();
|
item.Delete();
|
||||||
|
stopAutoHarvest = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var bonus = def.GetBonusResource();
|
var bonus = def.GetBonusResource();
|
||||||
|
|
@ -236,6 +239,7 @@ namespace Server.Engines.Harvest
|
||||||
{
|
{
|
||||||
tool.Delete();
|
tool.Delete();
|
||||||
def.SendMessageTo(from, def.ToolBrokeMessage);
|
def.SendMessageTo(from, def.ToolBrokeMessage);
|
||||||
|
stopAutoHarvest = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -248,6 +252,10 @@ namespace Server.Engines.Harvest
|
||||||
}
|
}
|
||||||
|
|
||||||
OnHarvestFinished(from, tool, def, vein, bank, resource, toHarvest);
|
OnHarvestFinished(from, tool, def, vein, bank, resource, toHarvest);
|
||||||
|
if (tool != null && !tool.Deleted && !stopAutoHarvest)
|
||||||
|
{
|
||||||
|
StartHarvesting(from, tool, toHarvest);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void OnHarvestFinished(
|
public virtual void OnHarvestFinished(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue