refactor: alliance and Embassy mechanics refactoring, stage 2 of 3

Everything is now prepared for the last stage, where the code to handle
Embassy destruction during a battle will be added and tested :)

A few Embassy-demolition-related issues have been ironed-out in this
commit as well.
This commit is contained in:
Martin Ambrus
2017-11-01 00:16:52 +01:00
parent 6bee5aa62e
commit c9038e20b8
7 changed files with 370 additions and 84 deletions
+4 -2
View File
@@ -174,7 +174,8 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%allimedal` (
`img` varchar(255) NULL,
`del` tinyint(1) NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `week` (`week`)
KEY `week` (`week`),
KEY `allyid` (`allyid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
@@ -309,7 +310,8 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%ali_permission` (
`opt7` int(1) NULL DEFAULT '0',
`opt8` int(1) NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `uid-alliance` (`uid`, `alliance`)
UNIQUE KYE `uid-alliance` (`uid`, `alliance`) USING BTREE,
KEY `alliance` (`alliance`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
--