Changeset 2411

User picture

Author: Sarynth

(2010/06/28 19:14) Over 1 year ago

[1.9 branch] Basic Siege Information support
 - New Packet that controls many Siege aspects. (Thanks Rhys2002!)
 - Siege Location data xml from client. (Thanks Tomate!)
 - //siege admin command with many features.
 - siege.properties to disable siege functions.
 - Be sure to update database with sql/au_server_gs.sql
 - Abyss Teleporter locations unlocked with the new packet but destinations currently bugged.
 

Affected files

Updated branches/1.9/config/administration/admin.properties Download diff

24102411
97
# Kill target
97
# Kill target
98
gameserver.administration.command.kill = 3
98
gameserver.administration.command.kill = 3
99
99
100
# Legion command allows you to disband/setlevel/setpoints of a legion
101
gameserver.administration.command.legion = 3
102
100
# Move player1 to player2 location
103
# Move player1 to player2 location
101
gameserver.administration.command.moveplayertoplayer = 3
104
gameserver.administration.command.moveplayertoplayer = 3
102
105
...
...
115
# The message is sent to all players chatbox and a message appear in center screen
118
# The message is sent to all players chatbox and a message appear in center screen
116
gameserver.administration.command.notice = 3
119
gameserver.administration.command.notice = 3
117
120
121
# Playerinfo command
122
gameserver.administration.command.playerinfo = 3
123
124
# Prison command
125
gameserver.administration.command.prison = 3
126
118
# Give admin rights to player
127
# Give admin rights to player
119
gameserver.administration.command.promote = 3
128
gameserver.administration.command.promote = 3
120
129
...
...
127
# Reload all spawn data from files
136
# Reload all spawn data from files
128
gameserver.administration.command.reloadspawns = 3
137
gameserver.administration.command.reloadspawns = 3
129
138
139
# Remove command allow remove an item from player
140
gameserver.administration.command.remove = 3
141
130
# Resurrect a target player
142
# Resurrect a target player
131
gameserver.administration.command.resurrect = 3
143
gameserver.administration.command.resurrect = 3
132
144
...
...
155
# Set title target player title
167
# Set title target player title
156
gameserver.administration.command.settitle = 3
168
gameserver.administration.command.settitle = 3
157
169
170
# Modify current siege values
171
gameserver.administration.command.siege = 3
172
158
# Self explanatory
173
# Self explanatory
159
gameserver.administration.command.spawnnpc = 3
174
gameserver.administration.command.spawnnpc = 3
160
175
...
...
174
gameserver.administration.command.weather = 3
189
gameserver.administration.command.weather = 3
175
190
176
# Prints zone info (//zone) or refreshes currect zone (//zone refresh)
191
# Prints zone info (//zone) or refreshes currect zone (//zone refresh)
177
gameserver.administration.command.zone = 3
192
gameserver.administration.command.zone = 3
178
179
# Legion command allows you to disband/setlevel/setpoints of a legion
180
gameserver.administration.command.legion = 3
181
182
# Remove command allow remove an item from player
183
gameserver.administration.command.remove = 3
184
185
# Playerinfo command
186
gameserver.administration.command.playerinfo = 3
187
188
# Prison command
189
gameserver.administration.command.prison = 3

Added branches/1.9/config/main/siege.properties

Show contents

Added branches/1.9/data/scripts/system/database/mysql5/MySQL5SiegeDAO.java

Show contents

Added branches/1.9/data/scripts/system/handlers/admincommands/Siege.java

Show contents

Added branches/1.9/data/static_data/siege/siege_locations.xml

Show contents

Added branches/1.9/data/static_data/siege/siege_locations.xsd

Show contents

Updated branches/1.9/data/static_data/static_data.xml Download diff

24102411
153
	<pet_skill_templates>
153
	<pet_skill_templates>
154
		<import file="pet_skills" skipRoot="true"/>
154
		<import file="pet_skills" skipRoot="true"/>
155
	</pet_skill_templates>
155
	</pet_skill_templates>
156
156
	
157
	<siege_locations>
158
		<import file="siege/siege_locations.xml" skipRoot="true"/>
159
	</siege_locations>
157
</ae_static_data>
160
</ae_static_data>

Updated branches/1.9/data/static_data/static_data.xsd Download diff

24102411
32
	<xs:include schemaLocation="item_sets/item_sets.xsd" />
32
	<xs:include schemaLocation="item_sets/item_sets.xsd" />
33
	<xs:include schemaLocation="npc_skills/npc_skills.xsd" />
33
	<xs:include schemaLocation="npc_skills/npc_skills.xsd" />
34
	<xs:include schemaLocation="pet_skills/pet_skills.xsd" />
34
	<xs:include schemaLocation="pet_skills/pet_skills.xsd" />
35
	<xs:include schemaLocation="siege/siege_locations.xsd" />
35
	
36
	
36
	<xs:element name="ae_static_data">
37
	<xs:element name="ae_static_data">
37
		<xs:complexType>
38
		<xs:complexType>
...
...
66
				<xs:element ref="item_sets" minOccurs="0" />
67
				<xs:element ref="item_sets" minOccurs="0" />
67
				<xs:element ref="npc_skill_templates" minOccurs="0" />
68
				<xs:element ref="npc_skill_templates" minOccurs="0" />
68
				<xs:element ref="pet_skill_templates" minOccurs="0" />
69
				<xs:element ref="pet_skill_templates" minOccurs="0" />
70
				<xs:element ref="siege_locations" minOccurs="0" />
69
			</xs:sequence>
71
			</xs:sequence>
70
		</xs:complexType>
72
		</xs:complexType>
71
	</xs:element>
73
	</xs:element>

Updated branches/1.9/sql/au_server_gs.sql Download diff

24102411
430
  `mp` INT(11) NOT NULL DEFAULT 1 ,
430
  `mp` INT(11) NOT NULL DEFAULT 1 ,
431
  `fp` INT(11) NOT NULL DEFAULT 1 ,
431
  `fp` INT(11) NOT NULL DEFAULT 1 ,
432
  PRIMARY KEY (`player_id`) )
432
  PRIMARY KEY (`player_id`) )
433
ENGINE = MyISAM DEFAULT CHARSET=UTF8;
433
ENGINE = MyISAM DEFAULT CHARSET=UTF8;
434
435
436
-- ----------------------------
437
-- `siege_locations`
438
-- ----------------------------
439
440
CREATE TABLE IF NOT EXISTS `siege_locations` (
441
  `id` int(11) NOT NULL,
442
  `race` enum('ELYOS', 'ASMODIANS', 'BALAUR') NOT NULL,
443
  `legion_id` int (11) NOT NULL,
444
  PRIMARY KEY(`id`)
445
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Updated branches/1.9/src/com/aionemu/gameserver/configs/administration/AdminConfig.java Download diff

24102411
89
	@Property(key = "gameserver.administration.command.kill", defaultValue = "3")
89
	@Property(key = "gameserver.administration.command.kill", defaultValue = "3")
90
	public static int	COMMAND_KILL;
90
	public static int	COMMAND_KILL;
91
91
92
	@Property(key = "gameserver.administration.command.legion", defaultValue = "3")
93
	public static int	COMMAND_LEGION;
94
	
92
	@Property(key = "gameserver.administration.command.moveplayertoplayer", defaultValue = "3")
95
	@Property(key = "gameserver.administration.command.moveplayertoplayer", defaultValue = "3")
93
	public static int	COMMAND_MOVEPLAYERTOPLAYER;
96
	public static int	COMMAND_MOVEPLAYERTOPLAYER;
94
97
...
...
107
	@Property(key = "gameserver.administration.command.notice", defaultValue = "3")
110
	@Property(key = "gameserver.administration.command.notice", defaultValue = "3")
108
	public static int	COMMAND_NOTICE;
111
	public static int	COMMAND_NOTICE;
109
112
113
	@Property(key = "gameserver.administration.command.playerinfo", defaultValue = "3")
114
	public static int	COMMAND_PLAYERINFO;
115
116
	@Property(key = "gameserver.administration.command.prison", defaultValue = "3")
117
	public static int	COMMAND_PRISON;
118
110
	@Property(key = "gameserver.administration.command.promote", defaultValue = "3")
119
	@Property(key = "gameserver.administration.command.promote", defaultValue = "3")
111
	public static int	COMMAND_PROMOTE;
120
	public static int	COMMAND_PROMOTE;
112
121
...
...
119
	@Property(key = "gameserver.administration.command.reloadspawns", defaultValue = "3")
128
	@Property(key = "gameserver.administration.command.reloadspawns", defaultValue = "3")
120
	public static int	COMMAND_RELOADSPAWNS;
129
	public static int	COMMAND_RELOADSPAWNS;
121
130
131
    @Property(key = "gameserver.administration.command.remove", defaultValue = "3")
132
    public static int	COMMAND_REMOVE;
133
    
122
	@Property(key = "gameserver.administration.command.resurrect", defaultValue = "3")
134
	@Property(key = "gameserver.administration.command.resurrect", defaultValue = "3")
123
	public static int	COMMAND_RESURRECT;
135
	public static int	COMMAND_RESURRECT;
124
136
...
...
149
	@Property(key = "gameserver.administration.command.settitle", defaultValue = "3")
161
	@Property(key = "gameserver.administration.command.settitle", defaultValue = "3")
150
	public static int	COMMAND_SETTITLE;
162
	public static int	COMMAND_SETTITLE;
151
163
164
	@Property(key = "gameserver.administration.command.siege", defaultValue = "3")
165
	public static int	COMMAND_SIEGE;
166
167
	
152
	@Property(key = "gameserver.administration.command.spawnnpc", defaultValue = "3")
168
	@Property(key = "gameserver.administration.command.spawnnpc", defaultValue = "3")
153
	public static int	COMMAND_SPAWNNPC;
169
	public static int	COMMAND_SPAWNNPC;
154
170
...
...
173
	@Property(key = "gameserver.administration.command.zone", defaultValue = "3")
189
	@Property(key = "gameserver.administration.command.zone", defaultValue = "3")
174
	public static int	COMMAND_ZONE;
190
	public static int	COMMAND_ZONE;
175
191
176
	@Property(key = "gameserver.administration.command.legion", defaultValue = "3")
177
	public static int	COMMAND_LEGION;
178
179
    @Property(key = "gameserver.administration.command.remove", defaultValue = "3")
180
    public static int	COMMAND_REMOVE;
181
    
182
	@Property(key = "gameserver.administration.command.playerinfo", defaultValue = "3")
183
	public static int	COMMAND_PLAYERINFO;
184
185
	@Property(key = "gameserver.administration.command.prison", defaultValue = "3")
186
	public static int	COMMAND_PRISON;
187
}
192
}

Updated branches/1.9/src/com/aionemu/gameserver/configs/Config.java Download diff

24102411
35
import com.aionemu.gameserver.configs.main.PricesConfig;
35
import com.aionemu.gameserver.configs.main.PricesConfig;
36
import com.aionemu.gameserver.configs.main.RateConfig;
36
import com.aionemu.gameserver.configs.main.RateConfig;
37
import com.aionemu.gameserver.configs.main.ShutdownConfig;
37
import com.aionemu.gameserver.configs.main.ShutdownConfig;
38
import com.aionemu.gameserver.configs.main.SiegeConfig;
38
import com.aionemu.gameserver.configs.main.TaskManagerConfig;
39
import com.aionemu.gameserver.configs.main.TaskManagerConfig;
39
import com.aionemu.gameserver.configs.main.ThreadConfig;
40
import com.aionemu.gameserver.configs.main.ThreadConfig;
40
import com.aionemu.gameserver.configs.network.IPConfig;
41
import com.aionemu.gameserver.configs.network.IPConfig;
...
...
115
			ConfigurableProcessor.process(PricesConfig.class, mainProps);
116
			ConfigurableProcessor.process(PricesConfig.class, mainProps);
116
			log.info("Loading: " + main + "/prices.properties");
117
			log.info("Loading: " + main + "/prices.properties");
117
			
118
			
119
			ConfigurableProcessor.process(SiegeConfig.class, mainProps);
120
			log.info("Loading: " + main + "/siege.properties");
121
			
118
			ConfigurableProcessor.process(ThreadConfig.class, mainProps);
