Fixed probable CastleChamberlain NPE caused by missing fort id.
This commit is contained in:
parent
64a65e5a67
commit
2973d4e4df
@ -420,6 +420,10 @@ public final class CastleChamberlain extends AbstractNpcAI
|
|||||||
for (int id : fort)
|
for (int id : fort)
|
||||||
{
|
{
|
||||||
final Fort fortress = FortManager.getInstance().getFortById(id);
|
final Fort fortress = FortManager.getInstance().getFortById(id);
|
||||||
|
if (fortress == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
final int fortId = fortress.getResidenceId();
|
final int fortId = fortress.getResidenceId();
|
||||||
final String fortType = (fortId < 112) ? "1300133" : "1300134";
|
final String fortType = (fortId < 112) ? "1300133" : "1300134";
|
||||||
final String fortStatus;
|
final String fortStatus;
|
||||||
|
@ -420,6 +420,10 @@ public final class CastleChamberlain extends AbstractNpcAI
|
|||||||
for (int id : fort)
|
for (int id : fort)
|
||||||
{
|
{
|
||||||
final Fort fortress = FortManager.getInstance().getFortById(id);
|
final Fort fortress = FortManager.getInstance().getFortById(id);
|
||||||
|
if (fortress == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
final int fortId = fortress.getResidenceId();
|
final int fortId = fortress.getResidenceId();
|
||||||
final String fortType = (fortId < 112) ? "1300133" : "1300134";
|
final String fortType = (fortId < 112) ? "1300133" : "1300134";
|
||||||
final String fortStatus;
|
final String fortStatus;
|
||||||
|
@ -420,6 +420,10 @@ public final class CastleChamberlain extends AbstractNpcAI
|
|||||||
for (int id : fort)
|
for (int id : fort)
|
||||||
{
|
{
|
||||||
final Fort fortress = FortManager.getInstance().getFortById(id);
|
final Fort fortress = FortManager.getInstance().getFortById(id);
|
||||||
|
if (fortress == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
final int fortId = fortress.getResidenceId();
|
final int fortId = fortress.getResidenceId();
|
||||||
final String fortType = (fortId < 112) ? "1300133" : "1300134";
|
final String fortType = (fortId < 112) ? "1300133" : "1300134";
|
||||||
final String fortStatus;
|
final String fortStatus;
|
||||||
|
@ -420,6 +420,10 @@ public final class CastleChamberlain extends AbstractNpcAI
|
|||||||
for (int id : fort)
|
for (int id : fort)
|
||||||
{
|
{
|
||||||
final Fort fortress = FortManager.getInstance().getFortById(id);
|
final Fort fortress = FortManager.getInstance().getFortById(id);
|
||||||
|
if (fortress == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
final int fortId = fortress.getResidenceId();
|
final int fortId = fortress.getResidenceId();
|
||||||
final String fortType = (fortId < 112) ? "1300133" : "1300134";
|
final String fortType = (fortId < 112) ? "1300133" : "1300134";
|
||||||
final String fortStatus;
|
final String fortStatus;
|
||||||
|
@ -420,6 +420,10 @@ public final class CastleChamberlain extends AbstractNpcAI
|
|||||||
for (int id : fort)
|
for (int id : fort)
|
||||||
{
|
{
|
||||||
final Fort fortress = FortManager.getInstance().getFortById(id);
|
final Fort fortress = FortManager.getInstance().getFortById(id);
|
||||||
|
if (fortress == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
final int fortId = fortress.getResidenceId();
|
final int fortId = fortress.getResidenceId();
|
||||||
final String fortType = (fortId < 112) ? "1300133" : "1300134";
|
final String fortType = (fortId < 112) ? "1300133" : "1300134";
|
||||||
final String fortStatus;
|
final String fortStatus;
|
||||||
|
@ -420,6 +420,10 @@ public final class CastleChamberlain extends AbstractNpcAI
|
|||||||
for (int id : fort)
|
for (int id : fort)
|
||||||
{
|
{
|
||||||
final Fort fortress = FortManager.getInstance().getFortById(id);
|
final Fort fortress = FortManager.getInstance().getFortById(id);
|
||||||
|
if (fortress == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
final int fortId = fortress.getResidenceId();
|
final int fortId = fortress.getResidenceId();
|
||||||
final String fortType = (fortId < 112) ? "1300133" : "1300134";
|
final String fortType = (fortId < 112) ? "1300133" : "1300134";
|
||||||
final String fortStatus;
|
final String fortStatus;
|
||||||
|
@ -420,6 +420,10 @@ public final class CastleChamberlain extends AbstractNpcAI
|
|||||||
for (int id : fort)
|
for (int id : fort)
|
||||||
{
|
{
|
||||||
final Fort fortress = FortManager.getInstance().getFortById(id);
|
final Fort fortress = FortManager.getInstance().getFortById(id);
|
||||||
|
if (fortress == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
final int fortId = fortress.getResidenceId();
|
final int fortId = fortress.getResidenceId();
|
||||||
final String fortType = (fortId < 112) ? "1300133" : "1300134";
|
final String fortType = (fortId < 112) ? "1300133" : "1300134";
|
||||||
final String fortStatus;
|
final String fortStatus;
|
||||||
|
@ -420,6 +420,10 @@ public final class CastleChamberlain extends AbstractNpcAI
|
|||||||
for (int id : fort)
|
for (int id : fort)
|
||||||
{
|
{
|
||||||
final Fort fortress = FortManager.getInstance().getFortById(id);
|
final Fort fortress = FortManager.getInstance().getFortById(id);
|
||||||
|
if (fortress == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
final int fortId = fortress.getResidenceId();
|
final int fortId = fortress.getResidenceId();
|
||||||
final String fortType = (fortId < 112) ? "1300133" : "1300134";
|
final String fortType = (fortId < 112) ? "1300133" : "1300134";
|
||||||
final String fortStatus;
|
final String fortStatus;
|
||||||
|
@ -420,6 +420,10 @@ public final class CastleChamberlain extends AbstractNpcAI
|
|||||||
for (int id : fort)
|
for (int id : fort)
|
||||||
{
|
{
|
||||||
final Fort fortress = FortManager.getInstance().getFortById(id);
|
final Fort fortress = FortManager.getInstance().getFortById(id);
|
||||||
|
if (fortress == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
final int fortId = fortress.getResidenceId();
|
final int fortId = fortress.getResidenceId();
|
||||||
final String fortType = (fortId < 112) ? "1300133" : "1300134";
|
final String fortType = (fortId < 112) ? "1300133" : "1300134";
|
||||||
final String fortStatus;
|
final String fortStatus;
|
||||||
|
@ -420,6 +420,10 @@ public final class CastleChamberlain extends AbstractNpcAI
|
|||||||
for (int id : fort)
|
for (int id : fort)
|
||||||
{
|
{
|
||||||
final Fort fortress = FortManager.getInstance().getFortById(id);
|
final Fort fortress = FortManager.getInstance().getFortById(id);
|
||||||
|
if (fortress == null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
final int fortId = fortress.getResidenceId();
|
final int fortId = fortress.getResidenceId();
|
||||||
final String fortType = (fortId < 112) ? "1300133" : "1300134";
|
final String fortType = (fortId < 112) ? "1300133" : "1300134";
|
||||||
final String fortStatus;
|
final String fortStatus;
|
||||||
|
Loading…
Reference in New Issue
Block a user