Issue information

Issue ID
#1553
Status
Working as Intended
Severity
None
Started
Hercules Elf Bot
May 22, 2008 18:35
Last Post
Hercules Elf Bot
Feb 21, 2012 9:19
Confirmation
N/A

Hercules Elf Bot - May 22, 2008 18:35

Originally posted by [b]weihung[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=1553

I've recently updated to a newer SVN from one that was before the rework of the WoE system. I noticed that castles are now spawning 1 extra chest compared to the old WoE system which only summoned 4 at 0 economy and 24 at 100.

The equation to calculate number of chests...
CODE
set .@Treasure,GetCastleData(strnpcinfo(2),2)/5+4;  // equals 4/24 at 0/100 economy

However in the summoning code it appears we're summoning at .@i=0 and going until .@i=.@Treasure. This means 5 chests at 0 economy and 25 at 100. Not really a huge deal, everyone loves extra treasure, except that only 24 coordinates are provided in the array of summoning coordinates. The 25th chest has been summoning randomly on the castle map for my server. I assume this is because it has no coordinates.


My fix was to alter the equation to take into account summoning at .@i=0...
CODE
set .@Treasure,GetCastleData(strnpcinfo(2),2)/5+3; // equals 3/23, but summons 4/24 at 0/100 economy

or add a 25th pair of coordinates to each castle if 5/25 is indeed official.


I also noticed the Novice WoE event was left out of the WoE system rework. I'm having trouble getting the novice manager script to function properly, but haven't investigated it completely yet. I guess I can repost if needed once I get the chance to look at it more.