- Timestamp:
- Oct 27, 2007, 10:23:13 PM (17 years ago)
- Location:
- db
- Files:
-
- 1 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
db/check_database.php
r109 r113 1 1 <?php 2 if($vlozeni_souboru == "OK"){ 2 3 $Database = array( 4 'class' => array( 5 1 => "Warrior", 6 2 => "Paladin", 7 3 => "Hunter", 8 4 => "Rogue", 9 5 => "Priest", 10 6 => "", 11 7 => "Shaman", 12 8 => "Mage", 13 9 => "Warlock", 14 10 => "", 15 11 => "Druid" 16 ), 17 'race' => array( 18 1 => "Human", 19 2 => "Orc", 20 3 => "Dwarf", 21 4 => "Night Elf", 22 5 => "Undead", 23 6 => "Tauren", 24 7 => "Gnome", 25 8 => "Troll", 26 9 => "", 27 10 => "Blood Elf", 28 11 => "Dranei" 29 ), 30 'item' => array( 31 'class' => array( 32 0 => "Consumable", 33 1 => "Container", 34 2 => "Weapon", 35 4 => "Armor", 36 5 => "Reagent", 37 6 => "Projectile", 38 7 => "Trade Goods", 39 9 => "Recipe", 40 11 => "Quiver", 41 12 => "Quest", 42 13 => "Key", 43 15 => "Miscellaneous" 44 ), 45 'subclass' => array( 46 0 => array( // Consumable 47 1 => "Food", 48 2 => "Liquid", 49 3 => "Potion (usable in combat)", 50 4 => "Scroll (usable in combat)", 51 5 => "Bandage (usable in combat)", 52 6 => "Healthstone (usable in combat)", 53 7 => "Combat Effect (usable in combat)" 54 ), 55 2 => array( // Weapon 56 0 => "One Handed Axe", 57 1 => "Two Handed Axe", 58 2 => "Bow", 59 3 => "Rifle", 60 4 => "One Handed Mace", 61 5 => "Two Handed Mace", 62 6 => "Polearm", 63 7 => "One Handed Sword", 64 8 => "Two Handed Sword", 65 10 => "Staff", 66 11 => "One Handed Exotic", 67 12 => "Two Handed Exotic", 68 13 => "Fist Weapon", 69 14 => "Miscellaneous Weapon", 70 15 => "Dagger", 71 16 => "Thrown", 72 17 => "Spear", 73 18 => "Crossbow", 74 19 => "Wand", 75 20 => "Fishing Pole" 76 ), 77 4 => array( // Armor 78 0 => "Miscellaneous", 79 1 => "Cloth", 80 2 => "Leather", 81 3 => "Mail", 82 4 => "Plate", 83 6 => "Shield" 84 ), 85 6 => array( // Projectile 86 2 => "Arrows", 87 3 => "Bullets" 88 ), 89 7 => array( // Trade Goods 90 0 => "Trade Goods", 91 1 => "Parts", 92 2 => "Explosives", 93 3 => "Devices" 94 ), 95 9 => array( // Recipe 96 0 => array("Book"), 97 1 => array("Pattern","Leatherworking"), 98 2 => array("Pattern","Tailoring"), 99 3 => array("Schematic","Engineering"), 100 4 => array("Plans","Blacksmithing"), 101 5 => array("Recipe","Cooking"), 102 6 => array("Recipe","Alchemy"), 103 7 => array("Manual","First Aid"), 104 8 => array("Formula","Enchanting"), 105 9 => array("Fishing","Manual") 106 ), 107 11 => array( // Quiver 108 2 => array("Quiver","Arrows"), 109 3 => array("Ammo Pouch","Bullets") 110 ), 111 13 => array( // Projectile 112 2 => "Arrows", 113 3 => "Bullets" 114 ) 115 ), 116 'quality' => array( 117 0 => array("Grey","Poor"), 118 1 => array("White","Common"), 119 2 => array("Green","Uncommon"), 120 3 => array("Blue","Rare"), 121 4 => array("Purple","Epic"), 122 5 => array("Orange","Legendary"), 123 6 => array("Red","Artifact") 124 ), 125 'type' => array( 126 1 => "binded", 127 2 => "Conjured", 128 4 => "Openable item", 129 16 => "Shield", 130 32 => "Totem", 131 64 => "Mount", 132 256 => "Wand", 133 512 => "Ribboned Wrapping Paper", 134 1024 => "Essence", 135 8192 => "Guild Charter", 136 32768 => "PvP Reward Item" 137 ), 138 'equip' => array( 139 1 => "Head", 140 2 => "Neck", 141 3 => "Shoulder", 142 4 => "Shirt", 143 5 => "Chest", 144 6 => "Waist", // Belt 145 7 => "Legs", // Pants 146 8 => "Feet", // Boots 147 9 => "Wrists", // Bracers 148 10 => "Hands", // Gloves 149 11 => "Finger", // Ring 150 12 => "Trinket", 151 13 => "One Hand", 152 14 => "Off Hand", // includes Shield 153 15 => "Bow", 154 16 => "Back", 155 17 => "Two Hand", 156 18 => "Bag", // include Quivers 157 19 => "Tabard", 158 20 => "Robe", 159 21 => "Main Hand", 160 22 => "Off Hand", // Misc Items 161 23 => "Tome", 162 24 => "Ammunition", 163 25 => "Thrown", 164 26 => "Gun" 165 ), 166 'AllowableClass' => array( 167 1 => "Warrior", 168 2 => "Paladin", 169 4 => "Hunter", 170 8 => "Rogue", 171 16 => "Priest", 172 64 => "Shaman", 173 128 => "Mage", 174 256 => "Warlock", 175 1024 => "Druid" 176 ), 177 'AllowableRace' => array( 178 1 => "Human", 179 2 => "Orc", 180 4 => "Dwarf", 181 8 => "Night Elf", 182 16 => "Undead", 183 32 => "Tauren", 184 64 => "Gnome", 185 128 => "Troll", 186 512 => "Blood elf", 187 1024 => "Draenei" 188 ), 189 'RequiredReputationRank' => array( 190 0 => "Hated", 191 1 => "Hostile", 192 2 => "Unfriendly", 193 3 => "Neutral", 194 4 => "Friendly", 195 5 => "Honored", 196 6 => "Reverted", 197 7 => "Exalted", 198 ), 199 'stat_type' => array( 200 0 => "Mana", 201 1 => "Health", 202 3 => "Agility", 203 4 => "Strength", 204 5 => "Intellect", 205 6 => "Spirit", 206 7 => "Stamina", 207 ), 208 'dmg_type' => array( 209 0 => "Physical", 210 1 => "Holy", 211 2 => "Fire", 212 3 => "Nature", 213 4 => "Frost", 214 5 => "Shadow", 215 6 => "Arcane" 216 ), 217 'ammo_type' => array( 218 2 => "Arrows", 219 3 => "Bullets" 220 ), 221 'spell_charges' => array( 222 0 => "Infinite charges", 223 'negative' => "Item is expendable", 224 'positive' => "Item is kept when all charges are spent" 225 ), 226 'bonding' => array( 227 1 => "Binds when Picked Up", 228 2 => "Binds when Equipped", 229 3 => "Binds when Used", 230 4 => "Quest Item" 231 ), 232 'bonding' => array( 233 1 => "Binds when Picked Up", 234 2 => "Binds when Equipped", 235 3 => "Binds when Used", 236 4 => "Quest Item" 237 ), 238 'LanguageID' => array( 239 1 => "Orcish", 240 2 => "Darnassian", 241 3 => "Taurahe", 242 6 => "Dwarvish", 243 7 => "Common", 244 8 => "Demonic", 245 9 => "Titan", 246 10 => "Thelassian", 247 11 => "Draconic", 248 12 => "Kalimag", 249 13 => "Gnomish", 250 14 => "Troll", 251 33 => "Gutterspeak" 252 ), 253 'PageMaterial' => array( 254 1 => "Parchment", 255 2 => "Stone", 256 3 => "Marble", 257 4 => "Silver", 258 5 => "Bronze" 259 ), 260 'Material' => array( 261 1 => "Metal", 262 2 => "Wood", 263 3 => "Liquid", 264 4 => "Jewelry", 265 5 => "Chain", 266 6 => "Plate", 267 7 => "Cloth", 268 8 => "Leather" 269 ), 270 'sheath' => array( 271 1 => "Two Handed Sword (on the back; tip down)", 272 2 => "Staff (on the back; tip up)", 273 3 => "One Handed Sword (on the side)", 274 4 => "Shield (on the back)", 275 5 => "Enchanter's Rod", 276 7 => "Off Hand", 277 ), 278 'BagFamily' => array( 279 0 => "", 280 1 => "Arrows", 281 2 => "Bullets", 282 3 => "Soul Shards", 283 6 => "Herbs", 284 7 => "Enchanting Supp", 285 8 => "Engineering Supp", 286 9 => "Keys", 287 10 => "Gems", 288 12 => "Mining Supp", 289 ) 290 ), 291 'quest' => array( 292 'ZoneOrSort' => array( 293 'negative' => array( 294 1 => "Epic", 295 21 => "REUSE - old wailing caverns", 296 22 => "Seasonal", 297 23 => "REUSE - old undercity one", 298 24 => "Herbalism", 299 25 => "REUSE - old scarlet monastery", 300 41 => "REUSE - old uldaman", 301 61 => "Warlock", 302 81 => "Warrior", 303 82 => "Shaman", 304 101 => "Fishing", 305 121 => "Blacksmithing", 306 141 => "Paladin", 307 161 => "Mage", 308 162 => "Rogue", 309 181 => "Alchemy", 310 182 => "Leatherworking", 311 201 => "Engineering", 312 221 => "Treasure Map", 313 241 => "REUSE - old sunken temple", 314 261 => "Hunter", 315 262 => "Priest", 316 263 => "Druid", 317 264 => "Tailoring", 318 284 => "Special", 319 304 => "Cooking", 320 324 => "First Aid", 321 344 => "Legendary", 322 364 => "Darkmoon Faire", 323 365 => "Ahn'Qiraj War", 324 366 => "Lunar Festival", 325 367 => "Reputation", 326 ), 327 'positive' => "SQL:area_table" 328 ), 329 'Type' => array( 330 1 => "Elite", 331 21 => "Life", 332 41 => "PvP", 333 62 => "Raid", 334 81 => "Dungeon", 335 82 => "World Event" 336 ), 337 /* ===================================== 338 339 RequiredRaces ¶ ??????? need to complete !!!! 340 341 Races required to get the quest. 0 means available for all races. 342 Field's value is a decimal value that must be transform to a 8 bits binary in order to be understandable. 343 In binary form, each different bit represent a different race. They're assigned as follow : 344 128 64 32 16 8 4 2 1 345 Troll Gnome Tauren Undead NightElf Dwarf Orc Human 346 347 Example : 348 Int field value : 77 349 Assigning bits from the left to the right : 350 128 64 32 16 8 4 2 1 351 Troll Gnome Tauren Undead NightElf Dwarf Orc Human 352 0 1 0 0 1 1 0 1 353 354 Then, quest is for races : Human, Dwarf, NightElf, Gnome. In other words, add the values in the above table together for the classes you want. Another example: To make a quest for Humans and Dwarves, add 1 and 4 together to get 5. 355 356 ===================================== */ 357 'SpecialFlags' => array( 358 1 => "Elite", 359 21 => "Life", 360 41 => "PvP", 361 62 => "Raid", 362 81 => "Dungeon", 363 82 => "World Event" 364 ) 365 /* ===================================== 366 367 * QUEST_SPECIAL_FLAGS_NONE = 0 368 * QUEST_SPECIAL_FLAGS_DELIVER = 1 369 * QUEST_SPECIAL_FLAGS_EXPLORATION = 2 370 * QUEST_SPECIAL_FLAGS_SPEAKTO = 4 371 * QUEST_SPECIAL_FLAGS_KILL_OR_CAST = 8 372 * QUEST_SPECIAL_FLAGS_TIMED = 16 373 * Flag 32 unknown 374 * QUEST_SPECIAL_FLAGS_REPUTATION = 64 375 376 PrevQuestId ¶ 377 378 If value > 0: Contains the previous quest id, that must be completed before this quest can be started. 379 If value < 0: Contains the parent quest id, that must be active before this quest can be started. 380 If quest have many alternative previous quests (race specific quests lead to single not race specific quest) field NextQuestId in previous quests can used for setting this dependence. 381 Mangos check completing of PrevQuestId for this quest and completing of all quests that have NextQuestId == this quest id, one completion is enough to allow starting this quest. 382 NextQuestId ¶ 383 384 If value > 0: Contains the next quest id, if PrevQuestId of that quest is not sufficient. 385 If value < 0: Contains the sub quest id, if PrevQuestId of that quest is not sufficient. 386 If quest have many alternative next quests (class specific quests lead from single not class specific quest) field PrevQuestId in next quests can used for setting this dependence. 387 ExclusiveGroup ¶ 388 389 if ExclusiveGroup? > 0 390 391 Allows to define a group of quests of which only one may be chosen and completed. 392 E.g. if from quests 1200, 1201 and 1202 only one should be allowed to be chosen, insert 1200 into ExclusiveGroup of all 3 quests. 393 394 if ExclusiveGroup? < 0 395 396 Allows to define a group of quests of which all must be completed and rewarded to start next quest. 397 E.g. if quest 1000 dependent from onw of quests 1200, 1201 and 1202 and all this quests have same negative exclusive group then all this quest mustbe completed and rewareded before quest 1000 can be started. 398 NextQuestInChain ¶ 399 400 Defines quest chains, the details of the entered quest will be automatically opened when this quest is completed. 401 Only works when the quest rewarder of this quest is the quest giver of the entered quest. 402 srcItem ¶ 403 404 Item's ID given by the quest giver at beginning of the quest. 405 Items will be deleted when quest is abandoned. 406 srcItemCount ¶ 407 408 Number of Item given at quest start. 409 SrcSpell ¶ 410 411 Spell casted on player when quest is started. Can be a buff or a learning spell. 412 Title ¶ 413 414 Title of the quest. 415 Details ¶ 416 417 Long quest's description. 418 Objectives ¶ 419 420 Objectives of the quest. 421 If empty, quest is an auto-complete quest that can be immediately finished without accepting it first. 422 OfferRewardText ¶ 423 424 First text send to the player by the NPC when completing the quest. 425 RequestItemsText ¶ 426 427 This text ist send to player, yet did not terminate the Quest and speak with NPC again! 428 EndText ¶ 429 430 This text is indicated to the player, if you open your Questlog and wars send to player ingame. No Change this! 431 ObjectiveText1-4 ¶ 432 433 Used to define non-standard objective texts. 434 ReqItemId1-4 ¶ 435 436 Item_template Id of the 1.-4. required item to complete the quest. (if any) 437 ReqItemCount1-4 ¶ 438 439 Amount of 1.-4. required items. 440 ReqSourceId1-4 ¶ 441 442 These fields are used in core quest-drop logic. They allow players to get quest drops which are not quest delivery items (ReqItem stand for this), but needed to create quest delivery by player or needed to cast ReqSpellCasts. ReqSourceId1 is the item_template id of a source item for creation of ReqItemX or casting of ReqSpellCastX. X is the value of ReqSourceRef1. Only items which have a quest drop chance (having QuestChance > 0 in *_loot_template) should be used as sources here. 443 444 The same for ReqSourceId2-4 445 You may define 1, 2, 3 or even all 4 sources for the same ReqItem/ReqSpellCast or use 4 sources for 4 ReqItems/ReqSpellCasts. 446 ReqSourceCount1-4 ¶ 447 448 Amount of ReqSourceId items the player may gather per unfinished ReqItemId or ReqSpellCast. 449 So ReqSourceId1 items will drop up to a total amount of (ReqItemCount(ReqSourceRef1) - already owned ReqItemId(ReqSourceRef1)) * ReqSourceCount1. Same for ReqSpellCast objectives. 450 ReqSourceRef1-4 ¶ 451 452 Should be 0 or 1..4. See ReqSourceId description. 453 ReqCreatureOrGOId1-4 ¶ 454 455 Value > 0: 1.-4. required creature_template ID the player needs to kill/cast on in order to complete the quest. 456 Value < 0: 1.-4. required gameobject_template ID the player needs to cast on in order to complete the quest. 457 If ReqSpellCastN > 0 then at ReqCreatureOrGOIdN must be casted spell ReqSpellCastN, if ReqSpellCastN = 0 then it must be killed. 458 ReqCreatureOrGOCount1-4 ¶ 459 460 Number of kills/casts needed on 1.-4. creature or gameobject. 461 ReqSpellCast1-4 ¶ 462 463 Spell ID of Spell that needs to be cast in order to fulfill a quest objective. 464 If ReqSpellCastN > 0 then at ReqCreatureOrGOIdN must be casted spell ReqSpellCastN, if ReqSpellCastN = 0 then it must be killed. 465 RewChoiceItemId1-6 ¶ 466 467 Id of the 1.-6. Item available for reward choice. 468 RewChoiceItemCount1 ¶ 469 470 Number of Charges in the 1.-6. rewarded item available. 471 RewItemId1-4 ¶ 472 473 1.-4. item Id given for reward (no choice). 474 RewItemCount1-4 ¶ 475 476 Number of RewItem1-4. 477 RewRepFaction1-5 ¶ 478 479 Faction Id (from Faction.dbc in this case) for which the quest give reputation points. 480 RewRepValue1-5 ¶ 481 482 Number of gain or lost reputation points for Faction1-5 at quest completion. 483 This is special reputation rewarding. Normal reputation reward to quest rewarding creature faction calculated and added automatically. 484 RewOrReqMoney ¶ 485 486 Money earned by completing the quest (if value > 0). Money quest requirement (if value < 0). 487 RewXpOrMoney ¶ 488 489 Experience or money (when player's level = maxlevel) given when completing the quest. Only given once for repeatable quests. 490 RewSpell ¶ 491 492 Spell casted at player when completing the quest. This can be learn spell and player learned some spell in result, or buff spell, for example. 493 PointMapId ¶ 494 495 MapId of a quest point of interest (POI). 496 POI will be shown on the map when quest is active. 497 PointX ¶ 498 499 X coordinate of quest POI. 500 PointY ¶ 501 502 Y coordinate of quest POI. 503 PointOpt ¶ 504 505 !!! Need info here : Feel free to document if you know. !!! 506 OfferRewardEmote, RequestItemsEmote ¶ 507 508 Emote that creature show at request quest details, show incompleted quest and completing quest 509 CompleteScript ¶ 510 511 !!! Need info here : Feel free to document if you know. !!! 512 Repeatable ¶ 513 514 Is quest repeatable? 1 yes 0 no 515 516 ===================================== */ 517 ), 518 'creep' => array( 519 'type' => array( 520 1 => "Beast", 521 2 => "Dragonkin", 522 3 => "Demon", 523 4 => "Elemental", 524 5 => "Giant", 525 6 => "Undead", 526 7 => "Humanoid", 527 8 => "Critter", 528 9 => "Mechanical", 529 10 => "Not specified", 530 11 => "Totem" ), 531 ), 532 /* ===================================== 533 534 entry ¶ 535 536 Creature's id, related to field creature.guid 537 modelid ¶ 538 539 Graphical model that client must apply on this creature. 540 name ¶ 541 542 Base name of the creature. 543 subname ¶ 544 545 Subname of the creature (if any). 546 minlevel ¶ 547 548 Creature's minimum level. Spawned creature have level in range from minlevel to maxlevel 549 maxlevel ¶ 550 551 Creature's maximum level. Spawned creature have level in range from minlevel to maxlevel 552 minhealth ¶ 553 554 Maximum creature's health points for creature level equal minlevel. Spawned creature have health in linear proportion to level position in range minlevel .. maxlevel 555 maxhealth ¶ 556 557 Maximum creature's health points for creature level equal maxlevel. Spawned creature have health in linear proportion to level position in range minlevel .. maxlevel 558 minmana ¶ 559 560 Maximum creature's mana points for creature level equal minlevel. Spawned creature have mana in linear proportion to level position in range minlevel .. maxlevel 561 maxmana ¶ 562 563 Maximum creature's mana points for creature level equal maxlevel. Spawned creature have mana in linear proportion to level position in range minlevel .. maxlevel 564 armor ¶ 565 566 Creature's armor. 567 Faction ¶ 568 569 Creature's faction. See: CreatureFaction 570 npcflag ¶ 571 572 This is way to cliet know how info you see if you clic(RMB) on NPC if is vendor if is auction in fact is menu how you see 573 Is what type of NPC it is. Stored in npc_option.npcflag 574 575 enum NPCFlags 576 Type Value Hex Comment 577 UNIT_NPC_FLAG_NONE 0 0x00000 you can't speak with npc 578 UNIT_NPC_FLAG_GOSSIP 1 0x00001 you can only speak with npc 579 UNIT_NPC_FLAG_QUESTGIVER 2 0x00002 this npc can give you quest 580 UNIT_NPC_FLAG_VENDOR 4 0x00004 vendor.. 581 UNIT_NPC_FLAG_TAXIVENDOR 8 0x00008 gryfon master and oder fly masters .... 582 UNIT_NPC_FLAG_TRAINER 16 0x00010 trainer this npc teatch you some spell 583 UNIT_NPC_FLAG_SPIRITHEALER 32 0x00020 ghost in graveyeard(visible only to dead) 584 UNIT_NPC_FLAG_SPIRITGUIDE 64 0x00040 ghost in battleground(visible only to dead) 585 UNIT_NPC_FLAG_INNKEEPER 128 0x00080 you can give to this npc your heartstone 586 UNIT_NPC_FLAG_BANKER 256 0x00100 bank in capital city 587 UNIT_NPC_FLAG_PETITIONER 512 0x00200 the guy you get the petitionpaper for signing a Guild 588 UNIT_NPC_FLAG_TABARDVENDOR 1024 0x00400 in this guy you can build tabart 589 UNIT_NPC_FLAG_BATTLEFIELDPERSON 2048 0x00800 battlemaster ... for Warsong and oder battlegrount this npc give you intro quorte 590 UNIT_NPC_FLAG_AUCTIONEER 4096 0x01000 auction house 591 UNIT_NPC_FLAG_STABLE 8192 0x02000 stable master for hunter you can keep your pet in stable 592 UNIT_NPC_FLAG_ARMORER 16384 0x04000 in this you you can repair your damaget items 593 32768 0x08000 (unused) 594 UNIT_NPC_FLAG_GUARD 65536 0x10000 guard directions help (custom flag used at sever side only 595 596 597 To see flag combinations, just use this tool: http://www.mangosproject.org/~wrs/tools/flags.php ;) 598 599 NPCs with one than one function get their flag by adding the flag values. A trainer that gives quest and sells stuff would have the NPCFLAG 16+2+4=22. It's really that easy ;) 600 speed ¶ 601 602 Creature's speed. 603 rank ¶ 604 605 Creature's honnor rank. 606 0 - Normal 607 1 - Elite 608 2 - RareElite? 609 3 - WorldBoss? 610 4 - Rare 611 612 mindmg ¶ 613 614 Creature's minimum melee damage. 615 maxdmg ¶ 616 617 Creature's maximum melee damage. 618 dmgschool ¶ 619 620 Creature's melee damage spell school (by default 0/SPELL_SCHOOL_NORMAL/physical damage). 621 attackpower ¶ 622 623 Creature's melee attack power. 624 baseattacktime ¶ 625 626 Time between each creature's melee attacks. 627 rangeattacktime ¶ 628 629 Time between each creature's range attacks. 630 flags ¶ 631 632 !!! Need info here : Feel free to describe if you know !!! 633 mount ¶ 634 635 Creature's mount model ID ... if the value is equal to zero then creature doesn't have any mount. 636 dynamicflags ¶ 637 638 !!! Need info here : Feel free to describe if you know !!! 639 size ¶ 640 641 Creature model size 1 = 100% 642 family ¶ 643 Id Family 644 1 Wolf 645 2 Cat 646 3 Spider 647 4 Bear 648 5 Boar 649 6 Crocolisk 650 7 Carrion Bird 651 8 Crab 652 9 Gorilla 653 10 [UNUSED] 654 11 Raptor 655 12 Tallstrider 656 13 [UNUSED] 657 14 [UNUSED] 658 15 Felhunter 659 16 Voidwalker 660 17 Succubus 661 18 [UNUSED] 662 19 Doomguard 663 20 Scorpid 664 21 Turtle 665 22 [UNUSED] 666 23 Imp 667 24 Bat 668 25 Hyena 669 26 Owl 670 27 Wind Serpent 671 28 Remote Control 672 29 Felguard 673 30 Dragonhawk 674 31 Ravager 675 32 Warp Stalker 676 33 Sporebat 677 34 Nether Ray 678 35 Serpent 679 bounding_radius ¶ 680 681 Radius from what u can be attacked ! 682 trainer_type ¶ 683 684 685 TRAINER_TYPE_CLASS = 0 //Train Spell your class. Must be creature_template.class == player class for training 686 TRAINER_TYPE_MOUNTS = 1 //Train Spell your race (mounts). Must be creature_template.race == player race for training 687 TRAINER_TYPE_TRADESKILLS = 2 //Train Trade skills Mining,Herb, first aid .... Pдayer must known creature_template.trainer_spell for training 688 TRAINER_TYPE_PETS = 3 //Train Pet only for hunter(train hunter train pet) creature_template.class == HUNTER == player class for training 689 690 691 trainer_spell ¶ 692 693 Spell ID. Used for check in case npcflag include trainer flag (16) and trainer_type == TRAINER_TYPE_TRADESKILLS. Player must known trainer_spell to start training 694 See : character.class. 695 class ¶ 696 697 Creature's class, like 'character.class' field. Used for check in case npcflag include trainer flag (16) and trainer_type == TRAINER_TYPE_CLASS or TRAINER_TYPE_PETS 698 See : character.class. 699 race ¶ 700 701 Creature's race, like 'character.race' field. Used for check in case npcflag include trainer flag (16) and trainer_type == TRAINER_TYPE_MOUNTS 702 See : character.race. 703 minrangedmg ¶ 704 705 Minimum creature's range damage. 706 maxrangedmg ¶ 707 708 Maximum creature's range damage. 709 rangedattackpower ¶ 710 711 Creature's ranged attack power. 712 combat_reach ¶ 713 714 The distance from the creature can hit you. 715 type ¶ 716 Id Type 717 1 Beast 718 2 Dragonkin 719 3 Demon 720 4 Elemental 721 5 Giant 722 6 Undead 723 7 Humanoid 724 8 Critter 725 9 Mechanical 726 10 Not specified 727 11 Totem 728 civilian ¶ 729 730 If is this NPC civilian or not. 731 732 If this is a boolean value (Civilian or not), why is it a int(4) ? 733 flag1 ¶ 734 735 !!! Need info here : Feel free to describe if you know !!! 736 equipmodel1 ¶ 737 738 Equipement's model of the first item weared by the creature. 739 equipmodel2 ¶ 740 741 Equipement's model of the second item weared by the creature. 742 equipmodel3 ¶ 743 744 Equipement's model of the third item weared by the creature. 745 equipinfo1 ¶ 746 747 !!! Need info here : Feel free to describe if you know !!! 748 equipinfo2 ¶ 749 750 !!! Need info here : Feel free to describe if you know !!! 751 equipinfo3 ¶ 752 753 !!! Need info here : Feel free to describe if you know !!! 754 equipslot1 ¶ 755 756 !!! Need info here : Feel free to describe if you know !!! 757 equipslot2 ¶ 758 759 !!! Need info here : Feel free to describe if you know !!! 760 equipslot3 ¶ 761 762 !!! Need info here : Feel free to describe if you know !!! 763 lootid ¶ 764 765 Refered to field loot_template.entry 766 skinloot ¶ 767 768 Type of loot if creature is skinned. 769 resistance1 ¶ 770 771 holy resitance 772 resistance2 ¶ 773 774 fire resistance 775 resistance3 ¶ 776 777 nature resistance 778 resistance4 ¶ 779 780 frost resistance 781 resistance5 ¶ 782 783 shadow resistance 784 resistance6 ¶ 785 786 arcane resistance 787 spell1 ¶ 788 789 Creature's first spell. ??? refer to game_spell.id ??? 790 spell2 ¶ 791 792 Creature's second spell. ??? refer to game_spell.id ??? 793 spell3 ¶ 794 795 Creature's third spell. ??? refer to game_spell.id ??? 796 spell4 ¶ 797 798 Creature fourth spell. ??? refer to game_spell.id ??? 799 mingold ¶ 800 801 Minimum gold drop. 802 maxgold ¶ 803 804 Maximum gold drop. 0 = creature don't drop any gold. 805 AIName ¶ 806 807 Name of the AI function creature uses. 808 MovementType? ¶ 809 810 Type of default creature movment. 811 Id Type 812 0 Idle (not move) 813 1 Random 814 2 Waypoint 815 InhabitType? ¶ 816 817 Where creature cat move and attack (bit mask). 818 Id Type 819 1 Ground 820 2 Water 821 3 Ground+Water 822 ScriptName? ¶ 823 824 Script's name creature uses. 825 826 ===================================== */ 827 'gameobject' => array( 828 'type' => array( 829 1 => "Beast", 830 2 => "Dragonkin", 831 3 => "Demon", 832 4 => "Elemental", 833 5 => "Giant", 834 6 => "Undead", 835 7 => "Humanoid", 836 8 => "Critter", 837 9 => "Mechanical", 838 10 => "Not specified", 839 11 => "Totem" ), 840 ) 841 /* ===================================== 842 843 entry 844 ID of your choice ex : 5914 and in game : .addgo 5914 845 846 type: 847 Value Name Note 848 0 DOOR 849 1 BUTTON 850 2 QUESTGIVER 851 3 CHEST 852 4 ? 853 5 GENERIC 854 6 TRAP 855 7 CHAIR 856 8 SPELL_FOCUS 857 9 TEXT 858 10 GOOBER 859 11 TRANSPORT 860 12 ? 861 13 ? "Battlement Large" 862 14 ? do not possess the parameter? 863 15 MO_TRANSPORT 864 16 DUEL_FLAG 865 17 FISHING_BOBBER 866 18 RITUAL 867 19 MAILBOX 868 20 ? 869 21 ? 870 22 SPELLCASTER 871 23 MEETING_STONE 872 24 FLAGSTAND (BG_Flag) 873 25 FISHING_HOLE 874 26 ? 875 27 CUSTOM_TELEPORTER Not supported but sended to client, can create problems in client work. 876 28 ? 877 29 BANNER? 878 879 displayId: 880 Graphic model's id sent to the client. 881 882 name: 883 Object's name. 884 885 faction: 886 Object's faction, if any. 887 888 flags: 889 !!! Need info here : Feel free to document if you know !!! 890 891 size: 892 Object's size must be set because graphic models can be resample. 893 894 sound0 - sound11: 895 Data fields specific for different type field values. Each type has unique fields. 896 897 ScriptName? 898 Script's name this object uses, if needed. 899 900 Gameobject type 0 ( DOOR ): 901 sound0 = State 902 sound1 = LockID ( ID from Lock.dbc ) 903 sound2 = flags ? 904 sound3 = flags ? 905 sound4 = 0 906 sound5 = 0 907 sound6 = 0 908 sound7 = 0 909 sound8 = 0 910 sound9 = 0 911 sound10 = 0 912 sound11 = 0 913 914 Gameobject type 1 ( BUTTON ): 915 sound0 = State 916 sound1 = LockID ( ID from Lock.dbc ) 917 sound2 = flags ? 918 sound3 = ID gameobject ( Spawned GO type 6 ) 919 sound4 = State Battleground ? 920 sound5 = 0 921 sound6 = 0 922 sound7 = 0 923 sound8 = 0 924 sound9 = 0 925 sound10 = 0 926 sound11 = 0 927 928 Gameobject type 2 ( QUESTGIVER ): 929 sound0 = LockID ( ID from Lock.dbc ) 930 sound1 = QuestLoot? ID (Quest Id to be given) 931 sound2 = 0 932 sound3 = QuestLoot? ID 933 sound4 = 0 934 sound5 = 0 935 sound6 = 0 936 sound7 = 0 937 sound8 = 0 938 sound9 = 0 939 sound10 = 0 940 sound11 = 0 941 942 Gameobject type 3 ( CHEST ): 943 sound0 = LockID ( ID from Lock.dbc ) 944 sound1 = LootID 945 sound2 = Time 946 sound3 = State 947 sound4 = MinLoot? ( Min successful loot attempts for Mining Gerbalism etc ) 948 sound5 = MaxLoot? ( Max successful loot attempts for Mining Gerbalism etc ) 949 sound6 = QuestLoot? ID 950 sound7 = ID gameobject ( Spawned GO type 6 ) 951 sound8 = QuestID ( Quest complete ) 952 sound9 = ? 953 sound10 = ? 954 sound11 = 0 955 956 Gameobject type 5 ( GENERIC ): 957 sound0 = State 958 sound1 = State 959 sound2 = 0 960 sound3 = 0 961 sound4 = 0 962 sound5 = 0 963 sound6 = 0 964 sound7 = 0 965 sound8 = 0 966 sound9 = 0 967 sound10 = 0 968 sound11 = 0 969 970 Gameobject type 6 ( TRAP ): 971 sound0 = LockID ( ID from Lock.dbc ) 972 sound1 = Time 973 sound2 = Distance 974 sound3 = Spell ID 975 sound4 = State ? 976 sound5 = Time/Distance ? 977 sound6 = Chain Effect 978 sound7 = Time/Distance for Chain Effect 979 sound8 = 0 980 sound9 = 0 981 sound10 = 0 982 sound11 = 0 983 984 Gameobject type 7 ( CHAIR ): 985 sound0 = State 986 sound1 = Distance/ State ? 987 sound2 = 0 988 sound3 = 0 989 sound4 = 0 990 sound5 = 0 991 sound6 = 0 992 sound7 = 0 993 sound8 = 0 994 sound9 = 0 995 sound10 = 0 996 sound11 = 0 997 998 Gameobject type 8 ( SPELL_FOCUS ): 999 sound0 = ID SpellFocusObject.dbc. See SpellFocusObjectID 1000 sound1 = Distance 1001 sound2 = ID gameobject ( Spawned GO type 6 ) 1002 sound3 = State ? 1003 sound4 = 0 1004 sound5 = 0 1005 sound6 = 0 1006 sound7 = 0 1007 sound8 = 0 1008 sound9 = 0 1009 sound10 = 0 1010 sound11 = 0 1011 1012 Gameobject type 9 ( TEXT ): 1013 sound0 = Page ID 1014 sound1 = 0 1015 sound2 = ID from PageTextMaterial?.dbc 1016 sound3 = 0 1017 sound4 = 0 1018 sound5 = 0 1019 sound6 = 0 1020 sound7 = 0 1021 sound8 = 0 1022 sound9 = 0 1023 sound10 = 0 1024 sound11 = 0 1025 1026 Gameobject type 10 ( GOOBER ): 1027 sound0 = LockID ( ID from Lock.dbc ) 1028 sound1 = flags ? 1029 sound2 = QuestLoot? ID ? 1030 sound3 = flags ? 1031 sound4 = State ? 1032 sound5 = State ? 1033 sound6 = 0 1034 sound7 = 0 1035 sound8 = 0 1036 sound9 = 0 1037 sound10 = Spell ID 1038 sound11 = 0 1039 1040 Gameobject type 18 ( RITUAL ): 1041 sound0 = Time ? 1042 sound1 = Spell ID 1043 sound2 = Spell ID 1044 sound3 = 0 1045 sound4 = ? 1046 sound5 = ? 1047 sound6 = 0 1048 sound7 = 0 1049 sound8 = 0 1050 sound9 = 0 1051 sound10 = 0 1052 sound11 = 0 1053 1054 Gameobject type 22 ( SPELLCASTER ): 1055 sound0 = Spell ID 1056 sound1 = 0 1057 sound2 = State ? 1058 sound3 = 0 1059 sound4 = 0 1060 sound5 = 0 1061 sound6 = 0 1062 sound7 = 0 1063 sound8 = 0 1064 sound9 = 0 1065 sound10 = 0 1066 sound11 = 0 1067 1068 Gameobject type 24 ( FLAGSTAND ): 1069 sound0 = 0 1070 sound1 = Spell ID 1071 sound2 = ? 1072 sound3 = Spell ID 1073 sound4 = Spell ID 1074 sound5 = ? 1075 sound6 = 0 1076 sound7 = 0 1077 sound8 = 0 1078 sound9 = 0 1079 sound10 = 0 1080 sound11 = 0 1081 1082 Gameobject type 27 ( CUSTOM_TELEPORTER ): 1083 sound0 = areatrigger_template.id 1084 sound1 = 0 1085 sound2 = 0 1086 sound3 = 0 1087 sound4 = 0 1088 sound5 = 0 1089 sound6 = 0 1090 sound7 = 0 1091 sound8 = 0 1092 sound9 = 0 1093 sound10 = 0 1094 sound11 = 0 1095 1096 ===================================== */ 1097 ); 1098 3 1099 ?> 4 5 6 7 <?php8 };9 ?> -
db/config.sample.php
r109 r113 30 30 ); 31 31 32 $Database = array(33 'class' => array(34 1 => "Warrior",35 2 => "Paladin",36 3 => "Hunter",37 4 => "Rogue",38 5 => "Priest",39 6 => "",40 7 => "Shaman",41 8 => "Mage",42 9 => "Warlock",43 10 => "",44 11 => "Druid"45 ),46 'race' => array(47 1 => "Human",48 2 => "Orc",49 3 => "Dwarf",50 4 => "Night Elf",51 5 => "Undead",52 6 => "Tauren",53 7 => "Gnome",54 8 => "Troll",55 9 => "",56 10 => "Blood Elf",57 11 => "Dranei"58 ),59 'item' => array(60 1 => "",61 2 => ""62 ),63 'quest' => array(64 1 => "",65 2 => ""66 ),67 'creep' => array(68 'type' => array(69 1 => "Beast",70 2 => "Dragonkin",71 3 => "Demon",72 4 => "Elemental",73 5 => "Giant",74 6 => "Undead",75 7 => "Humanoid",76 8 => "Critter",77 9 => "Mechanical",78 10 => "Not specified",79 11 => "Totem" ),80 )81 );82 83 32 ?> -
db/include/bug_report.php
r109 r113 1 1 <?php 2 2 if($vlozeni_souboru == "OK"){ 3 4 5 if( $id == "bugreport" AND !empty($bug) ){ 6 $sql_select = $BasicWiewer->bug($bug); 7 ## ================== Výpis bugu ================== ## 8 9 if( !empty($sql_select['error']) ){ 10 echo $sql_select['error']; ?> 11 <br><p><a href="./index.php?id=sendbug">Pokud chcete nějaké chyby nahlásit pokračujte zde.</a></p> 12 <?php 13 } 14 else{ ?> 15 <table border="0" id="sendbug" cellspacing="0" cellpadding="2"> 16 <col width="120px;"><col width="160px;"> 17 <tr><td><b>Vlozil:</b></td><td><?php echo preg_replace(array("(\<)","(\>)"), array("<",">"), $sql_select['bug']['nick']); ?></td></tr> 18 <tr><td><b>Vlozeno:</b></td><td><?php echo @date("H:i d.m.Y", $sql_select['bug']['vlozeno']); ?></td></tr> 19 <tr><td><b>Status:</b></td><td><?php echo $sql_select['bug']['opraveno']; ?></td></tr> 20 <tr><td><b>Opravil:</b></td><td><?php echo $sql_select['bug']['opravil_nick']; ?></td></tr> 21 <tr><td><b>Popis Chyby:</b></td><td></td><td></td></tr> 22 <tr><td colspan='3' class="text"><?php echo nl2br(preg_replace(array("(\<)","(\>)"), array("<",">"), $sql_select['bug']['popis'])); ?></td></tr> 23 <?php if( !empty($sql_select['bug']['popis_opravy']) ){ ?> 24 <tr><td><b>Popis Opravy:</b></td><td></td><td></td></tr> 25 <tr><td colspan='3' class="text"><?php echo nl2br(preg_replace(array("(\<)","(\>)"), array("<",">"), $sql_select['bug']['popis_opravy'])); ?></td></tr> 26 <?php }; ?> 27 </table> 28 29 <br><p><a href="./index.php?id=sendbug">Pokud chcete nějaké chyby nahlásit pokračujte zde.</a></p> 30 <?php 31 }; 32 ## ================== Výpis bugu ================== ## 33 } 34 elseif( $id == "bugreport" AND empty($bug) ){ 35 $sql_select = $BasicWiewer->bugs($bug,$limit,20); 36 ## ================== Výpis bugů ================== ## 37 if( !empty($sql_select['error']) ){ 38 echo $sql_select['error']; ?> 39 <br><p><a href="./index.php?id=sendbug">Pokud chcete nějaké chyby nahlásit pokračujte zde.</a></p> 40 <?php 41 } 42 else{ 43 echo $sql_select['result']; ?> 44 <br><p><a href="./index.php?id=sendbug">Pokud chcete nějaké chyby nahlásit pokračujte zde.</a></p> 45 <?php 46 }; 47 ## ================== Výpis bugů ================== ## 48 } 49 elseif( $id == "sendbug" ){ 50 $sql_insert = $BasicWiewer->bugSend(); 51 ## ================== Vložení bugu ================== ## 52 ?> 53 <?php echo $sql_insert['result']; ?> 54 <p>Příspěvky, které se netýkají chyb v databázi, budou nemilosrdně mazány.</p> 55 <form action="./index.php?id=sendbug" method="post" accept-charset="utf-8"> 56 <table id="sendbug" border="0" cellspacing="0" cellpadding="2"> 57 <tr><td> 58 <label for="game_nick">Váš nick ve hře:</label></td><td> 59 <input type="text" name="game_nick" id="game_nick" maxlength="50" style="width:300px;"> 60 </td></tr><tr><td> 61 <label for="err_type">Typ chyby:</label></td><td> 62 <select name="err_type" id="err_type" style="width:300px;"> 63 <option value="q">Buglý Úkol (Quest)</option> 64 <option value="i">Buglá Věc (Item)</option> 65 <option value="c">Buglý Creep (NPC)</option> 66 <option value="g">Buglý Objekt ve hře (Gameobject)</option> 67 <option value="p">Buglá Profese (Profesion)</option> 68 <option value="s">Buglé Kouzlo (Spell)</option> 69 <option value="t">Buglý Talent</option> 70 <option value="o">Jiný</option> 71 </select> 72 </td></tr><tr><td colspan='2'> 73 <label for="typ">Popis chyby:</label></td></tr><tr><td colspan='2'> 74 <textarea name="popis" id="popis" rows="5" cols="50" style="width:474px;height:100px;"></textarea> 75 </td></tr><tr><td align='left' valign='top'> 76 <input type="submit" value="Nahlásit Chybu" name="send"></td><td> 77 </td></tr> 78 </table></form> 79 <?php 80 ## ================== Vložení bugu ================== ## 81 }; 82 83 84 }; 3 85 ?> 4 5 <?php if( !empty($sql_select['bug']) AND $id="bugreport" AND !empty($bug) ){ ?>6 7 <table border="0" id="sendbug" cellspacing="0" cellpadding="2">8 <col width="120px;"><col width="160px;">9 <tr><td><b>Vlozil:</b></td><td><?php echo preg_replace(array("(\<)","(\>)"), array("<",">"), $sql_select['bug']['nick']); ?></td></tr>10 <tr><td><b>Vlozeno:</b></td><td><?php echo @date("H:i d.m.Y", $sql_select['bug']['vlozeno']); ?></td></tr>11 <tr><td><b>Status:</b></td><td><?php echo $sql_select['bug']['opraveno']; ?></td></tr>12 <tr><td><b>Opravil:</b></td><td><?php echo $sql_select['bug']['opravil_nick']; ?></td></tr>13 <tr><td><b>Popis Chyby:</b></td><td></td><td></td></tr>14 <tr><td colspan='3' class="text"><?php echo nl2br(preg_replace(array("(\<)","(\>)"), array("<",">"), $sql_select['bug']['popis'])); ?></td></tr>15 <?php if( !empty($sql_select['bug']['popis_opravy']) ){ ?>16 <tr><td><b>Popis Opravy:</b></td><td></td><td></td></tr>17 <tr><td colspan='3' class="text"><?php echo nl2br(preg_replace(array("(\<)","(\>)"), array("<",">"), $sql_select['bug']['popis_opravy'])); ?></td></tr>18 <?php }; ?>19 </table>20 21 <br><p><a href="./index.php?id=sendbug">Pokud chcete nějaké chyby nahlásit pokračujte zde.</a></p>22 <?php } elseif( !empty($sql_select['result']) AND $id="bugreport" AND empty($bug) ){ ?>23 <?php echo $sql_select['result']; ?>24 <br><p><a href="./index.php?id=sendbug">Pokud chcete nějaké chyby nahlásit pokračujte zde.</a></p>25 <?php } elseif( $id=="sendbug" ){ ?>26 <?php echo $sql_insert['result']; ?>27 <p>Příspěvky, které se netýkají chyb v databázi, budou nemilosrdně mazány.</p>28 <form action="./index.php?id=sendbug" method="post" accept-charset="utf-8">29 <table id="sendbug" border="0" cellspacing="0" cellpadding="2">30 <tr><td>31 <label for="game_nick">Váš nick ve hře:</label></td><td>32 <input type="text" name="game_nick" id="game_nick" maxlength="50" style="width:300px;">33 </td></tr><tr><td>34 <label for="err_type">Typ chyby:</label></td><td>35 <select name="err_type" id="err_type" style="width:300px;">36 <option value="q">Buglý Úkol (Quest)</option>37 <option value="i">Buglá Věc (Item)</option>38 <option value="c">Buglý Creep (NPC)</option>39 <option value="g">Buglý Objekt ve hře (Gameobject)</option>40 <option value="p">Buglá Profese (Profesion)</option>41 <option value="s">Buglé Kouzlo (Spell)</option>42 <option value="t">Buglý Talent</option>43 <option value="o">Jiný</option>44 </select>45 </td></tr><tr><td colspan='2'>46 <label for="typ">Popis chyby:</label></td></tr><tr><td colspan='2'>47 <textarea name="popis" id="popis" rows="5" cols="50" style="width:474px;height:100px;"></textarea>48 </td></tr><tr><td align='left' valign='top'>49 <input type="submit" value="Nahlásit Chybu" name="send"></td><td>50 </td></tr>51 </table></form>52 <?php } elseif( !empty($sql_select['error']) ){ ?>53 <?php echo $sql_select['error']; ?>54 <br><p><a href="./index.php?id=sendbug">Pokud chcete nějaké chyby nahlásit pokračujte zde.</a></p>55 <?php }; ?>56 57 <?php58 };59 ?> -
db/include/creep.php
r110 r113 23 23 }; 24 24 </script> 25 26 <?php 27 $sql_select = $BasicWiewer->creature($creature); 28 ?> 25 29 26 30 <?php if( empty($sql_select['error']) ){ ?> -
db/include/creeps.php
r109 r113 1 1 <?php 2 2 if($vlozeni_souboru == "OK"){ 3 ?> 4 5 <?php 6 $sql_select = $BasicWiewer->searchCreep($q,$limit,20); 3 7 ?> 4 8 -
db/include/quest.php
r82 r113 1 1 <?php 2 2 if($vlozeni_souboru == "OK"){ 3 4 $nevyresene=0; 5 $sql_select = $BasicWiewer->quest($quest); 3 6 ?> 4 7 … … 7 10 <tr><td width="30%"><table width="100%" border="0" cellspacing="0" cellpadding="0"> 8 11 <tr><td>ID Questu: <?php echo $sql_select['quest']['entry']; ?></td></tr> 9 <tr><td>Začíná u:</td></tr> 10 <tr><td style="padding-left:20px;"><?php echo $sql_select['other']['StartNPC']; ?></td></tr> 12 <tr><td>Začíná u: <?php echo $sql_select['other']['StartNPC']; ?></td></tr> 13 <tr><td>Končí u: <?php echo $sql_select['other']['EndNPC']; ?></td></tr> 14 <?php if($nevyresene==1){ //nevyřešeno !!! ?> 11 15 <tr><td>Oblast:</td></tr> 12 16 <tr><td style="padding-left:20px;"><?php echo "???"; ?></td></tr> 17 <?php }; ?> 13 18 <tr><td>Level: <?php echo $sql_select['quest']['QuestLevel']; ?></td></tr> 14 19 <tr><td>Počet XP: <?php echo $sql_select['quest']['RewXpOrMoney']; ?></td></tr> … … 18 23 <?php }; ?> 19 24 20 <?php $zobrazit=0; if($zobrazit=1){ //nevyřešeno !!! ?>25 <?php if($nevyresene==1){ //nevyřešeno !!! ?> 21 26 <?php if( $sql_select['quest']['PrevQuestId']!=0 OR $sql_select['quest']['NextQuestId']!=0 ){ ?> 22 27 <tr><td><b>Návaznost:</b></td></tr> -
db/include/questy.php
r92 r113 1 1 <?php 2 2 if($vlozeni_souboru == "OK"){ 3 4 5 $sql_select = $BasicWiewer->searchQuest($q,$lvl_d,$lvl_h,$limit,20); 3 6 ?> 4 7 -
db/include/uvod.php
r92 r113 15 15 klidně pište na ICQ 327671143 nebo na E-mail: HosipLan<!-- spam ochrana -->@<!-- spam ochrana -->seznam.cz</p> 16 16 17 <?php /* 18 // Tohel tady zatím může strašit.. 19 <h4>Na projektu se podílejí:</h4> 17 <?php // test !!! 20 18 21 <ul id="ucast"> 22 <li>HosipLan <ul> 23 <li>Základní struktura stránky</li> 24 <li>Základní grafika</li> 25 <li>Hledání questů</li> 26 <li>Základní výpis Questů</li> 27 <li>Základní výpis Creepů</li> 28 </ul></li> 29 <li>Bbtrash <ul> 30 <li>Konzultace v nesnázích a psychycká podpora :)</li> 31 <li>Nějaká ta rada ohledně databáze.</li> 32 </ul></li> 33 <li>Chronos <ul> 34 <li>Konzultace v nesnázích a psychycká podpora :)</li> 35 <li>Nějaká ta rada ohledně databáze.</li> 36 </ul></li> 37 <li>Perihelion <ul> 38 <li>Konzultace v nesnázích a psychycká podpora :)</li> 39 <li>Nějaká ta rada ohledně databáze.</li> 40 </ul></li> 41 <li>Borci <ul> 42 <li>Úprava titulního obrázku</li> 43 </ul></li> 44 </ul> 19 //$databaseR->resetSelection('class','2','item'); 20 //print($databaseR->returnResult()."<br>\n"); 45 21 46 <p>Tímto děkuji všem co se jakkoliv zapojili.</p> */47 22 ?> 48 23 -
db/index.php
r109 r113 4 4 if( !empty($session_id) ){ $session = $session_id; }; 5 5 6 /* =========== Security =========== */ 7 if( isset($_GET['Database']) OR isset($_POST['Database']) ){ unset($_GET['Database']); unset($_POST['Database']); }; 8 if( isset($_GET['DB_read']) OR isset($_POST['DB_read']) ){ unset($_GET['DB_read']); unset($_POST['DB_read']); }; 9 if( isset($_GET['Menu']) OR isset($_POST['Menu']) ){ unset($_GET['Menu']); unset($_POST['Menu']); }; 10 if( isset($_GET['text']) OR isset($_POST['text']) ){ unset($_GET['text']); unset($_POST['text']); }; 11 $klic=array_keys($_POST); 12 for ($i=0;$i<=count($klic)-1;$i++) { 13 $_POST[$klic[$i]]=addslashes($_POST[$klic[$i]]); 14 }; 15 $klic=array_keys($_GET); 16 for ($i=0;$i<=count($klic)-1;$i++) { 17 $_GET[$klic[$i]]=addslashes($_GET[$klic[$i]]); 18 }; 19 6 20 /* =========== Config aj. =========== */ 7 21 require_once "./config.php"; 8 22 require_once "./check_database.php"; 23 require_once "./functions.php"; 24 $databaseR = new CheckDatabaseArray(); 9 25 10 26 /* =========== Připojení k Databázi =========== */ … … 13 29 14 30 /* =========== Login / Logout =========== */ 15 @mysql_select_db($Config['DB_read']['DB_read']['Database_realmd']) 16 OR DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_realmd']."!</p>"); 17 @mysql_query("SET CHARACTER SET utf8"); 31 SwitchDB(2); // nastavení databáze na realmd 18 32 19 33 if( !empty($_POST['username']) AND !empty($_POST['pass']) ){ … … 27 41 $login_info = @MySQL_Fetch_Array($sql_user); 28 42 29 @mysql_select_db($Config['DB_read']['DB_read']['Database_web']) 30 OR DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_web']."!</p>"); 31 @mysql_query("SET CHARACTER SET utf8"); 43 SwitchDB(3); // nastavení databáze na web 32 44 33 45 $sql_active_id_dotaz = @mysql_query("SELECT * FROM `acc_online` WHERE `nick`='".$login_info['username']."' LIMIT 1"); … … 54 66 }; 55 67 56 @mysql_select_db($Config['DB_read']['DB_read']['Database_web']) 57 OR DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_web']."!</p>"); 58 @mysql_query("SET CHARACTER SET utf8"); 68 SwitchDB(3); // nastavení databáze na web 59 69 60 70 if( $_GET['id'] == "logout" ){ … … 147 157 $Menu = array_merge($Menu, $Menu_add); 148 158 149 /* =========== Speciální FCE =========== */150 function DelNl($str){151 $str = @str_replace("\n","",$str);152 $str = @str_replace("\r","",$str);153 return $str;154 };155 156 function AbsCheck($int){ return (abs($int)==$int)? true : false; };157 158 function CheckQuestRace(){159 160 return true;161 };162 163 function StranovaniVypisu($sql, $limit, $nastranu, $adresa, $SID){164 global $text;165 $pocet_radku = @mysql_num_rows(mysql_query($sql));166 if( $pocet_radku > 0 ) {167 $listovani = $pocet_radku/10;168 $listovani = ceil($listovani);169 $listovani = $listovani/($nastranu/10);170 $listovani = ceil($listovani);171 172 if( $listovani == 1 ){173 $navigace = "<< < <b>1</b> > >>";174 }175 elseif( $listovani > 1 ){176 $predchozi = $limit-1;177 $dalsi = $limit+1;178 $posledni = $listovani;179 if( $predchozi < 1 ){ $predchozi = 1; };180 181 if( $listovani <= 10 ){182 for( $i=1; ($i<=10)AND($i<=$listovani) ;$i++ ){183 if($i==$limit){$navigace['cisla'] .= " <b title=\"".$text['navigation']['onpage'].$text['navigation']['number']." $i\">".$i."</b>\n";}184 else{$navigace['cisla'] .= " <a href=\"index.php".$adresa."&list=".$i.$SID."\" title=\"".$text['navigation']['page'].$text['navigation']['number']." $i\">".$i."</a>\n";};185 };186 187 $navigace['zacatek'] = "<a href=\"index.php".$adresa."&list=1".$SID."\" title=\"".$text['navigation']['start']."\"><<</a>"." ";188 $navigace['zacatek'] .= "<a href=\"index.php".$adresa."&list=".$predchozi.$SID."\" title=\"".$text['navigation']['previous']."\"><</a> ";189 $navigace['konec'] = " <a href=\"index.php".$adresa."&list=".$dalsi.$SID."\" title=\"".$text['navigation']['next']."\">></a>"." ";190 $navigace['konec'] .= "<a href=\"index.php".$adresa."&list=".$posledni.$SID."\" title=\"".$text['navigation']['end']."\">>></a>";191 192 if( $limit == 1 ){ $navigace['zacatek'] = "<<"." < "; };193 if( $limit == $listovani ){ $navigace['konec'] = " > >>"; };194 }195 else{196 if( $limit <= 6 ){197 for( $i=1; ($i<=10) ;$i++ ){198 if($i==$limit){$navigace['cisla'] .= " <b title=\"".$text['navigation']['onpage'].$text['navigation']['number']." $i\">".$i."</b>\n";}199 else{$navigace['cisla'] .= " <a href=\"index.php".$adresa."&list=".$i.$SID."\" title=\"".$text['navigation']['page'].$text['navigation']['number']." $i\">".$i."</a>\n";};200 }; $navigace['cisla'] .= " ... ";201 }202 elseif( $limit >= 6 AND (($limit+6) <= $listovani) ){203 $navigace['cisla'] .= " ... ";204 205 for( $i=$limit-5; ($i<=$limit+5) ;$i++ ){206 207 if($i==$limit){$navigace['cisla'] .= " <b title=\"".$text['navigation']['onpage'].$text['navigation']['number']." $i\">".$i."</b>\n";}208 else{$navigace['cisla'] .= " <a href=\"index.php".$adresa."&list=".$i.$SID."\" title=\"".$text['navigation']['page'].$text['navigation']['number']." $i\">".$i."</a>\n";};209 210 }; $navigace['cisla'] .= " ... ";211 }212 elseif( ($limit+6) >= $listovani ){213 $navigace['cisla'] .= " ... ";214 for( $i=$listovani-10; ($i<=$listovani) ;$i++ ){215 if($i==$limit){$navigace['cisla'] .= " <b title=\"".$text['navigation']['onpage'].$text['navigation']['number']." $i\">".$i."</b>\n";}216 else{$navigace['cisla'] .= " <a href=\"index.php".$adresa."&list=".$i.$SID."\" title=\"".$text['navigation']['page'].$text['navigation']['number']." $i\">".$i."</a>\n";};217 };218 };219 220 $navigace['zacatek'] = "<a href=\"index.php".$adresa."&list=1".$SID."\" title=\"".$text['navigation']['start']."\"><<</a>"." ";221 $navigace['zacatek'] .= "<a href=\"index.php".$adresa."&list=".$predchozi.$SID."\" title=\"".$text['navigation']['previous']."\"><</a> ";222 $navigace['konec'] = " <a href=\"index.php".$adresa."&list=".$dalsi.$SID."\" title=\"".$text['navigation']['next']."\">></a>"." ";223 $navigace['konec'] .= "<a href=\"index.php".$adresa."&list=".$posledni.$SID."\" title=\"".$text['navigation']['end']."\">>></a>";224 225 226 if( $limit == 1 ){ $navigace['zacatek'] = "<<"." < "; };227 if( $limit == $listovani ){ $navigace['konec'] = " > >>"; };228 };229 $navigace = $navigace['zacatek'].$navigace['cisla'].$navigace['konec'];230 };231 232 return $navigace;233 }234 else{ return FALSE; };235 };236 237 function SQLselect_Strankovani($dotaz, $limit, $nastranu, $adresa, $SID){238 $navigace = StranovaniVypisu($dotaz, $limit, $nastranu, $adresa, $SID);239 $dotaz = @mysql_query($dotaz." LIMIT ".(--$limit*10*($nastranu/10)).", $nastranu ");240 $vysledek = array( '1' => $dotaz,241 'strankovani' => $navigace );242 return $vysledek;243 };244 245 function GenerateMenu(){246 global $Menu;247 248 $klice = array_keys($Menu);249 $klice_count = count($klice);250 251 for($i=0; $i <= $klice_count ;$i++){252 if($Menu[$klice[$i]][0] == 1){253 if( $inside_submenu == 1 ){ $Generated_Menu .= " </ul></li>\n"; }254 elseif( !empty($Generated_Menu) ){ $Generated_Menu .= "</li>\n"; } unset($inside_submenu);255 $Generated_Menu .= " <li><a href=\"".$Menu[$klice[$i]][1]."\">".$Menu[$klice[$i]][2]."</a>";256 $submenu = 1;257 }258 elseif($Menu[$klice[$i]][0] == 2){259 if( $submenu == 1 ){ $Generated_Menu .= "<ul>\n"; }; unset($submenu);260 $Generated_Menu .= " <li><a href=\"".$Menu[$klice[$i]][1]."\">".$Menu[$klice[$i]][2]."</a></li>\n";261 $inside_submenu = 1;262 }263 elseif($Menu[$klice[$i]][0] == 3){264 if( $submenu == 1 ){ $Generated_Menu .= "<ul>"; }; unset($submenu);265 $Generated_Menu .= " <li>".$Menu[$klice[$i]][1]."</li>\n";266 $inside_submenu = 1;267 }268 elseif( !empty($Menu[$klice[$i]][0]) AND !empty($Menu[$klice[$i]][1]) AND !empty($Menu[$klice[$i]][2]) ){269 $Generated_Menu .= " <li><a href=\"#\">Chyba !!</a>"; }270 else{ $Generated_Menu .= " </ul></li>\n"; };271 };272 273 return $Generated_Menu;274 };275 276 159 /* =========== END_TOP =========== */ 277 160 $vlozeni_souboru = "OK"; … … 300 183 301 184 /* =========== Výchozí databáze =========== */ 302 @mysql_select_db($Config['DB_read']['DB_read']['Database_mangos']) 303 OR DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_mangos']."!</p>"); 304 @mysql_query("SET CHARACTER SET utf8"); 185 SwitchDB(1); // nastavení databáze na mangos 186 187 switch($id){ 188 case 'character': $general_include = "./character.php"; break; 189 default: $general_include = "./hlavni.php"; break; 190 }; 305 191 306 192 /* =========== Vložení základního souboru =========== */ … … 308 194 309 195 require_once "./post_read.php"; 310 require_once "./hlavni.php"; 311 196 $BasicWiewer = new BasicWiewer(); 197 $BasicWiewer->setPage($id,$SID); 198 199 require_once $general_include; 312 200 313 201 mysql_close(); // odpojíme se od databáze -
db/post_read.php
r109 r113 2 2 if($vlozeni_souboru == "OK"){ 3 3 4 if( !empty($q) AND !empty($id) ){ 5 if( $id == "questy" ){ 6 if( !empty($lvl_d) AND !empty($lvl_h) ){ $where = "(`MinLevel`>='$lvl_d' AND `MinLevel`<='$lvl_h') AND "; }; 7 $sql_select = SQLselect_Strankovani("SELECT * FROM `quest_template` WHERE ( $where`Title` LIKE '%$q%' ) ORDER BY `entry` ASC", $limit, 20, "?id=questy&q=".$q."&lvl_d=".$lvl_d."&lvl_h=".$lvl_h, $SID); 8 if( @mysql_num_rows($sql_select[1]) > 0 ){ $i = 0; 9 $sql_select['result'] .= "<table width=\"100%\" class=\"search_result\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"; 10 $sql_select['result'] .= "<thead><tr><td>Název úkolu</td><td>Min level</td><td>Úkol zadává</td><td>Úkol</td></tr></thead>\n<col width=\"180px\"><col width=\"70px\">"; 4 class BasicWiewer{ 5 var $q; // dotaz na vyhledávání 6 var $id; // současná stránka 7 var $limit; // současná stránka 8 var $nastranu = 20; // počet výsledků hledání které budou vypsány 9 var $sql_select; // proměnná obsahující všechny výsledky pro výpis 10 var $SID; // proměnná obsahující imformaci o přihlášení pro předání na konec každého odkazu 11 12 // konkrétní proměnné podle toho s čím pracujme 13 var $quest; // GUID Questu 14 var $lvl_d; // min. lvl u Questu 15 var $lvl_h; // max. lvl u Questu 16 var $bug; // GUID Bugu 17 var $creature; // GUID Creepa 18 var $item; // GUID Itemu 19 20 // nastavuje vstupní hodnoty 21 public function setPage($id,$SID){ 22 $this->id = $id; 23 $this->sid = $SID; 24 } 25 26 public function searchQuest($q,$lvl_d,$lvl_h,$limit,$nastranu){ 27 $this->q = $q; 28 $this->lvl_d = $lvl_d; 29 $this->lvl_h = $lvl_h; 30 $this->limit = $limit; 31 $this->nastranu = $nastranu; 32 $this->searchQuests(); // vykonáme hledání 33 return $this->sql_select; 34 } 35 36 public function searchCreep($q,$limit,$nastranu){ 37 $this->q = $q; 38 $this->limit = $limit; 39 $this->nastranu = $nastranu; 40 $this->searchCreeps(); // vykonáme hledání 41 return $this->sql_select; 42 } 43 44 public function quest($quest){ 45 $this->quest = $quest; 46 $this->showQuest(); // získání dat o Questu 47 return $this->sql_select; 48 } 49 50 public function bugs($bug,$limit,$nastranu){ 51 $this->bug = $bug; 52 $this->limit = $limit; 53 $this->nastranu = $nastranu; 54 $this->showBugs(); // vrací všechny chyby i s navigací pro listování 55 return $this->sql_select; 56 } 57 public function bug($bug){ 58 $this->bug = $bug; 59 $this->showBug(); // získání dat o konkrétním bugu 60 return $this->sql_select; 61 } 62 public function bugSend(){ 63 $this->sendBug(); 64 return $this->sql_select; 65 } 66 67 public function creature($creature){ 68 $this->creature = $creature; 69 $this->showCreature(); // získání dat o Creepovy 70 return $this->sql_select; 71 } 72 73 public function item($item){ 74 $this->item = $item; 75 # need to complete !!! 76 return $this->sql_select; 77 } 78 79 public function myAcc(){ 80 $this->showMyAcc(); // získání dat o užvatelově účtu 81 return $this->sql_select; 82 } 83 84 /* ================================================== 85 * searchQuests() 86 * 87 * Tato funkce vyhledává 88 * v databázi questy 89 * 90 ================================================== */ 91 92 function searchQuests(){ 93 94 if( !empty($this->q) AND $this->id == "questy" ){ 95 96 if( !empty($this->lvl_d) AND !empty($this->lvl_h) ){ 97 $where = "(`MinLevel`>='".$this->lvl_d."' AND `MinLevel`<='".$this->lvl_h."') AND "; 98 }; 99 100 $this->sql_select = SQLselect_Strankovani("SELECT * FROM `quest_template` WHERE ( $where`Title` LIKE '%$q%' ) ORDER BY `entry` ASC", $this->limit, $this->nastranu, "?id=questy&q=".$this->q."&lvl_d=".$this->lvl_d."&lvl_h=".$this->lvl_h, $this->sid); 101 if( @mysql_num_rows($this->sql_select[1]) > 0 ){ 102 $this->sql_select['result'] .= "<table width=\"100%\" class=\"search_result\" cellspacing=\"0\" cellpadding=\"0\">\n"; 103 $this->sql_select['result'] .= "<thead><tr><td>Název úkolu</td><td>Min level</td><td>Úkol zadává</td><td>Úkol</td></tr></thead>\n<col width=\"180px\"><col width=\"70px\">"; 104 105 while( $result = MySQL_Fetch_Array($this->sql_select[1]) ){ 106 $this->sql_select['result'] .= " <tr valign='top'>"; 107 $this->sql_select['result'] .= "<td><a href=\"index.php?quest=".$result['entry']."\">".$result['Title']."</a></td>"; 108 $this->sql_select['result'] .= "<td>".$result['MinLevel']."</td>"; 109 $this->sql_select['result'] .= "<td>"; 110 111 $startovni_creature_dotaz = mysql_query("SELECT * FROM creature_template LEFT JOIN creature_questrelation ON creature_questrelation.id = creature_template.entry WHERE creature_questrelation.quest =".$result['entry']." "); 112 while( $start_creature = @MySQL_Fetch_Array($startovni_creature_dotaz) ){ 113 $this->sql_select['result'] .= "<a href=\"index.php?creature=".$start_creature['entry']."\">".$start_creature['name']."</a><br>"; 114 }; 115 $startovni_gameobject_dotaz = mysql_query("SELECT * FROM gameobject_template LEFT JOIN gameobject_questrelation ON gameobject_questrelation.id = gameobject_template.entry WHERE gameobject_questrelation.quest =".$result['entry']." "); 116 while( $start_gameobject = @MySQL_Fetch_Array($startovni_gameobject_dotaz) ){ 117 $this->sql_select['result'] .= "<a href=\"index.php?gameobject=".$start_gameobject['entry']."\">".$start_gameobject['name']."</a><br>"; 118 }; 119 120 $this->sql_select['result'] .= "</td>"; 121 $this->sql_select['result'] .= "<td>".$result['Objectives']."</td>"; 122 $this->sql_select['result'] .= "</tr>\n"; 123 }; 124 125 $this->sql_select['result'] .= "</table>\n"; 126 } 127 else{ 128 $this->sql_select['error'] = "<p>Nebyly nalezeny žádné questy.</p>"; 129 }; 130 return true; 131 }; 132 133 return false; 134 } 135 136 /* ================================================== 137 * searchCreeps() 138 * 139 * Tato funkce vyhledává 140 * v databázi creepy 141 * 142 ================================================== */ 143 144 function searchCreeps(){ 145 146 if( !empty($this->q) AND $this->id == "creeps" ){ 147 148 $this->sql_select = SQLselect_Strankovani("SELECT * FROM `creature_template` WHERE ( `name` LIKE '%".$this->q."%' OR `subname` LIKE '%".$this->q."%' ) ORDER BY `entry` ASC", $this->limit, $this->nastranu, "?id=creeps&q=".$this->q, $this->sid); 149 if( @mysql_num_rows($this->sql_select[1]) > 0 ){ 150 $this->sql_select['result'] .= "<table width=\"100%\" class=\"search_result\" cellspacing=\"0\" cellpadding=\"0\">\n"; 151 $this->sql_select['result'] .= "<thead><tr><td>Název creepa</td><td>Level</td></tr></thead>\n<col><col width=\"70px\">"; 152 153 while( $result = MySQL_Fetch_Array($this->sql_select[1]) ){ 154 $this->sql_select['result'] .= " <tr valign='top'>"; 155 $this->sql_select['result'] .= "<td><a href=\"index.php?creature=".$result['entry']."\">".$result['name']."</a></td>"; 156 if( $result['rank'] != 3 ){ 157 $this->sql_select['result'] .= "<td align='center'>".$result['minlevel']." - ".$result['maxlevel']."</td>"; 158 } 159 else{ 160 $this->sql_select['result'] .= "<td align='center'>Boss</td>"; 161 }; 162 $this->sql_select['result'] .= "</tr>\n"; 163 }; 164 165 $this->sql_select['result'] .= "</table>\n"; 166 } else{ $this->sql_select['error'] = "<p>Nebyly nalezeny žádní creepové.</p>"; }; 167 return true; 168 }; 169 170 return false; 171 } 172 173 /* ================================================== 174 * showQuest() 175 * 176 * Tato funkce vrací konkrétní Quest 177 * + provádí pár dalších operací s jeho daty 178 * 179 ================================================== */ 180 181 function showQuest(){ 182 183 if( is_numeric($this->quest) AND empty($this->id) ){ 184 185 $sql_select['sql'] = mysql_query("SELECT * FROM quest_template WHERE `entry`='".$this->quest."' LIMIT 1"); 186 if( @mysql_num_rows($sql_select['sql']) > 0 ){ 187 $this->sql_select['quest'] = MySQL_Fetch_Array($sql_select['sql']); 188 189 // Zjištění creatur a gameobjectů kde se Quest dá vzít 190 $startovni_NPC_dotaz_creature = mysql_query("SELECT * FROM creature_template LEFT JOIN creature_questrelation ON creature_questrelation.id = creature_template.entry WHERE creature_questrelation.quest =".$this->sql_select['quest']['entry']." "); 191 if( @mysql_num_rows($startovni_NPC_dotaz_creature) > 0 ){ 192 while($start_NPC = @MySQL_Fetch_Array($startovni_NPC_dotaz_creature)){ 193 $this->sql_select['other']['StartNPC'] .= "<a href=\"index.php?creature=".$start_NPC['entry']."\">".$start_NPC['name']."</a><br>\n"; 194 }; }; 195 $startovni_NPC_dotaz_gameobject = mysql_query("SELECT * FROM gameobject_template LEFT JOIN gameobject_questrelation ON gameobject_questrelation.id = gameobject_template.entry WHERE gameobject_questrelation.quest =".$this->sql_select['quest']['entry']." "); 196 if( @mysql_num_rows($startovni_NPC_dotaz_gameobject) > 0 ){ 197 while($start_NPC = @MySQL_Fetch_Array($startovni_NPC_dotaz_gameobject)){ 198 $this->sql_select['other']['StartNPC'] .= "<a href=\"index.php?gameobject=".$start_NPC['entry']."\">".$start_NPC['name']."</a><br>\n"; 199 }; }; 200 $startovni_dotaz_item = mysql_query("SELECT * FROM item_template WHERE startquest='".$this->sql_select['quest']['entry']."' "); 201 if( @mysql_num_rows($startovni_dotaz_item) > 0 ){ 202 while($start_NPC = @MySQL_Fetch_Array($startovni_dotaz_item)){ 203 switch($start_NPC['Quality']){ 204 case 0: $sql_select['other']['item_color'] = "class=\"graylink\""; break; 205 case 1: $sql_select['other']['item_color'] = "class=\"whitelink\""; break; 206 case 2: $sql_select['other']['item_color'] = "class=\"greenlink\""; break; 207 case 3: $sql_select['other']['item_color'] = "class=\"bluelink\""; break; 208 case 4: $sql_select['other']['item_color'] = "class=\"purplelink\""; break; 209 case 5: $sql_select['other']['item_color'] = "class=\"orangelink\""; break; 210 case 6: $sql_select['other']['item_color'] = "class=\"redlink\""; break; 211 }; 212 $this->sql_select['other']['StartNPC'] .= "<a href=\"index.php?item=".$start_NPC['entry']."\"".$sql_select['other']['item_color'].">".$start_NPC['name']."</a><br>\n"; 213 }; }; 214 if( empty($this->sql_select['other']['StartNPC']) ){ 215 $this->sql_select['other']['EndNPC'] = "<b>Úkol není kde začít!</b>"; }; 216 217 $ukoncovaci_NPC_dotaz_creature = mysql_query("SELECT * FROM creature_template LEFT JOIN creature_involvedrelation ON creature_involvedrelation.id = creature_template.entry WHERE creature_involvedrelation.quest =".$this->sql_select['quest']['entry']." "); 218 if( @mysql_num_rows($ukoncovaci_NPC_dotaz_creature) > 0 ){ 219 while($end_NPC = @MySQL_Fetch_Array($ukoncovaci_NPC_dotaz_creature)){ 220 $this->sql_select['other']['EndNPC'] .= "<a href=\"index.php?creature=".$end_NPC['entry']."\">".$end_NPC['name']."</a><br>\n"; 221 }; }; 222 $ukoncovaci_NPC_dotaz_gameobject = mysql_query("SELECT * FROM gameobject_template LEFT JOIN gameobject_involvedrelation ON gameobject_involvedrelation.id = gameobject_template.entry WHERE gameobject_involvedrelation.quest =".$this->sql_select['quest']['entry']." "); 223 if( @mysql_num_rows($ukoncovaci_NPC_dotaz_gameobject) > 0 ){ 224 while($end_NPC = @MySQL_Fetch_Array($ukoncovaci_NPC_dotaz_gameobject)){ 225 $this->sql_select['other']['EndNPC'] .= "<a href=\"index.php?gameobject=".$end_NPC['entry']."\">".$end_NPC['name']."</a><br>\n"; 226 }; }; 227 if( empty($this->sql_select['other']['EndNPC']) ){ 228 $this->sql_select['other']['EndNPC'] = "<b>Úkol není kde skončit!</b>"; }; 229 230 // Zjištění Oblasti 231 if( AbsCheck($this->sql_select['quest']['ZoneOrSort']) ){ } 232 else{ }; 233 234 // Důležitá věc 235 $SrcItemId_dotaz = mysql_query("SELECT * FROM item_template WHERE entry =".$this->sql_select['quest']['SrcItemId']." LIMIT 1;"); 236 if( @mysql_num_rows($SrcItemId_dotaz) > 0 ){ 237 $SrcItemId = @MySQL_Fetch_Array($SrcItemId_dotaz); 238 $this->sql_select['other']['SrcItemId'] .= "<a href=\"index.php?item=".$SrcItemId['entry']."\">".$SrcItemId['name']."</a><br>\n"; 239 }; 240 241 $this->sql_select['quest']['PrevQuestId']; 242 $this->sql_select['quest']['NextQuestId']; 243 244 $this->sql_select['other']['ReqItems']; // ReqItemId1-4.ReqItemCount1-4 245 246 $this->sql_select['other']['ReqSource']; // ?? 247 /* ReqSourceId1-4 248 These fields are used in core quest-drop logic. They allow players to get quest drops which are not quest delivery items (ReqItem stand for this), but needed to create quest delivery by player or needed to cast ReqSpellCasts. ReqSourceId1 is the item_template id of a source item for creation of ReqItemX or casting of ReqSpellCastX. X is the value of ReqSourceRef1. Only items which have a quest drop chance (having QuestChance > 0 in *_loot_template) should be used as sources here. 249 The same for ReqSourceId2-4 250 You may define 1, 2, 3 or even all 4 sources for the same ReqItem/ReqSpellCast or use 4 sources for 4 ReqItems/ReqSpellCasts. 251 ReqSourceCount1-4 252 Amount of ReqSourceId items the player may gather per unfinished ReqItemId or ReqSpellCast. 253 So ReqSourceId1 items will drop up to a total amount of (ReqItemCount(ReqSourceRef1) - already owned ReqItemId(ReqSourceRef1)) * ReqSourceCount1. Same for ReqSpellCast objectives. 254 ReqSourceRef1-4 255 Should be 0 or 1..4. See ReqSourceId description. */ 256 257 $this->sql_select['other']['ReqCreatureOrGOId']; // need to kill/cast 258 /* Value > 0: 1.-4. required creature_template ID the player needs to kill/cast on in order to complete the quest. 259 Value < 0: 1.-4. required gameobject_template ID the player needs to cast on in order to complete the quest. 260 If ReqSpellCastN > 0 then at ReqCreatureOrGOIdN must be casted spell ReqSpellCastN, if ReqSpellCastN = 0 then it must be killed. */ 261 262 $this->sql_select['other']['ReqSpellCast']; 263 /* Spell ID of Spell that needs to be cast in order to fulfill a quest objective. 264 If ReqSpellCastN > 0 then at ReqCreatureOrGOIdN must be casted spell ReqSpellCastN, if ReqSpellCastN = 0 then it must be killed. */ 265 266 $this->sql_select['other']['ReqSpellCast']; 267 /* Spell ID of Spell that needs to be cast in order to fulfill a quest objective. 268 If ReqSpellCastN > 0 then at ReqCreatureOrGOIdN must be casted spell ReqSpellCastN, if ReqSpellCastN = 0 then it must be killed. */ 269 270 $this->sql_select['other']['RewChoiceItemId']; // !!! RewChoiceItemCount 271 /* Id of the 1.-6. Item available for reward choice. */ 272 273 $this->sql_select['other']['RewItemId']; // !!! RewItemCount 274 /* 1.-4. item Id given for reward (no choice). */ 275 11 276 12 while( $result = MySQL_Fetch_Array($sql_select[1]) ){ 13 $sql_select['result'] .= " <tr valign='top'>"; 14 $sql_select['result'] .= "<td><a href=\"index.php?quest=".$result['entry']."\">".$result['Title']."</a></td>"; 15 $sql_select['result'] .= "<td>".$result['MinLevel']."</td>"; 16 $sql_select['result'] .= "<td>"; 277 } 278 else{ 279 $this->sql_select['error'] = "<p>Quest nebyl nalezen.</p>"; 280 }; 281 return true; 282 }; 283 284 return false; 285 } 286 287 /* ================================================== 288 * showCreature() 289 * 290 * Tato funkce vrací konkrétního Creepa 291 * + provádí pár dalších operací s jeho daty 292 * 293 ================================================== */ 294 295 function showCreature(){ 296 297 if( is_numeric($this->creature) AND empty($this->id) ){ 298 $this->sql_select['sql'] = mysql_query("SELECT * FROM creature_template WHERE `entry`='".$this->creature."' LIMIT 1"); 299 if( @mysql_num_rows($this->sql_select['sql']) > 0 ){ 300 $this->sql_select['creature'] = MySQL_Fetch_Array($this->sql_select['sql']); 17 301 18 $startovni_creature_dotaz = mysql_query("SELECT * FROM creature_template LEFT JOIN creature_questrelation ON creature_questrelation.id = creature_template.entry WHERE creature_questrelation.quest =".$result['entry']." "); 19 while( $start_creature = @MySQL_Fetch_Array($startovni_creature_dotaz) ){ 20 $sql_select['result'] .= "<a href=\"index.php?creature=".$start_creature['entry']."\">".$start_creature['name']."</a><br>"; 302 switch($sql_select['creature']['rank']){ 303 case 0: $sql_select['other']['creature_type'] = "Normal"; break; 304 case 1: $sql_select['other']['creature_type'] = "Elite"; break; 305 case 2: $sql_select['other']['creature_type'] = "Rare Elite"; break; 306 case 3: $sql_select['other']['creature_type'] = "World Boss"; break; 307 case 4: $sql_select['other']['creature_type'] = "Rare"; break; 21 308 }; 22 $startovni_gameobject_dotaz = mysql_query("SELECT * FROM gameobject_template LEFT JOIN gameobject_questrelation ON gameobject_questrelation.id = gameobject_template.entry WHERE gameobject_questrelation.quest =".$result['entry']." "); 23 while( $start_gameobject = @MySQL_Fetch_Array($startovni_gameobject_dotaz) ){ 24 $sql_select['result'] .= "<a href=\"index.php?gameobject=".$start_gameobject['entry']."\">".$start_gameobject['name']."</a><br>"; 309 310 $questy_dotaz_creature = mysql_query("SELECT * FROM `creature_questrelation` LEFT JOIN `quest_template` ON `creature_questrelation`.`quest` = `quest_template`.`entry` WHERE (`creature_questrelation`.`id` =".$this->sql_select['creature']['entry']." AND `quest_template`.`PrevQuestId`=0 ) "); 311 if( @mysql_num_rows($questy_dotaz_creature) > 0 ){ 312 while($quest_NPC = @MySQL_Fetch_Array($questy_dotaz_creature)){ 313 $this->sql_select['other']['creature_quests'] .= "<a href=\"index.php?quest=".$quest_NPC['entry']."\">".$quest_NPC['Title']."</a><br>\n"; 314 }; }; 315 316 $drop_creature = mysql_query("SELECT * FROM `creature_loot_template` LEFT JOIN `item_template` ON `creature_loot_template`.`item` = `item_template`.`entry` WHERE `creature_loot_template`.`entry`='".$this->sql_select['creature']['lootid']."' ORDER BY `Quality` DESC, `ChanceOrRef` DESC "); 317 if( @mysql_num_rows($drop_creature) > 0 ){ 318 while($drop_NPC = @MySQL_Fetch_Array($drop_creature)){ 319 switch($drop_NPC['Quality']){ 320 case 0: $sql_select['other']['item_color'] = "class=\"graylink\""; break; 321 case 1: $sql_select['other']['item_color'] = "class=\"whitelink\""; break; 322 case 2: $sql_select['other']['item_color'] = "class=\"greenlink\""; break; 323 case 3: $sql_select['other']['item_color'] = "class=\"bluelink\""; break; 324 case 4: $sql_select['other']['item_color'] = "class=\"purplelink\""; break; 325 case 5: $sql_select['other']['item_color'] = "class=\"orangelink\""; break; 326 case 6: $sql_select['other']['item_color'] = "class=\"redlink\""; break; 327 }; 328 $this->sql_select['other']['creature_drop'] .= "<tr><td><a href=\"index.php?item=".$drop_NPC['entry']."\" ".$sql_select['other']['item_color'].">".$drop_NPC['name']."</a></td>"; 329 $this->sql_select['other']['creature_drop'] .= "<td>".$drop_NPC['ChanceOrRef']."%</td></tr>\n"; 330 }; } else{ $this->sql_select['other']['creature_drop'] = "<tr><td colspan='2'>Tento creep nemá žádný drop !</td></tr>"; }; 331 332 $pickpocket_creature = mysql_query("SELECT * FROM `pickpocketing_loot_template` LEFT JOIN `item_template` ON `pickpocketing_loot_template`.`item` = `item_template`.`entry` WHERE `pickpocketing_loot_template`.`entry`='".$this->sql_select['creature']['pickpocketloot']."' ORDER BY `Quality` DESC, `ChanceOrRef` DESC "); 333 if( @mysql_num_rows($pickpocket_creature) > 0 ){ 334 while($drop_NPC = @MySQL_Fetch_Array($pickpocket_creature)){ 335 switch($drop_NPC['Quality']){ 336 case 0: $sql_select['other']['item_color'] = "class=\"graylink\""; break; 337 case 1: $sql_select['other']['item_color'] = "class=\"whitelink\""; break; 338 case 2: $sql_select['other']['item_color'] = "class=\"greenlink\""; break; 339 case 3: $sql_select['other']['item_color'] = "class=\"bluelink\""; break; 340 case 4: $sql_select['other']['item_color'] = "class=\"purplelink\""; break; 341 case 5: $sql_select['other']['item_color'] = "class=\"orangelink\""; break; 342 case 6: $sql_select['other']['item_color'] = "class=\"redlink\""; break; 343 }; 344 $this->sql_select['other']['creature_pickpocket'] .= "<tr><td><a href=\"index.php?item=".$drop_NPC['entry']."\" ".$sql_select['other']['item_color'].">".$drop_NPC['name']."</a></td>"; 345 $this->sql_select['other']['creature_pickpocket'] .= "<td>".$drop_NPC['ChanceOrRef']."%</td></tr>\n"; 346 }; } else{ $this->sql_select['other']['creature_pickpocket'] = "<tr><td colspan='2'>Tento creep nemá žádný Pickpocket !</td></tr>"; }; 347 348 $skin_creature = mysql_query("SELECT * FROM `skinning_loot_template` LEFT JOIN `item_template` ON `skinning_loot_template`.`item` = `item_template`.`entry` WHERE `skinning_loot_template`.`entry`='".$sql_select['creature']['skinloot']."' ORDER BY `Quality` DESC, `ChanceOrRef` DESC "); 349 if( @mysql_num_rows($skin_creature) > 0 ){ 350 while($drop_NPC = @MySQL_Fetch_Array($skin_creature)){ 351 switch($drop_NPC['Quality']){ 352 case 0: $sql_select['other']['item_color'] = "class=\"graylink\""; break; 353 case 1: $sql_select['other']['item_color'] = "class=\"whitelink\""; break; 354 case 2: $sql_select['other']['item_color'] = "class=\"greenlink\""; break; 355 case 3: $sql_select['other']['item_color'] = "class=\"bluelink\""; break; 356 case 4: $sql_select['other']['item_color'] = "class=\"purplelink\""; break; 357 case 5: $sql_select['other']['item_color'] = "class=\"orangelink\""; break; 358 case 6: $sql_select['other']['item_color'] = "class=\"redlink\""; break; 359 }; 360 $this->sql_select['other']['creature_skin'] .= "<tr><td><a href=\"index.php?item=".$drop_NPC['entry']."\" ".$sql_select['other']['item_color'].">".$drop_NPC['name']."</a></td>"; 361 $this->sql_select['other']['creature_skin'] .= "<td>".$drop_NPC['ChanceOrRef']."%</td></tr>\n"; 362 }; } else{ $this->sql_select['other']['creature_skin'] = "<tr><td colspan='2'>Tento creep nemá žádný Skin !</td></tr>"; }; 363 364 } 365 else{ 366 $this->sql_select['error'] = "<p>Creep nebyl nalezen.</p>"; 25 367 }; 26 27 $sql_select['result'] .= "</td>"; 28 $sql_select['result'] .= "<td>".$result['Objectives']."</td>"; 29 $sql_select['result'] .= "</tr>\n"; 30 }; 31 32 $sql_select['result'] .= "</table>\n"; 33 } else{ $sql_select['error'] = "<p>Nebyly nalezeny žádné questy.</p>"; }; 34 35 } 36 elseif( $id == "creeps" ){ 37 $sql_select = SQLselect_Strankovani("SELECT * FROM `creature_template` WHERE ( `name` LIKE '%$q%' OR `subname` LIKE '%$q%' ) ORDER BY `entry` ASC", $limit, 20, "?id=creeps&q=".$q, $SID); 38 if( @mysql_num_rows($sql_select[1]) > 0 ){ $i = 0; 39 $sql_select['result'] .= "<table width=\"100%\" class=\"search_result\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"; 40 $sql_select['result'] .= "<thead><tr><td>Název creepa</td><td>Level</td></tr></thead>\n<col><col width=\"70px\">"; 41 42 while( $result = MySQL_Fetch_Array($sql_select[1]) ){ 43 $sql_select['result'] .= " <tr valign='top'>"; 44 $sql_select['result'] .= "<td><a href=\"index.php?creature=".$result['entry']."\">".$result['name']."</a></td>"; 45 if( $result['rank'] != 3 ){ 46 $sql_select['result'] .= "<td align='center'>".$result['minlevel']." - ".$result['maxlevel']."</td>"; 47 } 48 else{ 49 $sql_select['result'] .= "<td align='center'>Boss</td>"; 50 }; 51 $sql_select['result'] .= "</tr>\n"; 52 }; 53 54 $sql_select['result'] .= "</table>\n"; 55 } else{ $sql_select['error'] = "<p>Nebyly nalezeny žádní creepové.</p>"; }; 56 57 }; 58 } 59 elseif( !empty($quest) AND empty($id) ){ 60 $sql_select['sql'] = mysql_query("SELECT * FROM quest_template WHERE `entry`='$quest' LIMIT 1;"); 61 if( @mysql_num_rows($sql_select['sql']) > 0 ){ $i = 0; 62 $result = MySQL_Fetch_Array($sql_select['sql']); 63 $sql_select['quest'] = $result; 64 65 // Zjištění creatur a gameobjectů kde se Quest dá vzít 66 $startovni_NPC_dotaz_creature = mysql_query("SELECT * FROM creature_template LEFT JOIN creature_questrelation ON creature_questrelation.id = creature_template.entry WHERE creature_questrelation.quest =".$sql_select['quest']['entry']." "); 67 if( @mysql_num_rows($startovni_NPC_dotaz_creature) > 0 ){ 68 while($start_NPC = @MySQL_Fetch_Array($startovni_NPC_dotaz_creature)){ 69 $sql_select['other']['StartNPC'] .= "<a href=\"index.php?creature=".$start_NPC['entry']."\">".$start_NPC['name']."</a><br>\n"; 70 }; }; 71 $startovni_NPC_dotaz_gameobject = mysql_query("SELECT * FROM gameobject_template LEFT JOIN gameobject_questrelation ON gameobject_questrelation.id = gameobject_template.entry WHERE gameobject_questrelation.quest =".$sql_select['quest']['entry']." "); 72 if( @mysql_num_rows($startovni_NPC_dotaz_gameobject) > 0 ){ 73 while($start_NPC = @MySQL_Fetch_Array($startovni_NPC_dotaz_gameobject)){ 74 $sql_select['other']['StartNPC'] .= "<a href=\"index.php?gameobject=".$start_NPC['entry']."\">".$start_NPC['name']."</a><br>\n"; 75 }; }; 76 if( empty($sql_select['other']['StartNPC']) ){ 77 $sql_select['other']['StartNPC'] = "<b>Úkol není kde začít!</b>"; } 78 79 // Zjištění Oblasti 80 if( AbsCheck($sql_select['quest']['ZoneOrSort']) ){ } 81 else{ }; 82 83 // Důležitá věc 84 $SrcItemId_dotaz = mysql_query("SELECT * FROM item_template WHERE entry =".$sql_select['quest']['SrcItemId']." LIMIT 1;"); 85 if( @mysql_num_rows($SrcItemId_dotaz) > 0 ){ 86 $SrcItemId = @MySQL_Fetch_Array($SrcItemId_dotaz); 87 $sql_select['other']['SrcItemId'] .= "<a href=\"index.php?item=".$SrcItemId['entry']."\">".$SrcItemId['name']."</a><br>\n"; 88 }; 89 90 $sql_select['quest']['PrevQuestId']; 91 $sql_select['quest']['NextQuestId']; 92 93 $sql_select['other']['ReqItems']; // ReqItemId1-4.ReqItemCount1-4 94 95 $sql_select['other']['ReqSource']; // ?? 96 /* ReqSourceId1-4 97 These fields are used in core quest-drop logic. They allow players to get quest drops which are not quest delivery items (ReqItem stand for this), but needed to create quest delivery by player or needed to cast ReqSpellCasts. ReqSourceId1 is the item_template id of a source item for creation of ReqItemX or casting of ReqSpellCastX. X is the value of ReqSourceRef1. Only items which have a quest drop chance (having QuestChance > 0 in *_loot_template) should be used as sources here. 98 The same for ReqSourceId2-4 99 You may define 1, 2, 3 or even all 4 sources for the same ReqItem/ReqSpellCast or use 4 sources for 4 ReqItems/ReqSpellCasts. 100 ReqSourceCount1-4 101 Amount of ReqSourceId items the player may gather per unfinished ReqItemId or ReqSpellCast. 102 So ReqSourceId1 items will drop up to a total amount of (ReqItemCount(ReqSourceRef1) - already owned ReqItemId(ReqSourceRef1)) * ReqSourceCount1. Same for ReqSpellCast objectives. 103 ReqSourceRef1-4 104 Should be 0 or 1..4. See ReqSourceId description. */ 105 106 $sql_select['other']['ReqCreatureOrGOId']; // need to kill/cast 107 /* Value > 0: 1.-4. required creature_template ID the player needs to kill/cast on in order to complete the quest. 108 Value < 0: 1.-4. required gameobject_template ID the player needs to cast on in order to complete the quest. 109 If ReqSpellCastN > 0 then at ReqCreatureOrGOIdN must be casted spell ReqSpellCastN, if ReqSpellCastN = 0 then it must be killed. */ 110 111 $sql_select['other']['ReqSpellCast']; 112 /* Spell ID of Spell that needs to be cast in order to fulfill a quest objective. 113 If ReqSpellCastN > 0 then at ReqCreatureOrGOIdN must be casted spell ReqSpellCastN, if ReqSpellCastN = 0 then it must be killed. */ 114 115 $sql_select['other']['ReqSpellCast']; 116 /* Spell ID of Spell that needs to be cast in order to fulfill a quest objective. 117 If ReqSpellCastN > 0 then at ReqCreatureOrGOIdN must be casted spell ReqSpellCastN, if ReqSpellCastN = 0 then it must be killed. */ 118 119 $sql_select['other']['RewChoiceItemId']; // !!! RewChoiceItemCount 120 /* Id of the 1.-6. Item available for reward choice. */ 121 122 $sql_select['other']['RewItemId']; // !!! RewItemCount 123 /* 1.-4. item Id given for reward (no choice). */ 124 125 126 } else{ $sql_select['error'] = "<p>Quest nebyl nalezen.</p>"; }; 127 128 } 129 elseif( !empty($creature) AND empty($id) ){ 130 $sql_select['sql'] = mysql_query("SELECT * FROM creature_template WHERE `entry`='$creature' LIMIT 1;"); 131 if( @mysql_num_rows($sql_select['sql']) > 0 ){ $i = 0; 132 $result = MySQL_Fetch_Array($sql_select['sql']); 133 $sql_select['creature'] = $result; 134 135 switch($sql_select['creature']['rank']){ 136 case 0: $sql_select['other']['creature_type'] = "Normal"; break; 137 case 1: $sql_select['other']['creature_type'] = "Elite"; break; 138 case 2: $sql_select['other']['creature_type'] = "Rare Elite"; break; 139 case 3: $sql_select['other']['creature_type'] = "World Boss"; break; 140 case 4: $sql_select['other']['creature_type'] = "Rare"; break; 141 }; 142 143 $questy_dotaz_creature = mysql_query("SELECT * FROM `creature_questrelation` LEFT JOIN `quest_template` ON `creature_questrelation`.`quest` = `quest_template`.`entry` WHERE (`creature_questrelation`.`id` =".$sql_select['creature']['entry']." AND `quest_template`.`PrevQuestId`=0 ) "); 144 if( @mysql_num_rows($questy_dotaz_creature) > 0 ){ 145 while($quest_NPC = @MySQL_Fetch_Array($questy_dotaz_creature)){ 146 $sql_select['other']['creature_quests'] .= "<a href=\"index.php?quest=".$quest_NPC['entry']."\">".$quest_NPC['Title']."</a><br>\n"; 147 }; }; 148 149 $drop_creature = mysql_query("SELECT * FROM `creature_loot_template` LEFT JOIN `item_template` ON `creature_loot_template`.`item` = `item_template`.`entry` WHERE `creature_loot_template`.`entry`='".$sql_select['creature']['lootid']."' ORDER BY `Quality` DESC, `ChanceOrRef` DESC "); 150 if( @mysql_num_rows($drop_creature) > 0 ){ 151 while($drop_NPC = @MySQL_Fetch_Array($drop_creature)){ 152 switch($drop_NPC['Quality']){ 153 case 0: $sql_select['other']['item_color'] = "class=\"graylink\""; break; 154 case 1: $sql_select['other']['item_color'] = "class=\"whitelink\""; break; 155 case 2: $sql_select['other']['item_color'] = "class=\"greenlink\""; break; 156 case 3: $sql_select['other']['item_color'] = "class=\"bluelink\""; break; 157 case 4: $sql_select['other']['item_color'] = "class=\"purplelink\""; break; 158 case 5: $sql_select['other']['item_color'] = "class=\"orangelink\""; break; 159 case 6: $sql_select['other']['item_color'] = "class=\"redlink\""; break; 160 }; 161 $sql_select['other']['creature_drop'] .= "<tr><td><a href=\"index.php?item=".$drop_NPC['entry']."\" ".$sql_select['other']['item_color'].">".$drop_NPC['name']."</a></td>"; 162 $sql_select['other']['creature_drop'] .= "<td>".$drop_NPC['ChanceOrRef']."%</td></tr>\n"; 163 }; } else{ $sql_select['other']['creature_drop'] = "<tr><td colspan='2'>Tento creep nemá žádný drop !</td></tr>"; }; 164 165 $pickpocket_creature = mysql_query("SELECT * FROM `pickpocketing_loot_template` LEFT JOIN `item_template` ON `pickpocketing_loot_template`.`item` = `item_template`.`entry` WHERE `pickpocketing_loot_template`.`entry`='".$sql_select['creature']['pickpocketloot']."' ORDER BY `Quality` DESC, `ChanceOrRef` DESC "); 166 if( @mysql_num_rows($pickpocket_creature) > 0 ){ 167 while($drop_NPC = @MySQL_Fetch_Array($pickpocket_creature)){ 168 switch($drop_NPC['Quality']){ 169 case 0: $sql_select['other']['item_color'] = "class=\"graylink\""; break; 170 case 1: $sql_select['other']['item_color'] = "class=\"whitelink\""; break; 171 case 2: $sql_select['other']['item_color'] = "class=\"greenlink\""; break; 172 case 3: $sql_select['other']['item_color'] = "class=\"bluelink\""; break; 173 case 4: $sql_select['other']['item_color'] = "class=\"purplelink\""; break; 174 case 5: $sql_select['other']['item_color'] = "class=\"orangelink\""; break; 175 case 6: $sql_select['other']['item_color'] = "class=\"redlink\""; break; 176 }; 177 $sql_select['other']['creature_pickpocket'] .= "<tr><td><a href=\"index.php?item=".$drop_NPC['entry']."\" ".$sql_select['other']['item_color'].">".$drop_NPC['name']."</a></td>"; 178 $sql_select['other']['creature_pickpocket'] .= "<td>".$drop_NPC['ChanceOrRef']."%</td></tr>\n"; 179 }; } else{ $sql_select['other']['creature_pickpocket'] = "<tr><td colspan='2'>Tento creep nemá žádný Pickpocket !</td></tr>"; }; 180 181 $skin_creature = mysql_query("SELECT * FROM `skinning_loot_template` LEFT JOIN `item_template` ON `skinning_loot_template`.`item` = `item_template`.`entry` WHERE `skinning_loot_template`.`entry`='".$sql_select['creature']['skinloot']."' ORDER BY `Quality` DESC, `ChanceOrRef` DESC "); 182 if( @mysql_num_rows($skin_creature) > 0 ){ 183 while($drop_NPC = @MySQL_Fetch_Array($skin_creature)){ 184 switch($drop_NPC['Quality']){ 185 case 0: $sql_select['other']['item_color'] = "class=\"graylink\""; break; 186 case 1: $sql_select['other']['item_color'] = "class=\"whitelink\""; break; 187 case 2: $sql_select['other']['item_color'] = "class=\"greenlink\""; break; 188 case 3: $sql_select['other']['item_color'] = "class=\"bluelink\""; break; 189 case 4: $sql_select['other']['item_color'] = "class=\"purplelink\""; break; 190 case 5: $sql_select['other']['item_color'] = "class=\"orangelink\""; break; 191 case 6: $sql_select['other']['item_color'] = "class=\"redlink\""; break; 192 }; 193 $sql_select['other']['creature_skin'] .= "<tr><td><a href=\"index.php?item=".$drop_NPC['entry']."\" ".$sql_select['other']['item_color'].">".$drop_NPC['name']."</a></td>"; 194 $sql_select['other']['creature_skin'] .= "<td>".$drop_NPC['ChanceOrRef']."%</td></tr>\n"; 195 }; } else{ $sql_select['other']['creature_skin'] = "<tr><td colspan='2'>Tento creep nemá žádný Skin !</td></tr>"; }; 196 197 } else{ $sql_select['error'] = "<p>Creep nebyl nalezen.</p>"; }; 198 199 } 200 elseif( $id == "bugreport" AND empty($bug) ){ 201 mysql_select_db($Config['DB_read']['DB_read']['Database_web']) 202 OR DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_web']."!</p>"); 203 @mysql_query("SET CHARACTER SET utf8"); 204 205 $sql_select = SQLselect_Strankovani("SELECT * FROM `bug_report` ORDER BY `opraveno` ASC, `vlozeno` DESC", $limit, 20, "?id=bugreport", $SID); 206 if( @mysql_num_rows($sql_select[1]) > 0 ){ $i = 0; 207 $sql_select['result'] .= "<table width=\"100%\" class=\"search_result\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"; 208 $sql_select['result'] .= "<thead><tr><td>Vloženo</td><td>Chyba</td><td align='right'>Status</td></tr></thead>\n<col width=\"120px\"><col><col width=\"60px\">"; 209 210 while( $result = MySQL_Fetch_Array($sql_select[1]) ){ 211 $sql_select['result'] .= "<tr><td valign='top'>"; 212 $sql_select['result'] .= "<a href=\"./index.php?id=bugreport&bug=".$result['id']."\">".@date("d.m.Y H:i", $result['vlozeno'])."</a>"; 213 $sql_select['result'] .= "</td><td valign='top'>"; 214 $sql_select['result'] .= nl2br(preg_replace(array("(\<)","(\>)"), array("<",">"), $result['popis'])); 215 $sql_select['result'] .= "</td><td valign='top' align='right'>"; 216 if( $result['opraveno'] == 0 ){ 217 $sql_select['result'] .= "<img src=\"img/aff_cross.gif\" alt=\"ne\" height=\"16\" width=\"16\">"; } 218 elseif( $result['opraveno'] == 1 ){ 219 $sql_select['result'] .= "<img src=\"img/aff_tick.gif\" alt=\"ne\" height=\"16\" width=\"16\">"; } 220 $sql_select['result'] .= "</td></tr>\n"; 221 }; 222 223 $sql_select['result'] .= "</table>\n"; 224 225 } else{ $sql_select['error'] .= "<p>V databázi nejsou záznamy o chybách.</p>"; }; 226 227 } 228 elseif( $id == "bugreport" AND !empty($bug) ){ 229 mysql_select_db($Config['DB_read']['DB_read']['Database_web']) 230 OR DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_web']."!</p>"); 231 @mysql_query("SET CHARACTER SET utf8"); 232 233 $sql_select['sql'] = mysql_query("SELECT * FROM `bug_report` WHERE id=$bug LIMIT 1"); 234 if( @mysql_num_rows($sql_select['sql']) > 0 ){ 235 $result = MySQL_Fetch_Array($sql_select['sql']); 236 $sql_select['bug'] = $result; 237 if( empty($sql_select['bug']['opravil_nick']) ){ 238 $sql_select['bug']['opravil_nick'] = "Zatím nikdo"; }; 239 if( $sql_select['bug']['opraveno'] == 0 ){ 240 $sql_select['bug']['opraveno'] = "<img src=\"img/aff_cross.gif\" alt=\"ne\" height=\"16\" width=\"16\"> Čeká na vyřízení"; } 241 elseif( $sql_select['bug']['opraveno'] == 1 ){ 242 $sql_select['bug']['opraveno'] = "<img src=\"img/aff_tick.gif\" alt=\"ne\" height=\"16\" width=\"16\"> Opraveno"; } 243 } else{ $sql_select['error'] = "<p>V databázi není záznam s touto chybou.</p>"; }; 244 245 } 246 elseif( $id == "sendbug" AND isset($_POST['send']) ){ 247 mysql_select_db($Config['DB_read']['DB_read']['Database_web']) 248 OR DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_web']."!</p>"); 249 @mysql_query("SET CHARACTER SET utf8"); 250 251 $sql_insert['sql'] = "INSERT INTO `bug_report` (`nick`,`typ`,`vlozeno`,`popis`) VALUES('".$_POST['game_nick']."','".$_POST['err_type']."','".time()."','".$_POST['popis']."')"; 252 if( mysql_query($sql_insert['sql']) ){ 253 $sql_insert['result'] = "<p>Bug byl uložen do databáze.</p>"; 254 } 255 else{ $sql_insert['result'] = "<p>Bug se nepodařilo uložit do databáze.<br>Zkuste to později znovu prosím.</p>"; }; 256 257 } 258 elseif( $id == "myacc" ){ 259 mysql_select_db($Config['DB_read']['DB_read']['Database_realmd']) 260 OR DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_realmd']."!</p>"); 261 @mysql_query("SET CHARACTER SET utf8"); 262 263 $sql_select['sql'] = mysql_query("SELECT * FROM `account` WHERE `username`='".$user['nick']."' LIMIT 1"); 264 $sql_select['result']['acc'] = @mysql_fetch_array($sql_select['sql']); 265 266 mysql_select_db($Config['DB_read']['DB_read']['Database_mangos']) 267 OR DIE("<p>Nepodařilo se nastavit pracovní databázi ".$Config['DB_read']['DB_read']['Database_mangos']."!</p>"); 268 @mysql_query("SET CHARACTER SET utf8"); 269 270 $sql_select['sql'] = mysql_query("SELECT * FROM `character` WHERE `account`='".$sql_select['result']['acc']['id']."' "); 271 $sql_select['result']['char_count'] = @mysql_num_rows($sql_select['sql']); 272 for($i=0;$sql_select['result']['char'][$i] = @mysql_fetch_array($sql_select['sql']) ;$i++){ 273 $sql_select['result']['char'][$i]['data'] = explode(" ", $sql_select['result']['char'][$i]['data']); 274 }; 275 276 switch($sql_select['result']['acc']['gmlevel']){ 277 case 0: $sql_select['result']['other']['opravneni'] = "Player"; break; 278 case 1: $sql_select['result']['other']['opravneni'] = "Moderator"; break; 279 case 2: $sql_select['result']['other']['opravneni'] = "GameMaster"; break; 280 case 3: $sql_select['result']['other']['opravneni'] = "Administrator"; break; 281 default: $sql_select['result']['other']['opravneni'] = "unknown"; 282 }; 283 284 switch($sql_select['result']['acc']['tbc']){ 285 case 0: $sql_select['result']['other']['version'] = "Normal"; break; 286 case 1: $sql_select['result']['other']['version'] = "Burning Crusade"; break; 287 }; 288 289 $sql_select['result']['other']['chars'] .= "<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"; 290 for($i=0; $i < $sql_select['result']['char_count'] ;$i++){ 291 $sql_select['result']['other']['chars'] .= "<tr><td>".$sql_select['result']['char'][$i]['name']."</td>"; 292 $sql_select['result']['other']['chars'] .= "<td title=\"Level\">".$sql_select['result']['char'][$i]['data'][34]."</td>"; 293 $sql_select['result']['other']['chars'] .= "<td title=\"Rasa\">".$Database['race'][$sql_select['result']['char'][$i]['race']]."</td>"; 294 $sql_select['result']['other']['chars'] .= "<td title=\"Povolání\">".$Database['class'][$sql_select['result']['char'][$i]['class']]."</td>\n"; 295 $sql_select['result']['other']['chars'] .= "<td> - <a href=\"./character.php?char=".$sql_select['result']['char'][$i]['guid']."\">Exportovat</a></td></tr>\n"; 296 }; $sql_select['result']['other']['chars'] .= "</table>"; 297 298 299 }; 300 301 302 368 return true; 369 }; 370 371 return false; 372 } 373 374 /* ================================================== 375 * showBugs() 376 * showBug() 377 * sendBug() 378 * 379 * Tyto funkce jsou určeny pro práci s Bugreporterem 380 * showBugs() - vypisuje všechny bugy 381 * showBug() - vrátí konkrétní bug 382 * sendBug() - odesílá nový bug do databáze 383 * 384 ================================================== */ 385 386 function showBugs(){ 387 388 if( $this->id == "bugreport" AND empty($this->bug) ){ 389 SwitchDB(3); // nastavení databáze na web 390 391 $this->sql_select = SQLselect_Strankovani("SELECT * FROM `bug_report` ORDER BY `opraveno` ASC, `vlozeno` DESC", $this->limit, $this->nastranu, "?id=bugreport", $this->sid); 392 if( @mysql_num_rows($this->sql_select[1]) > 0 ){ 393 $this->sql_select['result'] .= "<table width=\"100%\" class=\"search_result\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"; 394 $this->sql_select['result'] .= "<thead><tr><td>Vloženo</td><td>Chyba</td><td align='right'>Status</td></tr></thead>\n<col width=\"120px\"><col><col width=\"60px\">\n"; 395 396 while( $result = MySQL_Fetch_Array($this->sql_select[1]) ){ 397 $this->sql_select['result'] .= "<tr><td valign='top'>"; 398 $this->sql_select['result'] .= "<a href=\"./index.php?id=bugreport&bug=".$result['id']."\">".@date("d.m.Y H:i", $result['vlozeno'])."</a>"; 399 $this->sql_select['result'] .= "</td><td valign='top'>"; 400 $this->sql_select['result'] .= nl2br(preg_replace(array("(\<)","(\>)"), array("<",">"), $result['popis'])); 401 $this->sql_select['result'] .= "</td><td valign='top' align='right'>"; 402 if( $result['opraveno'] == 0 ){ 403 $this->sql_select['result'] .= "<img src=\"img/aff_cross.gif\" alt=\"ne\" height=\"16\" width=\"16\">"; } 404 elseif( $result['opraveno'] == 1 ){ 405 $this->sql_select['result'] .= "<img src=\"img/aff_tick.gif\" alt=\"ne\" height=\"16\" width=\"16\">"; } 406 $this->sql_select['result'] .= "</td></tr>\n"; 407 }; 408 409 $this->sql_select['result'] .= "</table>\n"; 410 411 } 412 else{ 413 $this->sql_select['error'] .= "<p>V databázi nejsou záznamy o chybách.</p>"; 414 }; 415 return true; 416 }; 417 418 return false; 419 } 420 421 function showBug(){ 422 423 if( $this->id == "bugreport" AND !empty($this->bug) ){ 424 SwitchDB(3); // nastavení databáze na web 425 426 $this->sql_select['sql'] = mysql_query("SELECT * FROM `bug_report` WHERE id=".$this->bug." LIMIT 1"); 427 if( @mysql_num_rows($this->sql_select['sql']) > 0 ){ 428 $this->sql_select['bug'] = MySQL_Fetch_Array($this->sql_select['sql']); 429 if( empty($this->sql_select['bug']['opravil_nick']) ){ 430 $this->sql_select['bug']['opravil_nick'] = "Zatím nikdo"; }; 431 if( $this->sql_select['bug']['opraveno'] == 0 ){ 432 $this->sql_select['bug']['opraveno'] = "<img src=\"img/aff_cross.gif\" alt=\"ne\" height=\"16\" width=\"16\"> Čeká na vyřízení"; } 433 elseif( $this->sql_select['bug']['opraveno'] == 1 ){ 434 $this->sql_select['bug']['opraveno'] = "<img src=\"img/aff_tick.gif\" alt=\"ne\" height=\"16\" width=\"16\"> Opraveno"; } 435 } 436 else{ 437 $this->sql_select['error'] = "<p>V databázi není záznam s touto chybou.</p>"; 438 }; 439 return true; 440 }; 441 442 return false; 443 } 444 445 function sendBug(){ 446 global $_POST; 447 448 if( $this->id == "sendbug" AND isset($_POST['send']) ){ 449 SwitchDB(3); // nastavení databáze na web 450 451 $sql_insert['sql'] = "INSERT INTO `bug_report` (`nick`,`typ`,`vlozeno`,`popis`) VALUES('".$_POST['game_nick']."','".$_POST['err_type']."','".time()."','".$_POST['popis']."')"; 452 if( mysql_query($sql_insert['sql']) ){ 453 $this->sql_select['result'] = "<p>Bug byl uložen do databáze.</p>"; 454 } 455 else{ 456 $this->sql_select['result'] = "<p>Bug se nepodařilo uložit do databáze.<br>Zkuste to později znovu prosím.</p>"; 457 }; 458 return true; 459 }; 460 461 return false; 462 } 463 464 /* ================================================== 465 * showMyAcc() 466 * 467 * Tato funkce vrací informace o uživatelově účtu 468 * 469 ================================================== */ 470 471 function showMyAcc(){ 472 global $user, $Database; 473 474 if( $this->id == "myacc" ){ 475 SwitchDB(2); // nastavení databáze na realmd 476 477 $sql_select['sql'] = mysql_query("SELECT * FROM `account` WHERE `username`='".$user['nick']."' LIMIT 1"); 478 $this->sql_select['result']['acc'] = @mysql_fetch_array($sql_select['sql']); 479 480 SwitchDB(1); // nastavení databáze na mangos 481 482 $sql_select['sql'] = mysql_query("SELECT * FROM `character` WHERE `account`='".$this->sql_select['result']['acc']['id']."' "); 483 $this->sql_select['result']['char_count'] = @mysql_num_rows($sql_select['sql']); 484 for($i=0;$this->sql_select['result']['char'][$i] = @mysql_fetch_array($sql_select['sql']) ;$i++){ 485 $this->sql_select['result']['char'][$i]['data'] = explode(" ", $this->sql_select['result']['char'][$i]['data']); 486 }; 487 488 switch($this->sql_select['result']['acc']['gmlevel']){ 489 case 0: $this->sql_select['result']['other']['opravneni'] = "Player"; break; 490 case 1: $this->sql_select['result']['other']['opravneni'] = "Moderator"; break; 491 case 2: $this->sql_select['result']['other']['opravneni'] = "GameMaster"; break; 492 case 3: $this->sql_select['result']['other']['opravneni'] = "Administrator"; break; 493 default: $this->sql_select['result']['other']['opravneni'] = "unknown"; 494 }; 495 496 switch($this->sql_select['result']['acc']['tbc']){ 497 case 0: $this->sql_select['result']['other']['version'] = "Normal"; break; 498 case 1: $this->sql_select['result']['other']['version'] = "Burning Crusade"; break; 499 }; 500 501 $this->sql_select['result']['other']['chars'] .= "<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"; 502 for($i=0; $i < $this->sql_select['result']['char_count'] ;$i++){ 503 $this->sql_select['result']['other']['chars'] .= "<tr><td>".$this->sql_select['result']['char'][$i]['name']."</td>"; 504 $this->sql_select['result']['other']['chars'] .= "<td title=\"Level\">".$this->sql_select['result']['char'][$i]['data'][34]."</td>"; 505 $this->sql_select['result']['other']['chars'] .= "<td title=\"Rasa\">".$Database['race'][$this->sql_select['result']['char'][$i]['race']]."</td>"; 506 $this->sql_select['result']['other']['chars'] .= "<td title=\"Povolání\">".$Database['class'][$this->sql_select['result']['char'][$i]['class']]."</td>\n"; 507 $this->sql_select['result']['other']['chars'] .= "<td> - <a href=\"./character.php?char=".$this->sql_select['result']['char'][$i]['guid']."\">Exportovat</a></td></tr>\n"; 508 }; 509 $this->sql_select['result']['other']['chars'] .= "</table>"; 510 511 return true; 512 }; 513 514 return false; 515 } 516 517 518 }; // konec třídy 303 519 304 520 }; // vložení souboru
Note:
See TracChangeset
for help on using the changeset viewer.