public LogicCharacter CreateDuplicateCharacter(LogicCharacterData data, int upgLevel, int x, int y) { LogicCharacter character = (LogicCharacter)LogicGameObjectFactory.CreateGameObject(data, this.m_level, this.m_villageType); character.SetUpgradeLevel(upgLevel); character.SetDuplicate(true, this.GetSpellData().GetDuplicateLifetime(this.m_upgradeLevel) / 64 + 1); character.SetInitialPosition(x, y); if (data.IsJumper()) { character.GetMovementComponent().EnableJump(3600000); character.GetCombatComponent().RefreshTarget(true); } if (data.IsUnderground()) { LogicCombatComponent combatComponent = character.GetCombatComponent(); combatComponent.SetUndergroundTime(3600000); combatComponent.RefreshTarget(true); } if (LogicDataTables.IsSkeleton(data)) { LogicCombatComponent combatComponent = character.GetCombatComponent(); if (combatComponent != null) { combatComponent.SetSkeletonSpell(); } } this.GetGameObjectManager().AddGameObject(character, -1); // Listener. return(character); }