Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pool respawn problem #28524

Open
Jildor opened this issue Nov 12, 2022 · 0 comments
Open

Pool respawn problem #28524

Jildor opened this issue Nov 12, 2022 · 0 comments

Comments

@Jildor
Copy link
Contributor

Jildor commented Nov 12, 2022

Description

We have a problem with pools, to recreate the problem I have copied the same functioning of pools in gameobjects that is in northrend with mining Deposits with this sql in map 13 (testing)

SQL pools
SET @RANGE                 := 3;
SET @SARONITE_GUID         := 2136907;
SET @SARONITE_RICH_GUID    := @SARONITE_GUID + @RANGE;
SET @TITANIUM_GUID         := @SARONITE_RICH_GUID + @RANGE;
SET @POOL                  := 70000;
SET @LASTGUID              := 9;
SET @CHANCE1               := 75;
SET @CHANCE2               := 15;
SET @CHANCE3               := 10;
SET @MOTHER                := 70100;
SET @ACTIVE                := 2;  -- Max number of active spawns
SET @TIMER                 := 7;  -- Respawn timer in seconds
SET @SARONITE_ENTRY        := 189980;
SET @SARONITE_RICH_ENTRY   := 189981;
SET @TITANIUM_ENTRY        := 191133;

DELETE FROM `gameobject` WHERE `guid` BETWEEN @SARONITE_GUID AND @SARONITE_GUID+@LASTGUID;
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`) VALUES
(@SARONITE_GUID+0,@SARONITE_ENTRY,'13','0','0','1','1','-0.302505','-8.91162','-144.709','3.14247','-0','-0','-1','0.000438495',@TIMER,'255','1','','0'),
(@SARONITE_RICH_GUID+0,@SARONITE_RICH_ENTRY,'13','0','0','1','1','-0.302505','-8.91162','-144.709','3.14247','-0','-0','-1','0.000438495',@TIMER,'255','1','','0'),
(@TITANIUM_GUID+0,@TITANIUM_ENTRY,'13','0','0','1','1','-0.302505','-8.91162','-144.709','3.14247','-0','-0','-1','0.000438495',@TIMER,'255','1','','0'),
(@SARONITE_GUID+1,@SARONITE_ENTRY,'13','0','0','1','1','-0.310905','0.666893','-144.709','3.14247','-0','-0','-1','0.000438495',@TIMER,'255','1','','0'),
(@SARONITE_RICH_GUID+1,@SARONITE_RICH_ENTRY,'13','0','0','1','1','-0.310905','0.666893','-144.709','3.14247','-0','-0','-1','0.000438495',@TIMER,'255','1','','0'),
(@TITANIUM_GUID+1,@TITANIUM_ENTRY,'13','0','0','1','1','-0.310905','0.666893','-144.709','3.14247','-0','-0','-1','0.000438495',@TIMER,'255','1','','0'),
(@SARONITE_GUID+2,@SARONITE_ENTRY,'13','0','0','1','1','-0.318529','9.36089','-144.709','3.14247','-0','-0','-1','0.000438495',@TIMER,'255','1','','0'),
(@SARONITE_RICH_GUID+2,@SARONITE_RICH_ENTRY,'13','0','0','1','1','-0.318529','9.36089','-144.709','3.14247','-0','-0','-1','0.000438495',@TIMER,'255','1','','0'),
(@TITANIUM_GUID+2,@TITANIUM_ENTRY,'13','0','0','1','1','-0.318529','9.36089','-144.709','3.14247','-0','-0','-1','0.000438495',@TIMER,'255','1','','0');

DELETE FROM `pool_members` WHERE `spawnId` BETWEEN @SARONITE_GUID+0 AND @SARONITE_GUID+@LASTGUID AND `type`=1;
INSERT INTO `pool_members` (`type`, `spawnId`, `poolSpawnId`, `chance`,`description`) VALUES
(1,@SARONITE_GUID+0,@POOL+0,@CHANCE1,'test'),
(1,@SARONITE_RICH_GUID+0,@POOL+0,@CHANCE2,'test'),
(1,@TITANIUM_GUID+0,@POOL+0,@CHANCE3,'test'),
(1,@SARONITE_GUID+1,@POOL+1,@CHANCE1,'test'),
(1,@SARONITE_RICH_GUID+1,@POOL+1,@CHANCE2,'test'),
(1,@TITANIUM_GUID+1,@POOL+1,@CHANCE3,'test'),
(1,@SARONITE_GUID+2,@POOL+2,@CHANCE1,'test'),
(1,@SARONITE_RICH_GUID+2,@POOL+2,@CHANCE2,'test'),
(1,@TITANIUM_GUID+2,@POOL+2,@CHANCE3,'test');

DELETE FROM `pool_template` WHERE `entry` BETWEEN @POOL+0 AND @POOL+3;
INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
(@POOL+0,1,'test'),
(@POOL+1,1,'test'),
(@POOL+2,1,'test');

DELETE FROM `pool_template` WHERE `entry`=@MOTHER;
INSERT INTO `pool_template` (`entry`, `max_limit`, `description`) VALUES
(@MOTHER,@ACTIVE,'test');

DELETE FROM `pool_members` WHERE `spawnId` BETWEEN @POOL+0 AND @POOL+3 AND `type`=2;
INSERT INTO `pool_members` (`type`, `spawnId`, `poolSpawnId`, `chance`,`description`) VALUES
(2,@POOL+0,@MOTHER,0,'test'),
(2,@POOL+1,@MOTHER,0,'test'),
(2,@POOL+2,@MOTHER,0,'test');

Problem seems when gameobject in pool respawn can only appear in one not in a non-repeated pool position or something like that, each time the number of pools that appear decreases by half.
Problem happens after this commit: c8ca488

this is the result with that sql with commit: c8ca488
https://imgur.com/a/xpU0GCM
https://imgur.com/a/Zn6adVY
https://imgur.com/a/zaHPbUk

and this is the result with that sql reverting this commit: c8ca488
https://imgur.com/a/pbNrxKl

Expected behaviour

Pools should keep respawning

Steps to reproduce the problem

  1. Apply sql, learn mining profession and do .setskill 186 450 450
  2. do .tele test, get mining pick (.add 2901) and equip it
  3. Start mining deposits and check it

Branch

3.3.5

TC rev. hash/commit

69dda64

Operating system

Debian 11

Custom changes

None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant