Sync with L2jServer HighFive May 19th 2015.

This commit is contained in:
MobiusDev
2015-05-19 14:57:13 +00:00
parent 0337dd64a2
commit 6b9ed81821
17 changed files with 146 additions and 124 deletions

View File

@ -564,27 +564,28 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine
}
}
}
else if (event.startsWith("getItem"))
{
if (!_pendingItemToGet.containsKey(clan))
{
html = "yeti_cannot_exchange.htm";
}
int left = _pendingItemToGet.get(clan);
if (left > 0)
{
int itemId = Integer.parseInt(event.split("_")[1]);
player.addItem("Rainbow Spring Chateau Siege", itemId, 1, npc, true);
--left;
_pendingItemToGet.put(clan, left);
html = "yeti_main.htm";
}
else
{
html = "yeti_cannot_exchange.htm";
}
}
// TODO(Zoey76): Rewrite this to prevent exploits...
// else if (event.startsWith("getItem"))
// {
// if (!_pendingItemToGet.containsKey(clan))
// {
// html = "yeti_cannot_exchange.htm";
// }
//
// int left = _pendingItemToGet.get(clan);
// if (left > 0)
// {
// int itemId = Integer.parseInt(event.split("_")[1]);
// player.addItem("Rainbow Spring Chateau Siege", itemId, 1, npc, true);
// --left;
// _pendingItemToGet.put(clan, left);
// html = "yeti_main.htm";
// }
// else
// {
// html = "yeti_cannot_exchange.htm";
// }
// }
return html;
}