Register for your free account! | Forgot your password?

You last visited: Today at 11:55

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[C++] Boni bei Waffenkostümen

Discussion on [C++] Boni bei Waffenkostümen within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
Sogma's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 670
Received Thanks: 137
[C++] Boni bei Waffenkostümen

Hallo epvp,

da es mich interessiert hat wie man Waffenkostümen Boni geben kann wenn sie droppen (so wie bei Rüstungskostümen mit +), habe ich die Funktion im Source etwas ergänzt.

Falls sich jemand nichts darunter vorstellen kann hier ein Bild.



Wir müssen dazu nur eine Funktion ändern/ersetzen.

game/item_attribute.cpp

Sucht nach:
Code:
int CItem::GetAttributeSetIndex()
Nun müsst ihr entscheiden, wie ihr die Funktion erweitern wollt. Ich habe zum Beispiel keinen Lykaner eingebaut, daher auch keine Klauen-Kostüme. Diese Fehlen also in meinem Code.

Ohne Lykaner:
Code:
int CItem::GetAttributeSetIndex()
{
	if (GetType() == ITEM_WEAPON || GetType() == ITEM_COSTUME) //Added: || GetType() == ITEM_COSTUME
	{
		if (GetSubType() == WEAPON_ARROW)
			return -1;

		switch (GetSubType()) //new switch
		{
			case COSTUME_WEAPON_SWORD:
			case COSTUME_WEAPON_DAGGER:
			case COSTUME_WEAPON_BOW:
			case COSTUME_WEAPON_TWO_HANDED:
			case COSTUME_WEAPON_BELL:
			case COSTUME_WEAPON_FAN:
			case WEAPON_SWORD:
			case WEAPON_DAGGER:
			case WEAPON_BOW:
			case WEAPON_TWO_HANDED:
			case WEAPON_BELL:
			case WEAPON_FAN:
			case WEAPON_MOUNT_SPEAR:
				return ATTRIBUTE_SET_WEAPON;
		}
	}

	if (GetType() == ITEM_ARMOR || GetType() == ITEM_COSTUME)
	{
		switch (GetSubType())
		{
			case ARMOR_BODY:
//			case COSTUME_BODY: // 코스츔 갑옷은 일반 갑옷과 동일한 Attribute Set을 이용하여 랜덤속성 붙음 (ARMOR_BODY == COSTUME_BODY)
				return ATTRIBUTE_SET_BODY;

			case ARMOR_WRIST:
				return ATTRIBUTE_SET_WRIST;

			case ARMOR_FOOTS:
				return ATTRIBUTE_SET_FOOTS;

			case ARMOR_NECK:
				return ATTRIBUTE_SET_NECK;

			case ARMOR_HEAD:
//			case COSTUME_HAIR: // 코스츔 헤어는 일반 투구 아이템과 동일한 Attribute Set을 이용하여 랜덤속성 붙음 (ARMOR_HEAD == COSTUME_HAIR)
				return ATTRIBUTE_SET_HEAD;

			case ARMOR_SHIELD:
				return ATTRIBUTE_SET_SHIELD;

			case ARMOR_EAR:
				return ATTRIBUTE_SET_EAR;
		}
	}

	return -1;
}
Mit Lykaner

Code:
int CItem::GetAttributeSetIndex()
{
	if (GetType() == ITEM_WEAPON || GetType() == ITEM_COSTUME) //Added: || GetType() == ITEM_COSTUME
	{
		if (GetSubType() == WEAPON_ARROW)
			return -1;

		switch (GetSubType()) //new switch
		{
			case COSTUME_WEAPON_SWORD:
			case COSTUME_WEAPON_DAGGER:
			case COSTUME_WEAPON_BOW:
			case COSTUME_WEAPON_TWO_HANDED:
			case COSTUME_WEAPON_BELL:
			case COSTUME_WEAPON_FAN:
			case COSTUME_WEAPON_CLAW:
			case WEAPON_SWORD:
			case WEAPON_DAGGER:
			case WEAPON_BOW:
			case WEAPON_TWO_HANDED:
			case WEAPON_BELL:
			case WEAPON_FAN:
			case WEAPON_MOUNT_SPEAR:
				return ATTRIBUTE_SET_WEAPON;
		}
	}

	if (GetType() == ITEM_ARMOR || GetType() == ITEM_COSTUME)
	{
		switch (GetSubType())
		{
			case ARMOR_BODY:
//			case COSTUME_BODY: // 코스츔 갑옷은 일반 갑옷과 동일한 Attribute Set을 이용하여 랜덤속성 붙음 (ARMOR_BODY == COSTUME_BODY)
				return ATTRIBUTE_SET_BODY;

			case ARMOR_WRIST:
				return ATTRIBUTE_SET_WRIST;

			case ARMOR_FOOTS:
				return ATTRIBUTE_SET_FOOTS;

			case ARMOR_NECK:
				return ATTRIBUTE_SET_NECK;

			case ARMOR_HEAD:
//			case COSTUME_HAIR: // 코스츔 헤어는 일반 투구 아이템과 동일한 Attribute Set을 이용하여 랜덤속성 붙음 (ARMOR_HEAD == COSTUME_HAIR)
				return ATTRIBUTE_SET_HEAD;

			case ARMOR_SHIELD:
				return ATTRIBUTE_SET_SHIELD;

			case ARMOR_EAR:
				return ATTRIBUTE_SET_EAR;
		}
	}

	return -1;
}
Das wars auch schon. Die Boni darauf lassen sich natürlich auch mit den Kostüm Switchern ändern.
Ich hoffe das kann jemand gebrauchen.

Falls ihr Fragen/Probleme habt könnt ihr mir gerne hier im Forum eine PN oder unter diesen Thread scheiben.

Viele Grüße,
Sogma
Sogma is offline  
Old 03/14/2017, 01:01   #2
 
elite*gold: 0
The Black Market: 105/0/0
Join Date: May 2016
Posts: 8,679
Received Thanks: 1,638
Waffenkostüme mit Boni... Warum nicht ?

Danke für den Release @, werden sich bestimmt manche freuen.

Mfg
悪地城 is offline  
Old 03/14/2017, 01:06   #3


 
WoWeger's Avatar
 
elite*gold: 3
The Black Market: 499/0/0
Join Date: Sep 2012
Posts: 2,717
Received Thanks: 267
Warum sind da china comments im code?
WoWeger is offline  
Old 03/14/2017, 10:35   #4
 
Sogma's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 670
Received Thanks: 137
Quote:
Originally Posted by WoWeger View Post
Warum sind da china comments im code?
Standard-Funktion von Ymir
Sogma is offline  
Reply


Similar Threads Similar Threads
Kostüme mit Boni (Volle Laufzeit) auf allen Servern perfekt für boni transfer :)
10/15/2016 - Metin2 Trading - 0 Replies
Hi, Da nun jetzt die Kostüme alle ablaufen und keine neuen mehr im IS sind biete ich meine Weihnachtskostüme aus dem Depot an. Ab dem rausholzeitpunkt haben sie 15Tage. Ihr könnt eure "alten,guten Kostüme" auf dieses transverieren um euch beim nächsten mal das Switchen zu ersparen :D
Problem mit Waffenkostümen
10/20/2015 - Metin2 Private Server - 5 Replies
Hey Comm., ich habe insofern das Waffenkostüme-System fertig, jedoch gibt es noch einen kleinen Fehler. Mein Angriffswert: Wenn ich keine Waffe trage: 420 Wenn ich ein Tritonschwert trage: 1000-1070 Wenn ich das Waffenkostüm dazu anziehe: 420
[DE50 - Tarvos] Boni Hinzufügen | Boni Switchen
12/01/2012 - Metin2 Trading - 0 Replies
-----------
[Cedra - S.26] Boni Hinzufügen | Boni Switchen
11/14/2012 - Metin2 Trading - 2 Replies
----------
[Cedra - S.26] Boni Hinzufügen | Boni Switchen
10/27/2012 - Metin2 Trading - 6 Replies
------------------------



All times are GMT +2. The time now is 11:55.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.