Bonjour,
J’ai créer un patch avec la commande “svn diff > mesModifications.patch”, Je voudrais maintenant pouvoir appliquer le patch sans soucis, mais j’ai ce message
[code](Stripping trailing CRs from patch.)
can’t find file to patch at input line 5
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
|Index: AE-go_GameServer/config/admin.properties
|===================================================================
|— AE-go_GameServer/config/admin.properties (revision 847)
+++ AE-go_GameServer/config/admin.properties (working copy) |
---|
File to patch:
[/code]
Je suis placer dans le dossier juste avant AE-go_GameServer.
Je ne sais pas quoi taper a coté de 'File to patch:'
Quoi que je tape, sa merde >__<
Voila le contenu de mon fichier patch :
[code]Index: AE-go_GameServer/config/admin.properties
— AE-go_GameServer/config/admin.properties (revision 847)
+++ AE-go_GameServer/config/admin.properties (working copy)
@@ -17,6 +17,9 @@
Adds an item to your inventory
gameserver.administration.command.add=3
+# Add Kinah to player
+gameserver.administration.command.addkinah=3
+
Add target player skill
gameserver.administration.command.addskill=3
Index: AE-go_GameServer/data/scripts/system/handlers/admincommands/AddKinah.java
— AE-go_GameServer/data/scripts/system/handlers/admincommands/AddKinah.java (revision 847)
+++ AE-go_GameServer/data/scripts/system/handlers/admincommands/AddKinah.java (working copy)
@@ -0,0 +1,131 @@
+/*
-
- This file is part of aion-unique <aionunique.smfnew.com>.
-
-
- aion-unique is free software: you can redistribute it and/or modify
-
- it under the terms of the GNU General Public License as published by
-
- the Free Software Foundation, either version 3 of the License, or
-
- (at your option) any later version.
-
-
- aion-unique is distributed in the hope that it will be useful,
-
- but WITHOUT ANY WARRANTY; without even the implied warranty of
-
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-
- GNU General Public License for more details.
-
-
- You should have received a copy of the GNU General Public License
-
- along with aion-unique. If not, see http://www.gnu.org/licenses/.
- */
+package admincommands;
+
+import java.text.DecimalFormat;
+import java.util.Collections;
+
+import com.aionemu.gameserver.configs.AdminConfig;
+import com.aionemu.gameserver.model.gameobjects.Item;
+import com.aionemu.gameserver.model.gameobjects.VisibleObject;
+import com.aionemu.gameserver.model.gameobjects.player.Inventory;
+import com.aionemu.gameserver.model.gameobjects.player.Player;
+import com.aionemu.gameserver.network.aion.serverpackets.SM_INVENTORY_UPDATE;
+import com.aionemu.gameserver.services.ItemService;
+import com.aionemu.gameserver.utils.PacketSendUtility;
+import com.aionemu.gameserver.utils.chathandlers.AdminCommand;
+import com.aionemu.gameserver.world.World;
+import com.google.inject.Inject;
+
+/**
+* @author sweetkr
+*
+*/
+public class AddKinah extends AdminCommand
+{
-
@Inject
-
private World world;
-
@Inject
-
private ItemService itemService;
-
public AddKinah()
-
{
-
super("Kinah");
-
}
-
@Override
-
public void executeCommand(Player admin, String[] params)
-
{
-
if(admin.getCommonData().getAdminRole() < AdminConfig.COMMAND_ADDKINAH)
-
{
-
if (admin.getCommonData().getAdminRole() > 0)
-
{
-
PacketSendUtility.sendMessage(admin, "You don't have enough rights to execute this command");
-
}
-
return;
-
}
-
if (params.length < 1 || params.length > 2)
-
{
-
PacketSendUtility.sendMessage(admin, "syntax: //Kinah <Quantity> [PlayerName]");
-
return ;
-
}
-
int itemID = 182400001;
-
int itemCount = 1;
-
Item addedItem = null;
-
try
-
{
-
itemCount = Integer.parseInt(params[0]);
-
}
-
catch (NumberFormatException e)
-
{
-
PacketSendUtility.sendMessage(admin, "You have wrong Kinah Quantity. (Max: 2,147,483,647 Kinah)");
-
return;
-
}
-
Player target = null;
-
if (params.length == 2)
-
{
-
target = world.findPlayer(params[1]);
-
if (target == null)
-
{
-
PacketSendUtility.sendMessage(admin, "player" + params[1] + "is on offline.");
-
return;
-
}
-
}
-
else
-
{
-
VisibleObject o = admin.getTarget();
-
if (!(o instanceof Player) || o == null)
-
{
-
target = admin;
-
}
-
}
-
Item item = itemService.newItem(itemID,itemCount);
-
Inventory inventory = target.getInventory();
-
addedItem = inventory.getKinahItem();
-
addedItem.increaseItemCount(itemCount);
-
DecimalFormat decimalFormat = new DecimalFormat("###,###");
-
String result = decimalFormat.format(itemCount);
-
PacketSendUtility.sendPacket(target, new SM_INVENTORY_UPDATE(Collections.singletonList(addedItem)));
-
if(addedItem == null)
-
{
-
PacketSendUtility.sendMessage(admin, "You can't add Kinah.");
-
}
-
else
-
{
-
if (target.equals(admin))
-
{
-
PacketSendUtility.sendMessage(admin, "You have acquired" + result + " Kinah.");
-
}
-
else
-
{
-
PacketSendUtility.sendMessage(admin, "You added" + result + "Kinah to player " + target.getName());
-
PacketSendUtility.sendMessage(target, "You have acquired " + result + " Kinah.");
-
}
-
}
-
}
+}
Index: AE-go_GameServer/src/com/aionemu/gameserver/configs/AdminConfig.java
===================================================================
— AE-go_GameServer/src/com/aionemu/gameserver/configs/AdminConfig.java (revision 847)
+++ AE-go_GameServer/src/com/aionemu/gameserver/configs/AdminConfig.java (working copy)
@@ -26,6 +26,9 @@@Property(key = “gameserver.administration.command.add”, defaultValue = “3”)
public static int COMMAND_ADD; -
@Property(key = “gameserver.administration.command.addkinah”, defaultValue = “3”)
-
public static int COMMAND_ADDKINAH;
@Property(key = “gameserver.administration.command.ai”, defaultValue = “3”)
public static int COMMAND_AI;
[/code]
Que faire svp ?