Cleaned up the mapflag system (#2943)

* Created setter and getter functions.
* Adjusted all calls to use these functions.
* Converted mapflags to C++ map container.
* Converted drop_list to vector.
* Converted skill_damage ERS into vector and increased limit from UINT8 to UINT16.
* Cleaned up several functions to be more dynamic to reduce redundancy that was all over the place.
* Renamed nosumstarmiracle to nosunmoonstarmiracle.
* Adjusted skill_damage mapflag to use proper defined constants.
* Refactored map index into a vector.
Thanks to @Lemongrass3110 for a lot of help and @secretdataz!
This commit is contained in:
Aleos
2018-07-18 20:00:33 -04:00
committed by GitHub
parent bbe552d1d3
commit a942853d55
29 changed files with 1306 additions and 1434 deletions

View File

@@ -400,9 +400,9 @@ int chrif_sendmap(int fd) {
ShowStatus("Sending maps to char server...\n");
// Sending normal maps, not instances
WFIFOHEAD(fd, 4 + instance_start * 4);
WFIFOHEAD(fd, 4 + map.size() * 4);
WFIFOW(fd,0) = 0x2afa;
for(i = 0; i < instance_start; i++)
for(i = 0; i < map.size(); i++)
WFIFOW(fd,4+i*4) = map[i].index;
WFIFOW(fd,2) = 4 + i * 4;
WFIFOSET(fd,WFIFOW(fd,2));