Files
src-1.2/game/server/database/queries/proton_rifle_fix.sql
T
2014-01-17 07:03:16 -07:00

28 lines
557 B
SQL

declare
i number;
begin
select count(*) into i
from object_variable_names
where name = 'intWeaponType';
if i = 0 then
select max(id) into i
from object_variable_names;
insert into object_variable_names
values (i + 1, 'intWeaponType');
end if;
select min(id) into i
from object_variable_names
where name = 'intWeaponType';
insert into object_variables
select object_id, i as name_id, 0 as type, '1' as value, 0 as detached
from objects
where object_template_id = -635207508; -- object/weapon/ranged/rifle/rifle_proton.iff
end;
/