Revert "Updates Packets & Randomizer (#43)" (#61)

This reverts commit 179cb50557.
This commit is contained in:
Kamron Batman 2019-11-11 08:46:11 -08:00 • committed by GitHub
parent 179cb50557
commit c2ecc76457
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
588 changed files with 16260 additions and 10926 deletions

View file

@ -36,29 +36,29 @@ namespace Server.Engines.Quests.Haven
if (System.From.Profession == 2) // magician
return 1049386;
/* <I>Uzeraan nods at you with approval and begins to speak...</I><BR><BR>
*
* Now that you are ready, let me give you your first task.<BR><BR>
*
* As I mentioned earlier, we have been trying to fight back the wicked
* <I>Horde Minions</I> which have recently begun attacking our cities
* - but to no avail. Our need is great!<BR><BR>
*
* Your first task will be to assess the situation in the mountain pass,
* and help our troops defeat the Horde Minions there.<BR><BR>
*
* Take the road marked with glowing runes, that starts just outside of this mansion.
* Before you go into battle, it would be prudent to
* <a href="?ForceTopic27">review combat techniques</a> as well as
* <a href = "?ForceTopic29">information on healing yourself,
* using your Paladin ability 'Close Wounds'</a>.<BR><BR>
*
* To aid you in your fight, you may also wish to
* <a href = "?ForceTopic33">purchase equipment</a> from Frank the Blacksmith,
* who is standing just <a href = "?ForceTopic13">South</a> of here.<BR><BR>
*
* Good luck young Paladin!
*/
/* <I>Uzeraan nods at you with approval and begins to speak...</I><BR><BR>
*
* Now that you are ready, let me give you your first task.<BR><BR>
*
* As I mentioned earlier, we have been trying to fight back the wicked
* <I>Horde Minions</I> which have recently begun attacking our cities
* - but to no avail. Our need is great!<BR><BR>
*
* Your first task will be to assess the situation in the mountain pass,
* and help our troops defeat the Horde Minions there.<BR><BR>
*
* Take the road marked with glowing runes, that starts just outside of this mansion.
* Before you go into battle, it would be prudent to
* <a href="?ForceTopic27">review combat techniques</a> as well as
* <a href = "?ForceTopic29">information on healing yourself,
* using your Paladin ability 'Close Wounds'</a>.<BR><BR>
*
* To aid you in your fight, you may also wish to
* <a href = "?ForceTopic33">purchase equipment</a> from Frank the Blacksmith,
* who is standing just <a href = "?ForceTopic13">South</a> of here.<BR><BR>
*
* Good luck young Paladin!
*/
return 1060388;
}
}
@ -73,7 +73,7 @@ namespace Server.Engines.Quests.Haven
public class UzeraanReportConversation : QuestConversation
{
private static readonly QuestItemInfo[] m_Info =
private static QuestItemInfo[] m_Info =
{
new QuestItemInfo(1026153, 0x1822), // teleporter
new QuestItemInfo(1048032, 0xE76) // a bag
@ -469,4 +469,4 @@ namespace Server.Engines.Quests.Haven
public override bool Logged => false;
}
}
}

View file

@ -28,14 +28,15 @@ namespace Server.Engines.Quests.Haven
{
}
// TODO: Should be a better way than making/deleting a mob.
// TODO: What is this? Why are we creating and deleting a mobile?
private static Mobile GetOwner()
{
Mobile apprentice = new Mobile
{
Hue = Race.Human.RandomSkinHue(), Female = false, Body = 0x190, Name = NameList.RandomName("male")
};
Mobile apprentice = new Mobile();
apprentice.Hue = Race.Human.RandomSkinHue();
apprentice.Female = false;
apprentice.Body = 0x190;
apprentice.Name = NameList.RandomName("male");
apprentice.Delete();
@ -44,14 +45,12 @@ namespace Server.Engines.Quests.Haven
private static List<Item> GetEquipment()
{
List<Item> list = new List<Item>
{
new Robe(QuestSystem.RandomBrightHue()),
new WizardsHat(Utility.RandomNeutralHue()),
new Shoes(Utility.RandomNeutralHue()),
new Spellbook()
};
List<Item> list = new List<Item>();
list.Add(new Robe(QuestSystem.RandomBrightHue()));
list.Add(new WizardsHat(Utility.RandomNeutralHue()));
list.Add(new Shoes(Utility.RandomNeutralHue()));
list.Add(new Spellbook());
return list;
}
@ -87,10 +86,11 @@ namespace Server.Engines.Quests.Haven
int hue = Notoriety.GetHue(NotorietyHandlers.CorpseNotoriety(from, this));
if (ItemID == 0x2006) // Corpse form
Packets.SendMessageLocalized(from.NetState, Serial, ItemID, MessageType.Label, hue, 3, 1049144, "",
Name); // the remains of ~1_NAME~ the apprentice
from.Send(new MessageLocalized(Serial, ItemID, MessageType.Label, hue, 3, 1049144, "",
Name)); // the remains of ~1_NAME~ the apprentice
else
Packets.SendMessageLocalized(from.NetState, Serial, ItemID, MessageType.Label, hue, 3, 1049145); // the remains of a wizard's apprentice
from.Send(new MessageLocalized(Serial, ItemID, MessageType.Label, hue, 3, 1049145, "",
"")); // the remains of a wizard's apprentice
}
public override void Open(Mobile from, bool checkSelfLoot)

View file

@ -118,10 +118,11 @@ namespace Server.Engines.Quests.Haven
int hue = Notoriety.GetHue(NotorietyHandlers.CorpseNotoriety(from, this));
if (ItemID == 0x2006) // Corpse form
Packets.SendMessageLocalized(from.NetState, Serial, ItemID, MessageType.Label, hue, 3, 1049318, "",
Name); // the remains of ~1_NAME~ the militia fighter
from.Send(new MessageLocalized(Serial, ItemID, MessageType.Label, hue, 3, 1049318, "",
Name)); // the remains of ~1_NAME~ the militia fighter
else
Packets.SendMessageLocalized(from.NetState, Serial, ItemID, MessageType.Label, hue, 3, 1049318); // the remains of a militia fighters
from.Send(new MessageLocalized(Serial, ItemID, MessageType.Label, hue, 3, 1049319, "",
"")); // the remains of a militia fighter
}
public override void Open(Mobile from, bool checkSelfLoot)
@ -145,4 +146,4 @@ namespace Server.Engines.Quests.Haven
int version = reader.ReadInt();
}
}
}
}

View file

@ -72,8 +72,9 @@ namespace Server.Engines.Quests.Haven
public KillHordeMinionsStep Step{ get; private set; }
public override object Message =>
Step switch
public override object Message
{
get
{
return Step switch
{
@ -107,7 +108,19 @@ namespace Server.Engines.Quests.Haven
_ => 5
};
public override bool Completed => Step == KillHordeMinionsStep.LearnKarma && HasBeenRead || base.Completed;
return 5;
}
}
public override bool Completed
{
get
{
if (Step == KillHordeMinionsStep.LearnKarma && HasBeenRead)
return true;
return base.Completed;
}
}
public override void RenderProgress(BaseQuestGump gump)
{
@ -127,15 +140,23 @@ namespace Server.Engines.Quests.Haven
CheckCompletionStatus();
}
public override bool IgnoreYoungProtection(Mobile from) =>
from is HordeMinion && from.Map == Map.Trammel && TreasureMap.IsInHavenIsland(from);
public override bool IgnoreYoungProtection(Mobile from)
{
// This restriction continues until the quest is ended
if (from is HordeMinion && from.Map == Map.Trammel && from.X >= 3314 && from.X <= 3814 && from.Y >= 2345 &&
from.Y <= 3095) // Haven island
return true;
return false;
}
public override void OnKill(BaseCreature creature, Container corpse)
{
if (creature is HordeMinion && corpse.Map == Map.Trammel && TreasureMap.IsInHavenIsland(corpse))
if (creature is HordeMinion && corpse.Map == Map.Trammel && corpse.X >= 3314 && corpse.X <= 3814 &&
corpse.Y >= 2345 && corpse.Y <= 3095) // Haven island
{
if (CurProgress == 0)
ContentPackets.SendDisplayHelpTopic(System.From.NetState, 29, false); // HEALING
System.From.Send(new DisplayHelpTopic(29, false)); // HEALING
CurProgress++;
}
@ -319,26 +340,49 @@ namespace Server.Engines.Quests.Haven
{
public Container CorpseWithBone{ get; set; }
public override object Message => System.From.Profession == 5 ? 1060755 : 1049362;
public override object Message
{
get
{
if (System.From.Profession == 5) return 1060755;
/* Use Uzeraan's teleporter to get to the Haunted graveyard.<BR><BR>
*
* Slay the undead until you find a <I>Daemon Bone</I>.
*/
return 1049362;
}
}
public override void OnComplete()
{
System.AddObjective(new ReturnDaemonBoneObjective());
}
private static bool IsInHavenGraveyard(IPoint2D p) => p.X >= 3391 && p.X <= 3424 &&
p.Y >= 2639 && p.Y <= 2664;
public override bool IgnoreYoungProtection(Mobile from)
{
// This restriction continues until the end of the quest
if ((from is Zombie || from is Skeleton) && from.Map == Map.Trammel && from.X >= 3391 && from.X <= 3424 &&
from.Y >= 2639 && from.Y <= 2664) // Haven graveyard
return true;
public override bool IgnoreYoungProtection(Mobile from) =>
(from is Zombie || from is Skeleton) && from.Map == Map.Trammel && IsInHavenGraveyard(from);
return false;
}
public override bool GetKillEvent(BaseCreature creature, Container corpse) =>
base.GetKillEvent(creature, corpse) || UzeraanTurmoilQuest.HasLostDaemonBone(System.From);
public override bool GetKillEvent(BaseCreature creature, Container corpse)
{
if (base.GetKillEvent(creature, corpse))
return true;
return UzeraanTurmoilQuest.HasLostDaemonBone(System.From);
}
public override void OnKill(BaseCreature creature, Container corpse)
{
if ((creature is Zombie || creature is Skeleton) && corpse.Map == Map.Trammel && IsInHavenGraveyard(corpse) && Utility.RandomDouble() < 0.25)
CorpseWithBone = corpse;
if ((creature is Zombie || creature is Skeleton) && corpse.Map == Map.Trammel && corpse.X >= 3391 &&
corpse.X <= 3424 && corpse.Y >= 2639 && corpse.Y <= 2664) // Haven graveyard
if (Utility.RandomDouble() < 0.25)
CorpseWithBone = corpse;
}
public override void ChildDeserialize(GenericReader reader)

View file

@ -62,8 +62,9 @@ namespace Server.Engines.Quests.Haven
public override TimeSpan RestartDelay => TimeSpan.MaxValue;
public override bool IsTutorial => true;
public override int Picture =>
From.Profession switch
public override int Picture
{
get
{
return From.Profession switch
{