Fixes null propogation
This commit is contained in:
parent
22ab83ea9e
commit
3c9842ee5a
218 changed files with 799 additions and 1458 deletions
|
|
@ -52,20 +52,17 @@ namespace Server.Targets
|
|||
{
|
||||
PlayerMobile player = from as PlayerMobile;
|
||||
|
||||
if ( player != null )
|
||||
QuestSystem qs = player?.Quest;
|
||||
|
||||
if ( qs is WitchApprenticeQuest )
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
FindIngredientObjective obj = qs.FindObjective( typeof( FindIngredientObjective ) ) as FindIngredientObjective;
|
||||
|
||||
if ( qs is WitchApprenticeQuest )
|
||||
if ( obj != null && !obj.Completed && obj.Ingredient == Ingredient.RedMushrooms )
|
||||
{
|
||||
FindIngredientObjective obj = qs.FindObjective( typeof( FindIngredientObjective ) ) as FindIngredientObjective;
|
||||
|
||||
if ( obj != null && !obj.Completed && obj.Ingredient == Ingredient.RedMushrooms )
|
||||
{
|
||||
player.SendLocalizedMessage( 1055036 ); // You slice a red cap mushroom from its stem.
|
||||
obj.Complete();
|
||||
return;
|
||||
}
|
||||
player.SendLocalizedMessage( 1055036 ); // You slice a red cap mushroom from its stem.
|
||||
obj.Complete();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue