public override bool OnDragDrop(Mobile from, Item dropped) { PlayerMobile player = from as PlayerMobile; if (player != null) { if (dropped is Seed) { SolenMatriarchQuest qs = player.Quest as SolenMatriarchQuest; if (qs != null && qs.RedSolen == RedSolen) { SayTo(player, 1054080); // Thank you for that plant seed. Those have such wonderful flavor. } else { QuestSystem newQuest = new SolenMatriarchQuest(player, RedSolen); if (player.Quest == null && QuestSystem.CanOfferQuest(player, typeof(SolenMatriarchQuest))) { newQuest.SendOffer(); } else { newQuest.AddConversation(new DontOfferConversation(SolenMatriarchQuest.IsFriend(player, RedSolen))); } } dropped.Delete(); return(true); } if (dropped is ZoogiFungus fungus) { OnGivenFungi(player, fungus); return(fungus.Deleted); } } return(base.OnDragDrop(from, dropped)); }
public override void OnTalk(PlayerMobile player, bool contextMenu) { this.Direction = GetDirectionTo(player); SolenMatriarchQuest qs = player.Quest as SolenMatriarchQuest; if (qs != null && qs.RedSolen == this.RedSolen) { if (qs.IsObjectiveInProgress(typeof(KillInfiltratorsObjective))) { qs.AddConversation(new DuringKillInfiltratorsConversation()); } else { QuestObjective obj = qs.FindObjective(typeof(ReturnAfterKillsObjective)); if (obj != null && !obj.Completed) { obj.Complete(); } else if (qs.IsObjectiveInProgress(typeof(GatherWaterObjective))) { qs.AddConversation(new DuringWaterGatheringConversation()); } else { obj = qs.FindObjective(typeof(ReturnAfterWaterObjective)); if (obj != null && !obj.Completed) { obj.Complete(); } else if (qs.IsObjectiveInProgress(typeof(ProcessFungiObjective))) { qs.AddConversation(new DuringFungiProcessConversation()); } else { obj = qs.FindObjective(typeof(GetRewardObjective)); if (obj != null && !obj.Completed) { if (SolenMatriarchQuest.GiveRewardTo(player)) { obj.Complete(); } else { qs.AddConversation(new FullBackpackConversation(false)); } } } } } } else if (SolenMatriarchQuest.IsFriend(player, this.RedSolen)) { QuestSystem newQuest = new SolenMatriarchQuest(player, this.RedSolen); if (player.Quest == null && QuestSystem.CanOfferQuest(player, typeof(SolenMatriarchQuest))) { newQuest.SendOffer(); } else { newQuest.AddConversation(new DontOfferConversation(true)); } } }
public override void OnTalk( PlayerMobile player, bool contextMenu ) { this.Direction = this.GetDirectionTo( player ); SolenMatriarchQuest qs = player.Quest as SolenMatriarchQuest; if ( qs != null && qs.RedSolen == this.RedSolen ) { if ( qs.IsObjectiveInProgress( typeof( KillInfiltratorsObjective ) ) ) { qs.AddConversation( new DuringKillInfiltratorsConversation() ); } else { QuestObjective obj = qs.FindObjective( typeof( ReturnAfterKillsObjective ) ); if ( obj != null && !obj.Completed ) { obj.Complete(); } else if ( qs.IsObjectiveInProgress( typeof( GatherWaterObjective ) ) ) { qs.AddConversation( new DuringWaterGatheringConversation() ); } else { obj = qs.FindObjective( typeof( ReturnAfterWaterObjective ) ); if ( obj != null && !obj.Completed ) { obj.Complete(); } else if ( qs.IsObjectiveInProgress( typeof( ProcessFungiObjective ) ) ) { qs.AddConversation( new DuringFungiProcessConversation() ); } else { obj = qs.FindObjective( typeof( GetRewardObjective ) ); if ( obj != null && !obj.Completed ) { if ( SolenMatriarchQuest.GiveRewardTo( player ) ) { obj.Complete(); } else { qs.AddConversation( new FullBackpackConversation( false ) ); } } } } } } else if ( SolenMatriarchQuest.IsFriend( player, this.RedSolen ) ) { QuestSystem newQuest = new SolenMatriarchQuest( player, this.RedSolen ); if ( player.Quest == null && QuestSystem.CanOfferQuest( player, typeof( SolenMatriarchQuest ) ) ) { newQuest.SendOffer(); } else { newQuest.AddConversation( new DontOfferConversation( true ) ); } } }
public override bool OnDragDrop( Mobile from, Item dropped ) { PlayerMobile player = from as PlayerMobile; if ( player != null ) { if ( dropped is Seed ) { SolenMatriarchQuest qs = player.Quest as SolenMatriarchQuest; if ( qs != null && qs.RedSolen == this.RedSolen ) { SayTo( player, 1054080 ); // Thank you for that plant seed. Those have such wonderful flavor. } else { QuestSystem newQuest = new SolenMatriarchQuest( player, this.RedSolen ); if ( player.Quest == null && QuestSystem.CanOfferQuest( player, typeof( SolenMatriarchQuest ) ) ) { newQuest.SendOffer(); } else { newQuest.AddConversation( new DontOfferConversation( SolenMatriarchQuest.IsFriend( player, this.RedSolen ) ) ); } } dropped.Delete(); return true; } else if ( dropped is ZoogiFungus ) { OnGivenFungi( player, (ZoogiFungus) dropped ); return dropped.Deleted; } } return base.OnDragDrop( from, dropped ); }