Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DROP FUNCTION IF EXISTS f_createGuildClaim;
- CREATE FUNCTION `f_createGuildClaim`(
- `inGuildID` INT UNSIGNED,
- `inCenterGeoID` INT UNSIGNED,
- `inRadius` INT UNSIGNED
- )
- RETURNS INT UNSIGNED
- BEGIN
- DECLARE newGuildLandID, newClaimID INT UNSIGNED DEFAULT NULL;
- INSERT INTO guild_lands(`GuildID`, `CenterGeoID`, `Radius`, `LandType`)
- VALUES (inGuildID, inCenterGeoID, inRadius, 1/*core*/);
- SET newGuildLandID =LAST_INSERT_ID();
- INSERT INTO claims(`GuildLandID`, `SupportPoints`)
- VALUES (newGuildLandID, 0);
- SET newClaimID =LAST_INSERT_ID();
- RETURN newClaimID;
- END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement