Created
January 22, 2015 21:53
-
-
Save DDuarte/acf191ac3bbe1581ac50 to your computer and use it in GitHub Desktop.
Fix max_limit = 0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/server/game/Pools/PoolMgr.cpp b/src/server/game/Pools/PoolMgr.cpp | |
index 257c279..a37ce41 100644 | |
--- a/src/server/game/Pools/PoolMgr.cpp | |
+++ b/src/server/game/Pools/PoolMgr.cpp | |
@@ -315,6 +315,11 @@ template <class T> | |
void PoolGroup<T>::SpawnObject(ActivePoolData& spawns, uint32 limit, uint64 triggerFrom) | |
{ | |
uint32 lastDespawned = 0; | |
+ | |
+ // If limit is 0 try to spawn everything | |
+ if (limit == 0) | |
+ limit = EqualChanced.size() + ExplicitlyChanced.size(); | |
+ | |
int count = limit - spawns.GetActiveObjectCount(poolId); | |
// If triggered from some object respawn this object is still marked as spawned |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment