diff --git a/src/game/Object/CreatureEventAIMgr.cpp b/src/game/Object/CreatureEventAIMgr.cpp index dc8edcf02..d5f431dab 100644 --- a/src/game/Object/CreatureEventAIMgr.cpp +++ b/src/game/Object/CreatureEventAIMgr.cpp @@ -1042,7 +1042,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() } break; - case ACTION_T_SUMMON_UNIQUE: //47 + case ACTION_T_SUMMON_UNIQUE: //49 if (!sCreatureStorage.LookupEntry(action.summon_unique.creatureId)) { sLog.outErrorEventAI("Event %u Action %u uses nonexistent creature entry %u.", i, j + 1, action.summon_unique.creatureId); diff --git a/src/game/Object/Object.cpp b/src/game/Object/Object.cpp index bda9476e8..938afb376 100644 --- a/src/game/Object/Object.cpp +++ b/src/game/Object/Object.cpp @@ -1755,7 +1755,9 @@ void WorldObject::SetMap(Map* map) #ifdef ENABLE_ELUNA if (!elunaEvents) + { elunaEvents = new ElunaEventProcessor(&Eluna::GEluna, this); + } #endif } diff --git a/src/game/Object/Player.cpp b/src/game/Object/Player.cpp index 0cb9fff4c..aa2067eed 100644 --- a/src/game/Object/Player.cpp +++ b/src/game/Object/Player.cpp @@ -2913,7 +2913,9 @@ void Player::SetLevel(uint32 level) { uint8 oldLevel = getLevel(); if (level == oldLevel || level > DEFAULT_MAX_LEVEL) + { return; + } SetUInt32Value(UNIT_FIELD_LEVEL, level); SetUInt32Value(PLAYER_XP, 0); diff --git a/src/game/WorldHandlers/MiscHandler.cpp b/src/game/WorldHandlers/MiscHandler.cpp index cbaea3fdc..f021104ec 100644 --- a/src/game/WorldHandlers/MiscHandler.cpp +++ b/src/game/WorldHandlers/MiscHandler.cpp @@ -1484,7 +1484,9 @@ void WorldSession::SetMoneyHandler(WorldPacket &msg) msg >> money; if (money < 0) + { money = 0x7FFFFFFF; /* Money limit */ + } DEBUG_LOG("Setting money on %s from %d to %d", pPlayer->GetName(), pPlayer->GetMoney(), money); /*TODO: Log this appropriately*/ GetPlayer()->SetMoney(money); diff --git a/src/shared/Utilities/Util.cpp b/src/shared/Utilities/Util.cpp index b3cc422e8..d6a42a40a 100644 --- a/src/shared/Utilities/Util.cpp +++ b/src/shared/Utilities/Util.cpp @@ -523,7 +523,9 @@ size_t utf8limit(std::string& utf8str, size_t bytes) // Fix UTF8 if it was corrupted by bytes truncated if (itr != end) + { bytes = std::distance(utf8str.cbegin(), itr); + } utf8str.resize(bytes); utf8str.shrink_to_fit(); diff --git a/src/tools/Extractor_Binaries/MoveMapGen.sh b/src/tools/Extractor_Binaries/MoveMapGen.sh index 2c0305f8a..fba6ebd53 100644 --- a/src/tools/Extractor_Binaries/MoveMapGen.sh +++ b/src/tools/Extractor_Binaries/MoveMapGen.sh @@ -56,9 +56,9 @@ MAP_LIST_A="1 37 543 595 289 572 529 562 531 269 47 649 650 599 548 559 429 230 MAP_LIST_B="571 628 560 509 723 532 607 600 668 33 585 566 389 601 369 129 550 189 542 70 109 554 632 552 555 540 598 450 558 249 35 624 557" MAP_LIST_C="0 631 609 534 533 619 469 602 329 580 615 578 36 556 44 565 544 34 617 608 618 449 616 42 451 582 584 586 587 588 589 590 591 592" MAP_LIST_D="530 169 575 603 309 574 30 564 568 209 724 658 489 593 594 596 597 605 606 610 612 613 614 620 621 622 623 641 642 647 672 673 712 713 718" -MAP_LIST_D1="209 724 658 489 606 610 612 613 614 620 621" -MAP_LIST_D2="169 575 603 309 574 30 564 568 622 623 641 642 647 672 673 712 713 718" -MAP_LIST_D3="530 593 594 596 597 605" +MAP_LIST_D1="209 724 658 489 606 610 612 613 614 620 621 725 726 727 728 730 731 755 757 759 760 761 762 861 930 938 939 940 951" +MAP_LIST_D2="169 575 603 309 574 30 564 568 622 623 641 642 647 672 673 712 713 718 763 764 765 766 767 859 967 968 974 977 980" +MAP_LIST_D3="530 593 594 596 597 605 732 734 736 738 739 740 741 742 743 746 747 748 749 750 751 752 753 754" badParam() { diff --git a/src/tools/Extractor_Binaries/mmap_extract.py b/src/tools/Extractor_Binaries/mmap_extract.py index beb460038..7f0b9b854 100644 --- a/src/tools/Extractor_Binaries/mmap_extract.py +++ b/src/tools/Extractor_Binaries/mmap_extract.py @@ -50,7 +50,7 @@ def run(self): cFlags = 0 binName = "./mmap-extractor" if self.mapID == 0: - retcode = subprocess.call([binName, "%u" % (self.mapID), "--silent", "--offMeshInput", "offmesh.txt"], startupinfo=stInfo, creationflags=cFlags) + retcode = subprocess.call([binName, "%u" % (self.mapID), "--silent", "--offMeshInput", "offmesh.txt"], startupinfo=stInfo, creationflags=cFlags) else: retcode = subprocess.call([binName, "%u" % (self.mapID), "--silent"], startupinfo=stInfo, creationflags=cFlags) print "-- %s" % (name)