fixed NPC interaction
This commit is contained in:
@@ -438,7 +438,7 @@ public enum BuildingManager {
|
|||||||
|
|
||||||
public static boolean IsPlayerHostile(Building building, PlayerCharacter player) {
|
public static boolean IsPlayerHostile(Building building, PlayerCharacter player) {
|
||||||
|
|
||||||
if(building.getBlueprint().getBuildingGroup().equals(BuildingGroup.BANESTONE))
|
if(building.getBlueprint() != null && building.getBlueprint().getBuildingGroup() != null && building.getBlueprint().getBuildingGroup().equals(BuildingGroup.BANESTONE))
|
||||||
{
|
{
|
||||||
Guild playerNation = player.guild.getNation();
|
Guild playerNation = player.guild.getNation();
|
||||||
City banedCity = ZoneManager.getCityAtLocation(building.loc);
|
City banedCity = ZoneManager.getCityAtLocation(building.loc);
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ public class VendorDialogMsg extends ClientNetMsg {
|
|||||||
if (contract == null)
|
if (contract == null)
|
||||||
vd = VendorDialog.getHostileVendorDialog();
|
vd = VendorDialog.getHostileVendorDialog();
|
||||||
else if (npc.getBuilding() != null) {
|
else if (npc.getBuilding() != null) {
|
||||||
if (BuildingManager.IsPlayerHostile(npc.getBuilding(), playerCharacter))
|
if (npc.getBuilding() != null && BuildingManager.IsPlayerHostile(npc.getBuilding(), playerCharacter))
|
||||||
vd = VendorDialog.getHostileVendorDialog();
|
vd = VendorDialog.getHostileVendorDialog();
|
||||||
else
|
else
|
||||||
vd = contract.getVendorDialog();
|
vd = contract.getVendorDialog();
|
||||||
|
|||||||
Reference in New Issue
Block a user