Skip to content

Commit

Permalink
chore(creature-spawn.type): rename 'spawndist' to 'wander_distance' (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Kitzunu committed Apr 11, 2020
1 parent 08c6bb9 commit 92687ff
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
Expand Up @@ -93,12 +93,12 @@
<input [formControlName]="'spawntimesecs'" id="spawntimesecs" type="number" class="form-control form-control-sm">
</div>
<div class="form-group col-12 col-sm-6 col-md-4 col-lg-2 col-xl-2">
<label class="control-label" for="spawndist">spawndist</label>
<label class="control-label" for="wander_distance">wander_distance</label>
<i
class="fas fa-info-circle ml-1" [placement]="'auto'"
[tooltip]="SPAWN_DIST_TOOLTIP"
></i>
<input [formControlName]="'spawndist'" id="spawndist" type="number" class="form-control form-control-sm">
<input [formControlName]="'wander_distance'" id="wander_distance" type="number" class="form-control form-control-sm">
</div>
<div class="form-group col-12 col-sm-6 col-md-4 col-lg-2 col-xl-2">
<label class="control-label" for="currentwaypoint">currentwaypoint</label>
Expand Down Expand Up @@ -196,7 +196,7 @@
<ngx-datatable-column name="position_z" prop="position_z" [minWidth]="90"></ngx-datatable-column>
<ngx-datatable-column name="orient." prop="orientation" [minWidth]="90"></ngx-datatable-column>
<ngx-datatable-column name="Time" prop="spawntimesecs" [minWidth]="50"></ngx-datatable-column>
<ngx-datatable-column name="Dist" prop="spawndist" [minWidth]="42"></ngx-datatable-column>
<ngx-datatable-column name="Dist" prop="wander_distance" [minWidth]="42"></ngx-datatable-column>
<ngx-datatable-column name="CW" prop="currentwaypoint" [minWidth]="42"></ngx-datatable-column>
<ngx-datatable-column name="Movement" prop="MovementType" [minWidth]="42"></ngx-datatable-column>
<ngx-datatable-column name="npcFlags" prop="npcflag" [minWidth]="42"></ngx-datatable-column>
Expand Down
Expand Up @@ -87,7 +87,7 @@ describe('CreatureSpawn integration tests', () => {
expect(page.getInputById('position_z').disabled).toBe(true);
expect(page.getInputById('orientation').disabled).toBe(true);
expect(page.getInputById('spawntimesecs').disabled).toBe(true);
expect(page.getInputById('spawndist').disabled).toBe(true);
expect(page.getInputById('wander_distance').disabled).toBe(true);
expect(page.getInputById('currentwaypoint').disabled).toBe(true);
expect(page.getInputById('curhealth').disabled).toBe(true);
expect(page.getInputById('curmana').disabled).toBe(true);
Expand All @@ -111,7 +111,7 @@ describe('CreatureSpawn integration tests', () => {
const expectedQuery = 'DELETE FROM `creature` WHERE (`id` = 1234) AND (`guid` IN (0, 1, 2));\n' +
'INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, ' +
'`modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, ' +
'`spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES\n' +
'(0, 1234, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0),\n' +
'(1, 1234, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0),\n' +
Expand All @@ -137,15 +137,15 @@ describe('CreatureSpawn integration tests', () => {
'DELETE FROM `creature` WHERE (`id` = 1234) AND (`guid` IN (0));\n' +
'INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, ' +
'`modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, ' +
'`spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES\n' +
'(0, 1234, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0);'
);
page.expectFullQueryToContain(
'DELETE FROM `creature` WHERE (`id` = 1234);\n' +
'INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, ' +
'`modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, ' +
'`spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES\n' +
'(0, 1234, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0);'
);
Expand All @@ -155,15 +155,15 @@ describe('CreatureSpawn integration tests', () => {
'DELETE FROM `creature` WHERE (`id` = 1234) AND (`guid` IN (0));\n' +
'INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, ' +
'`modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, ' +
'`spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES\n' +
'(0, 1234, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0);'
);
page.expectFullQueryToContain(
'DELETE FROM `creature` WHERE (`id` = 1234);\n' +
'INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, ' +
'`modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, ' +
'`spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES\n' +
'(0, 1234, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0);'
);
Expand All @@ -173,15 +173,15 @@ describe('CreatureSpawn integration tests', () => {
'DELETE FROM `creature` WHERE (`id` = 1234) AND (`guid` IN (0));\n' +
'INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, ' +
'`modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, ' +
'`spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES\n' +
'(0, 1234, 1, 2, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0);'
);
page.expectFullQueryToContain(
'DELETE FROM `creature` WHERE (`id` = 1234);\n' +
'INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, ' +
'`modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, ' +
'`spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES\n' +
'(0, 1234, 1, 2, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0);'
);
Expand All @@ -191,15 +191,15 @@ describe('CreatureSpawn integration tests', () => {
'DELETE FROM `creature` WHERE (`id` = 1234) AND (`guid` IN (123));\n' +
'INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, ' +
'`modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, ' +
'`spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES\n' +
'(123, 1234, 1, 2, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0);'
);
page.expectFullQueryToContain(
'DELETE FROM `creature` WHERE (`id` = 1234);\n' +
'INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, ' +
'`modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, ' +
'`spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES\n' +
'(123, 1234, 1, 2, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0);'
);
Expand All @@ -216,7 +216,7 @@ describe('CreatureSpawn integration tests', () => {
page.expectFullQueryToContain('DELETE FROM `creature` WHERE (`id` = 1234);\n' +
'INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, ' +
'`modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, ' +
'`spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES\n' +
'(0, 1234, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0),\n' +
'(1, 1234, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0),\n' +
Expand All @@ -234,7 +234,7 @@ describe('CreatureSpawn integration tests', () => {
'DELETE FROM `creature` WHERE (`id` = 1234);\n' +
'INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, ' +
'`modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, ' +
'`spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES\n' +
'(0, 1234, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0),\n' +
'(2, 1234, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0);\n'
Expand All @@ -249,7 +249,7 @@ describe('CreatureSpawn integration tests', () => {
'DELETE FROM `creature` WHERE (`id` = 1234);\n' +
'INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, ' +
'`modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, ' +
'`spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES\n' +
'(0, 1234, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0);'
);
Expand All @@ -273,7 +273,7 @@ describe('CreatureSpawn integration tests', () => {
'DELETE FROM `creature` WHERE (`id` = 1234) AND (`guid` IN (1, 2));\n' +
'INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, ' +
'`modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, ' +
'`spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES\n' +
'(1, 1234, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0),\n' +
'(2, 1234, 0, 2, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0);'
Expand All @@ -282,7 +282,7 @@ describe('CreatureSpawn integration tests', () => {
'DELETE FROM `creature` WHERE (`id` = 1234);\n' +
'INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, ' +
'`modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, ' +
'`spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES\n' +
'(0, 1234, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0),\n' +
'(1, 1234, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0),\n' +
Expand All @@ -305,7 +305,7 @@ describe('CreatureSpawn integration tests', () => {
'DELETE FROM `creature` WHERE (`id` = 1234) AND (`guid` IN (1, 2, 3));\n' +
'INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, ' +
'`modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, ' +
'`spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES\n' +
'(1, 1234, 0, 10, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0),\n' +
'(3, 1234, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0);'
Expand All @@ -314,7 +314,7 @@ describe('CreatureSpawn integration tests', () => {
'DELETE FROM `creature` WHERE (`id` = 1234);\n' +
'INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, ' +
'`modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, ' +
'`spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, ' +
'`dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES\n' +
'(0, 1234, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0),\n' +
'(1, 1234, 0, 10, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0),\n' +
Expand Down Expand Up @@ -352,12 +352,12 @@ describe('CreatureSpawn integration tests', () => {

page.expectDiffQueryToContain(
'DELETE FROM `creature` WHERE (`id` = 1234) AND (`guid` IN (0));\n' +
'INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES\n' +
'INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES\n' +
'(0, 1234, 123, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0);'
);
page.expectFullQueryToContain(
'DELETE FROM `creature` WHERE (`id` = 1234);\n' +
'INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES\n' +
'INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES\n' +
'(0, 1234, 123, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0),\n' +
'(1, 1234, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0),\n' +
'(2, 1234, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 120, 0, 0, 1, 0, 0, 0, 0, 0, \'\', 0);\n'
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/types/creature-spawn.type.ts
Expand Up @@ -19,7 +19,7 @@ export class CreatureSpawn extends TableRow {
position_z: number = 0;
orientation: number = 0;
spawntimesecs: number = 120;
spawndist: number = 0;
wander_distance: number = 0;
currentwaypoint: number = 0;
curhealth: number = 1;
curmana: number = 0;
Expand Down

0 comments on commit 92687ff

Please sign in to comment.