Intro video rework.

This commit is contained in:
MobiusDevelopment
2021-12-28 23:07:33 +00:00
parent 3c092dcc0f
commit fca34d55b7
58 changed files with 160 additions and 177 deletions

View File

@@ -842,9 +842,9 @@ ForbiddenNames = annou,ammou,amnou,anmou,anou,amou
# The exclude list is cleared each time the character goes into silence mode.
SilenceModeExclude = False
# Show Goddess of Destruction video introduction for newly created character
# Default: True (Video changed at Prelude of War)
GoDVideoIntro = False
# Show introduction video for newly created characters.
# Default: True
ShowIntroVideo = True
# ---------------------------------------------------------------------------

View File

@@ -313,7 +313,7 @@ public class Config
public static boolean STORE_UI_SETTINGS;
public static String[] FORBIDDEN_NAMES;
public static boolean SILENCE_MODE_EXCLUDE;
public static boolean SHOW_GOD_VIDEO_INTRO;
public static boolean SHOW_INTRO_VIDEO;
// --------------------------------------------------
// Castle Settings
@@ -2004,7 +2004,7 @@ public class Config
STORE_UI_SETTINGS = characterConfig.getBoolean("StoreCharUiSettings", true);
FORBIDDEN_NAMES = characterConfig.getString("ForbiddenNames", "").split(",");
SILENCE_MODE_EXCLUDE = characterConfig.getBoolean("SilenceModeExclude", false);
SHOW_GOD_VIDEO_INTRO = characterConfig.getBoolean("GoDVideoIntro", true);
SHOW_INTRO_VIDEO = characterConfig.getBoolean("ShowIntroVideo", true);
PLAYER_MOVEMENT_BLOCK_TIME = characterConfig.getInt("NpcTalkBlockingTime", 0) * 1000;
ABILITY_POINTS_RESET_SP = characterConfig.getLong("AbilityPointsResetSP", 500000000);
MAX_HOMUNCULUS_COUNT = characterConfig.getInt("MaxHomunculusCount", 9);

View File

@@ -40,6 +40,7 @@ public class PlayerVariables extends AbstractVariables
// Public variable names
public static final String INSTANCE_ORIGIN = "INSTANCE_ORIGIN";
public static final String INTRO_VIDEO = "INTRO_VIDEO";
public static final String HAIR_ACCESSORY_VARIABLE_NAME = "HAIR_ACCESSORY_ENABLED";
public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_USED";
public static final String VITALITY_ITEMS_USED_VARIABLE_NAME = "VITALITY_ITEMS_USED";

View File

@@ -44,6 +44,7 @@ import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerCreate
import org.l2jmobius.gameserver.model.holders.ItemHolder;
import org.l2jmobius.gameserver.model.item.PlayerItemTemplate;
import org.l2jmobius.gameserver.model.item.instance.Item;
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
import org.l2jmobius.gameserver.network.Disconnection;
import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.PacketLogger;
@@ -384,9 +385,9 @@ public class CharacterCreate implements IClientIncomingPacket
EventDispatcher.getInstance().notifyEvent(new OnPlayerCreate(newChar, newChar.getObjectId(), newChar.getName(), client), Containers.Players());
newChar.setOnlineStatus(true, false);
if (Config.SHOW_GOD_VIDEO_INTRO)
if (Config.SHOW_INTRO_VIDEO)
{
newChar.getVariables().set("intro_god_video", true);
newChar.getVariables().set(PlayerVariables.INTRO_VIDEO, true);
}
Disconnection.of(client, newChar).storeMe().deleteMe();

View File

@@ -32,7 +32,6 @@ import org.l2jmobius.gameserver.data.xml.BeautyShopData;
import org.l2jmobius.gameserver.data.xml.ClanHallData;
import org.l2jmobius.gameserver.data.xml.SkillTreeData;
import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.enums.Race;
import org.l2jmobius.gameserver.enums.SubclassInfoType;
import org.l2jmobius.gameserver.enums.TeleportWhereType;
import org.l2jmobius.gameserver.instancemanager.CastleManager;
@@ -71,6 +70,7 @@ import org.l2jmobius.gameserver.model.zone.ZoneId;
import org.l2jmobius.gameserver.network.ConnectionState;
import org.l2jmobius.gameserver.network.Disconnection;
import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.PacketLogger;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
@@ -467,16 +467,15 @@ public class EnterWorld implements IClientIncomingPacket
// Friend list
player.sendPacket(new L2FriendList(player));
if (Config.SHOW_GOD_VIDEO_INTRO && player.getVariables().getBoolean("intro_god_video", false))
// Intro video.
if (Config.SHOW_INTRO_VIDEO && player.getVariables().hasVariable(PlayerVariables.INTRO_VIDEO))
{
player.getVariables().remove("intro_god_video");
if (player.getRace() == Race.ERTHEIA)
player.getVariables().remove(PlayerVariables.INTRO_VIDEO);
player.sendPacket(player.isDeathKnight() ? ExShowUsm.DEATH_KNIGHT_INTRO : ExShowUsm.ANTHARAS_INTRO);
if (!Config.DISABLE_TUTORIAL)
{
player.sendPacket(ExShowUsm.ERTHEIA_INTRO_FOR_ERTHEIA);
}
else
{
player.sendPacket(ExShowUsm.ERTHEIA_INTRO_FOR_OTHERS);
ThreadPool.schedule(() -> player.sendPacket(new ExShowScreenMessage(NpcStringId.TARTI_IS_WORRIED_ABOUT_S1, ExShowScreenMessage.TOP_CENTER, 10000, player.getName())), player.isDeathKnight() ? 30000 : 15000);
}
}

View File

@@ -32,6 +32,8 @@ public class ExShowUsm implements IClientOutgoingPacket
public static final ExShowUsm USM_Q015_E = new ExShowUsm(15); // Chamber of Prophecies instance
public static final ExShowUsm ERTHEIA_INTRO_FOR_ERTHEIA = new ExShowUsm(147);
public static final ExShowUsm ERTHEIA_INTRO_FOR_OTHERS = new ExShowUsm(148);
public static final ExShowUsm ANTHARAS_INTRO = new ExShowUsm(149);
public static final ExShowUsm DEATH_KNIGHT_INTRO = new ExShowUsm(150);
private final int _videoId;