122
			ConfigurableProcessor.process(ThreadConfig.class, mainProps);
119
			log.info("Loading: " + main + "/thread.properties");
123
			log.info("Loading: " + main + "/thread.properties");
120
124

Added branches/1.9/src/com/aionemu/gameserver/configs/main/SiegeConfig.java

Show contents

Added branches/1.9/src/com/aionemu/gameserver/dao/SiegeDAO.java

Show contents

Updated branches/1.9/src/com/aionemu/gameserver/dataholders/DataManager.java Download diff

24102411
131
	
131
	
132
	public static PetSkillData			PET_SKILL_DATA;
132
	public static PetSkillData			PET_SKILL_DATA;
133
	
133
	
134
	public static SiegeLocationData		SIEGE_LOCATION_DATA;
135
	
134
	private XmlDataLoader loader;
136
	private XmlDataLoader loader;
135
137
136
	/**
138
	/**
...
...
183
		ITEM_SET_DATA  = data.itemSetData;
185
		ITEM_SET_DATA  = data.itemSetData;
184
		NPC_SKILL_DATA = data.npcSkillData;
186
		NPC_SKILL_DATA = data.npcSkillData;
185
		PET_SKILL_DATA = data.petSkillData;
187
		PET_SKILL_DATA = data.petSkillData;
188
		SIEGE_LOCATION_DATA = data.siegeLocationData;
186
		
189
		
187
		// some sexy time message
190
		// some sexy time message
188
		long seconds = time / 1000;
191
		long seconds = time / 1000;

Added branches/1.9/src/com/aionemu/gameserver/dataholders/SiegeLocationData.java

Show contents

Updated branches/1.9/src/com/aionemu/gameserver/dataholders/StaticData.java Download diff

24102411
119
	@XmlElement(name = "pet_skill_templates")
119
	@XmlElement(name = "pet_skill_templates")
120
	public PetSkillData				petSkillData;
120
	public PetSkillData				petSkillData;
121
121
122
	@XmlElement(name = "siege_locations")
123
	public SiegeLocationData		siegeLocationData;
124
	
122
	// JAXB callback
125
	// JAXB callback
123
	@SuppressWarnings("unused")
126
	@SuppressWarnings("unused")
124
	private void afterUnmarshal(Unmarshaller unmarshaller, Object parent)
127
	private void afterUnmarshal(Unmarshaller unmarshaller, Object parent)
...
...
151
		DataManager.log.info("Loaded " + itemSetData.size() + " item set entries");
154
		DataManager.log.info("Loaded " + itemSetData.size() + " item set entries");
152
		DataManager.log.info("Loaded " + npcSkillData.size() + " npc skill list entries");
155
		DataManager.log.info("Loaded " + npcSkillData.size() + " npc skill list entries");
153
		DataManager.log.info("Loaded " + petSkillData.size() + " pet skill list entries");
156
		DataManager.log.info("Loaded " + petSkillData.size() + " pet skill list entries");
157
		DataManager.log.info("Loaded " + siegeLocationData.size() + " siege location entries");
154
	}
158
	}
155
}
159
}

Updated branches/1.9/src/com/aionemu/gameserver/GameServer.java Download diff

24102411
35
import com.aionemu.gameserver.configs.network.NetworkConfig;
35
import com.aionemu.gameserver.configs.network.NetworkConfig;
36
import com.aionemu.gameserver.dao.PlayerDAO;
36
import com.aionemu.gameserver.dao.PlayerDAO;
37
import com.aionemu.gameserver.dataholders.DataManager;
37
import com.aionemu.gameserver.dataholders.DataManager;
38
import com.aionemu.gameserver.model.siege.Influence;
38
import com.aionemu.gameserver.network.aion.GameConnectionFactoryImpl;
39
import com.aionemu.gameserver.network.aion.GameConnectionFactoryImpl;
39
import com.aionemu.gameserver.network.chatserver.ChatServer;
40
import com.aionemu.gameserver.network.chatserver.ChatServer;
40
import com.aionemu.gameserver.network.loginserver.LoginServer;
41
import com.aionemu.gameserver.network.loginserver.LoginServer;
...
...
49
import com.aionemu.gameserver.services.GroupService;
50
import com.aionemu.gameserver.services.GroupService;
50
import com.aionemu.gameserver.services.MailService;
51
import com.aionemu.gameserver.services.MailService;
51
import com.aionemu.gameserver.services.PeriodicSaveService;
52
import com.aionemu.gameserver.services.PeriodicSaveService;
53
import com.aionemu.gameserver.services.SiegeService;
52
import com.aionemu.gameserver.services.WeatherService;
54
import com.aionemu.gameserver.services.WeatherService;
53
import com.aionemu.gameserver.services.ZoneService;
55
import com.aionemu.gameserver.services.ZoneService;
54
import com.aionemu.gameserver.spawnengine.SpawnEngine;
56
import com.aionemu.gameserver.spawnengine.SpawnEngine;
...
...
127
129
128
		BrokerService.getInstance();
130
		BrokerService.getInstance();
129
131
132
		SiegeService.getInstance();
133
		
134
		Influence.getInstance();
135
		
130
		DropService.getInstance();
136
		DropService.getInstance();
131
137
132
		ExchangeService.getInstance();
138
		ExchangeService.getInstance();

Added branches/1.9/src/com/aionemu/gameserver/model/siege/Artifact.java

Show contents

Added branches/1.9/src/com/aionemu/gameserver/model/siege/Commander.java

Show contents

Added branches/1.9/src/com/aionemu/gameserver/model/siege/Fortress.java

Show contents

Added branches/1.9/src/com/aionemu/gameserver/model/siege/Influence.java

Show contents

Added branches/1.9/src/com/aionemu/gameserver/model/siege/SiegeLocation.java

Show contents

Added branches/1.9/src/com/aionemu/gameserver/model/siege/SiegeRace.java

Show contents

Added branches/1.9/src/com/aionemu/gameserver/model/siege/SiegeType.java

Show contents

Added branches/1.9/src/com/aionemu/gameserver/model/templates/siegelocation/SiegeLocationTemplate.java

Show contents

Updated branches/1.9/src/com/aionemu/gameserver/network/aion/clientpackets/CM_ENTER_WORLD.java Download diff

24102411
28
import com.aionemu.gameserver.network.aion.AionClientPacket;
28
import com.aionemu.gameserver.network.aion.AionClientPacket;
29
import com.aionemu.gameserver.network.aion.AionConnection;
29
import com.aionemu.gameserver.network.aion.AionConnection;
30
import com.aionemu.gameserver.network.aion.serverpackets.SM_ABYSS_RANK;
30
import com.aionemu.gameserver.network.aion.serverpackets.SM_ABYSS_RANK;
31
import com.aionemu.gameserver.network.aion.serverpackets.SM_SIEGE_LOCATION_INFO;
31
import com.aionemu.gameserver.network.aion.serverpackets.SM_CHANNEL_INFO;
32
import com.aionemu.gameserver.network.aion.serverpackets.SM_CHANNEL_INFO;
32
import com.aionemu.gameserver.network.aion.serverpackets.SM_CUBE_UPDATE;
33
import com.aionemu.gameserver.network.aion.serverpackets.SM_CUBE_UPDATE;
33
import com.aionemu.gameserver.network.aion.serverpackets.SM_EMOTION_LIST;
34
import com.aionemu.gameserver.network.aion.serverpackets.SM_EMOTION_LIST;
...
...
194
			sendPacket(new SM_PLAYER_SPAWN(player));
195
			sendPacket(new SM_PLAYER_SPAWN(player));
195
			sendPacket(new SM_EMOTION_LIST());
196
			sendPacket(new SM_EMOTION_LIST());
196
			sendPacket(new SM_INFLUENCE_RATIO());
197
			sendPacket(new SM_INFLUENCE_RATIO());
198
			sendPacket(new SM_SIEGE_LOCATION_INFO());
199
			// TODO: Send Rift Announce Here
197
			sendPacket(new SM_PRICES(player.getPrices()));
200
			sendPacket(new SM_PRICES(player.getPrices()));
198
			sendPacket(new SM_PLAYER_ID(player));
201
			sendPacket(new SM_PLAYER_ID(player));
199
			sendPacket(new SM_ABYSS_RANK(player.getAbyssRank()));
202
			sendPacket(new SM_ABYSS_RANK(player.getAbyssRank()));

Updated branches/1.9/src/com/aionemu/gameserver/network/aion/serverpackets/SM_INFLUENCE_RATIO.java Download diff

24102411
18
18
19
import java.nio.ByteBuffer;
19
import java.nio.ByteBuffer;
20
20
21
import com.aionemu.gameserver.model.siege.Influence;
21
import com.aionemu.gameserver.network.aion.AionConnection;
22
import com.aionemu.gameserver.network.aion.AionConnection;
22
import com.aionemu.gameserver.network.aion.AionServerPacket;
23
import com.aionemu.gameserver.network.aion.AionServerPacket;
24
import com.aionemu.gameserver.services.SiegeService;
23
25
24
/**
26
/**
25
 * @author Nemiroff
27
 * @author Nemiroff
...
...
34
	@Override
36
	@Override
35
	protected void writeImpl(AionConnection con, ByteBuffer buf)
37
	protected void writeImpl(AionConnection con, ByteBuffer buf)
36
	{
38
	{
37
		writeD(buf, 5749);
39
		Influence inf = Influence.getInstance();
38
        writeF(buf, (float) 0.34); //elyos
40
		
39
        writeF(buf, (float) 0.33); //asmo
41
		writeD(buf, SiegeService.getInstance().getSiegeTime());
40
        writeF(buf, (float) 0.33); //balaur
42
        writeF(buf, inf.getElyos());
41
        // asmo + balaur + elyos = 1
43
        writeF(buf, inf.getAsmos());
44
        writeF(buf, inf.getBalaur());
45
        
46
        //TODO: 1.9 has writeH(buf, 3) with balauria values
42
        writeH(buf, 1);
47
        writeH(buf, 1);
43
        writeD(buf, 400010000); //worlid ?
48
        
44
        writeF(buf, (float) 0.34); //elyos
49
        writeD(buf, 400010000);
45
        writeF(buf, (float) 0.33); //asmo
50
        writeF(buf, inf.getElyos());
46
        writeF(buf, (float) 0.33); //balaur
51
        writeF(buf, inf.getAsmos());
47
52
        writeF(buf, inf.getBalaur());
53
        
48
	}
54
	}
49
}
55
}

Added branches/1.9/src/com/aionemu/gameserver/network/aion/serverpackets/SM_SIEGE_LOCATION_INFO.java

Show contents

Updated branches/1.9/src/com/aionemu/gameserver/network/aion/ServerPacketsOpcodes.java Download diff

24102411
182
		addPacketOpcode(SM_LOOT_ITEMLIST.class, 0xEA, idSet);// 1.9
182
		addPacketOpcode(SM_LOOT_ITEMLIST.class, 0xEA, idSet);// 1.9
183
		addPacketOpcode(SM_LOOT_STATUS.class, 0xEB, idSet);// 1.9
183
		addPacketOpcode(SM_LOOT_STATUS.class, 0xEB, idSet);// 1.9
184
		addPacketOpcode(SM_RECIPE_LIST.class, 0xED, idSet);// testing
184
		addPacketOpcode(SM_RECIPE_LIST.class, 0xED, idSet);// testing
185
		addPacketOpcode(SM_SIEGE_LOCATION_INFO.class, 0xEF, idSet);// 1.9
185
		addPacketOpcode(SM_PLAYER_SEARCH.class, 0xF1, idSet);// 1.9
186
		addPacketOpcode(SM_PLAYER_SEARCH.class, 0xF1, idSet);// 1.9
186
		addPacketOpcode(SM_LEAVE_GROUP_MEMBER.class, 0xF5, idSet);// 1.9
187
		addPacketOpcode(SM_LEAVE_GROUP_MEMBER.class, 0xF5, idSet);// 1.9
187
		addPacketOpcode(SM_SHOW_BRAND.class, 0xF7, idSet);// 1.9
188
		addPacketOpcode(SM_SHOW_BRAND.class, 0xF7, idSet);// 1.9

Added branches/1.9/src/com/aionemu/gameserver/services/SiegeService.java

Show contents