pany
Well-known member
Да. И как раз в этой теме был уже неоднократно дан ответ.View attachment 3264
Кто-нибудь сталкивался с таким?
Last edited:
Да. И как раз в этой теме был уже неоднократно дан ответ.View attachment 3264
Кто-нибудь сталкивался с таким?

ИИ-шница реплику с версий постарше делала, включая xml? Лениво было копаться, но на 1.1 реплика наймов пригодилась бы.при разработке использовал ИИ, просьба строго не судить![]()
Есть, измененные:2147418123#/Mechanics/AI/CasterPetBrain.xdb.xdb
64102#/Mechanics/AI/PetBrain.xdb (был в оригинале index.srv
2147418122#/Mechanics/AI/AssistantBrain.xdb (в index.srv нет
Не, файлы 4.0 не подходят для переноса, там слишком много зависимостей, которых нет в 1.0, по этому файлами 4.0 мы только вдохновлялись, и писали классы с нуля. На 1.1 перенести их вряд ли получится, так как по мимо серверного патча, я ещё делал патч клиента, для отображения наймов в виде группы (клиент по умолчанию так не умеет). Хотя возможно есть способ, патч клиента в виде аддона подкинуть, может и прокатит.ИИ-шница реплику с версий постарше делала, включая xml? Лениво было копаться, но на 1.1 реплика наймов пригодилась бы.
Такого файла вроде нет в архивах, но есть в index.srv
Есть, измененные:
А сорсы нам расшарят?по этому файлами 4.0 мы только вдохновлялись, и писали классы с нуля.

Если надо кому, пускай будетнаемников можно призвать после 5 уровня (ограничения по локациям нет, можно с ними бегать везде), свиток изучения находится в лавке редкости раздел Услуги > Тренировка
package gameMechanics.elements.predicates;
import gameMechanics.map.scriptZone.*;
import org.jetbrains.annotations.*;
import annotations.attributes.*;
import gameMechanics.world.creature.*;
import identity.*;
import gameMechanics.constructor.basicInterfaces.*;
import gameMechanics.constructor.schemes.action.*;
import msgSystem.locales.*;
import resourceDB.resources.*;
import ioBase.*;
// Проверка карты:
import gameMechanics.world.avatar.*;
// import mapLoader.*;
import gameMechanics.map.zone.*;
//import gameMechanics.constructor.basicElements.*;
import gameMechanics.constructor.basicElements.ActionFailCause;
import gameMechanics.constructor.basicElements.Predicate;
import gameMechanics.constructor.basicElements.PredicatesHelper;
@Description("Проверяет на соответсвие аватара определнной карте:")
public class PredicateMercenariesMap extends Predicate
{
@DenyDefault
@NotNull
private ZoneResource Oreshek;
@NotNull
private ZoneResource XAES;
@NotNull
private ZoneResource LagunaBoil;
@NotNull
private ZoneResource DarkbloodCitadel;
@NotNull
private ZoneResource PlagueCastle;
@NotNull
private ZoneResource HeartofTensessTemple;
@NotNull
private ZoneResource LabThirteen;
@NotNull
@Override
public ActionFailCause getFailCause(@NotNull final Creature creature) { return ActionFailCause.NotInScriptZone; }
@Override
public boolean isOk(@NotNull final CreatureReplica creature)
{
if(!(creature instanceof Avatar)) { return false; }
final Avatar avatar = (Avatar)creature;
// final MapResource avatar_map = avatar.getIds().getMap();
final ZoneResource avatar_map = avatar.getMechanics().getZone();
if(this.Oreshek.equals(avatar_map)) {
return true;
} else if(this.XAES.equals(avatar_map)) {
return true;
} else if(this.LagunaBoil.equals(avatar_map)) {
return true;
} else if(this.DarkbloodCitadel.equals(avatar_map)) {
return true;
} else if(this.PlagueCastle.equals(avatar_map)) {
return true;
} else if(this.HeartofTensessTemple.equals(avatar_map)) {
return true;
} else if(this.LabThirteen.equals(avatar_map)) {
return true;
}
return false;
}
@Override
public void readCpp(@NotNull final SerializationDataInput in) throws SerializationException
{
super.readCpp(in);
try
{
this.Oreshek = (ZoneResource)Resource.createFromCpp(in, (Class)ZoneResource.class);
this.XAES = (ZoneResource)Resource.createFromCpp(in, (Class)ZoneResource.class);
this.LagunaBoil = (ZoneResource)Resource.createFromCpp(in, (Class)ZoneResource.class);
this.DarkbloodCitadel = (ZoneResource)Resource.createFromCpp(in, (Class)ZoneResource.class);
this.PlagueCastle = (ZoneResource)Resource.createFromCpp(in, (Class)ZoneResource.class);
this.HeartofTensessTemple = (ZoneResource)Resource.createFromCpp(in, (Class)ZoneResource.class);
this.LabThirteen = (ZoneResource)Resource.createFromCpp(in, (Class)ZoneResource.class);
}
catch (ClassCastException e) {
throw new SerializationException("ClassCastException", (Throwable)e);
}
}
@Override
public void writeCpp(@NotNull final SerializationDataOutput out) throws SerializationException
{
super.writeCpp(out);
this.Oreshek.writeCpp(out);
this.XAES.writeCpp(out);
this.LagunaBoil.writeCpp(out);
this.DarkbloodCitadel.writeCpp(out);
this.PlagueCastle.writeCpp(out);
this.HeartofTensessTemple.writeCpp(out);
this.LabThirteen.writeCpp(out);
}
}
package gameMechanics.elements.predicates;
import annotations.attributes.*;
import org.jetbrains.annotations.*;
import gameMechanics.world.gameRoot.*;
import resourceDB.xdb.*;
import gameMechanics.world.avatar.*;
import gameMechanics.world.creature.*;
import gameMechanics.constructor.basicElements.*;
import gameMechanics.tools.*;
import asserts.*;
// Проверка на Астральный остров:
import gameMechanics.map.instance.astralIsland.*;
@Description("Проверка находится ли персонаж на острове.")
public class PredicateNotOnIslandCustom extends Predicate
{
@Override
public boolean isOk(@NotNull final CreatureReplica creature)
{
if(creature.getIds().getMap().getMapTemplate().getEntrance() instanceof AstralIslandEntrance)
{
return false;
}
return true;
}
}
Проверка нахождения персонажа в героиках:
<Item type="gameMechanics.elements.predicates.PredicateMercenariesMap">
<Oreshek href="/Maps/Inst_Liga1End/Zones/Inst_Liga1End/Inst_Liga1End.(ZoneResource).xdb#xpointer(/gameMechanics.map.zone.ZoneResource)" />
<XAES href="/Maps/Inst_Empire1End/Zones/Inst_Empire1End/Inst_Empire1End.(ZoneResource).xdb#xpointer(/gameMechanics.map.zone.ZoneResource)" />
<LagunaBoil href="/Maps/Hadagan_E3_Miniinst/Zones/ZoneEmpire3/ZoneEmpire3.(ZoneResource).xdb#xpointer(/gameMechanics.map.zone.ZoneResource)" />
<DarkbloodCitadel href="/Maps/Inst_Liga3End/Zones/Inst_Liga3End/Inst_Liga3End.(ZoneResource).xdb#xpointer(/gameMechanics.map.zone.ZoneResource)" />
<PlagueCastle href="/Maps/Inst_PlagueCastle/Zones/PlagueCastle/PlagueCastle.(ZoneResource).xdb#xpointer(/gameMechanics.map.zone.ZoneResource)" />
<HeartofTensessTemple href="/Maps/Inst_TenzisTemple/Zones/Inst_TenzisTemple/Inst_TenzisTemple.(ZoneResource).xdb#xpointer(/gameMechanics.map.zone.ZoneResource)" />
<LabThirteen href="/Maps/Inst_SecretLab/Zones/Inst_SecretLab/Inst_SecretLab.(ZoneResource).xdb#xpointer(/gameMechanics.map.zone.ZoneResource)" />
</Item>